diff --git a/maven-project-builder/src/main/java/org/apache/maven/project/builder/ProjectUri.java b/maven-project-builder/src/main/java/org/apache/maven/project/builder/ProjectUri.java index 60f43c5b56..a0520355a3 100644 --- a/maven-project-builder/src/main/java/org/apache/maven/project/builder/ProjectUri.java +++ b/maven-project-builder/src/main/java/org/apache/maven/project/builder/ProjectUri.java @@ -385,14 +385,8 @@ public class ProjectUri public static String phase = "http://apache.org/maven/project/build/pluginManagement/plugins#collection/plugin/executions#collection/execution/phase"; - public static class Goals - { - public static String xURI = - "http://apache.org/maven/project/build/pluginManagement/plugins#collection/plugin/executions#collection/execution/goals#collection"; - - public static String goal = - "http://apache.org/maven/project/build/pluginManagement/plugins#collection/plugin/executions#collection/execution/goals#collection/goal"; - } + public static String goals = + "http://apache.org/maven/project/build/pluginManagement/plugins#collection/plugin/executions#collection/execution/goals"; public static String inherited = "http://apache.org/maven/project/build/pluginManagement/plugins#collection/plugin/executions#collection/execution/inherited"; @@ -456,15 +450,8 @@ public class ProjectUri } } - public static class Goals - { - public static String xURI = - "http://apache.org/maven/project/build/pluginManagement/plugins#collection/plugin/goals#collection"; - - public static String goal = - "http://apache.org/maven/project/build/pluginManagement/plugins#collection/plugin/goals#collection/goal"; - - } + public static String goals = + "http://apache.org/maven/project/build/pluginManagement/plugins#collection/plugin/goals"; public static String inherited = "http://apache.org/maven/project/build/pluginManagement/plugins#collection/plugin/inherited"; @@ -511,14 +498,8 @@ public class ProjectUri public static String phase = "http://apache.org/maven/project/build/plugins#collection/plugin/executions#collection/execution/phase"; - public static class Goals - { - public static String xURI = - "http://apache.org/maven/project/build/plugins#collection/plugin/executions#collection/execution/goals#collection"; - - public static String goal = - "http://apache.org/maven/project/build/plugins#collection/plugin/executions#collection/execution/goals#collection/goal"; - } + public static String goals = + "http://apache.org/maven/project/build/plugins#collection/plugin/executions#collection/execution/goals"; public static String inherited = "http://apache.org/maven/project/build/plugins#collection/plugin/executions#collection/execution/inherited"; @@ -581,14 +562,8 @@ public class ProjectUri "http://apache.org/maven/project/build/plugins#collection/plugin/dependencies#collection/dependency/optional"; } } - public static class Goals - { - public static String xURI = - "http://apache.org/maven/project/build/plugins#collection/plugin/goals#collection"; - public static String goal = - "http://apache.org/maven/project/build/plugins#collection/plugin/goals#collection/goal"; - } + public static String goals = "http://apache.org/maven/project/build/plugins#collection/plugin/goals"; public static String inherited = "http://apache.org/maven/project/build/plugins#collection/plugin/inherited"; @@ -775,14 +750,8 @@ public class ProjectUri public static String phase = "http://apache.org/maven/project/profiles#collection/profile/build/pluginManagement/plugins#collection/plugin/executions#collection/execution/phase"; - public static class Goals - { - public static String xURI = - "http://apache.org/maven/project/profiles#collection/profile/build/pluginManagement/plugins#collection/plugin/executions#collection/execution/goals#collection"; - - public static String goal = - "http://apache.org/maven/project/profiles#collection/profile/build/pluginManagement/plugins#collection/plugin/executions#collection/execution/goals#collection/goal"; - } + public static String goals = + "http://apache.org/maven/project/profiles#collection/profile/build/pluginManagement/plugins#collection/plugin/executions#collection/execution/goals"; public static String inherited = "http://apache.org/maven/project/profiles#collection/profile/build/pluginManagement/plugins#collection/plugin/executions#collection/execution/inherited"; @@ -846,14 +815,8 @@ public class ProjectUri } } - public static class Goals - { - public static String xURI = - "http://apache.org/maven/project/profiles#collection/profile/build/pluginManagement/plugins#collection/plugin/goals#collection"; - - public static String goal = - "http://apache.org/maven/project/profiles#collection/profile/build/pluginManagement/plugins#collection/plugin/goal"; - } + public static String goals = + "http://apache.org/maven/project/profiles#collection/profile/build/pluginManagement/plugins#collection/plugin/goals"; public static String inherited = "http://apache.org/maven/project/profiles#collection/profile/build/pluginManagement/plugins#collection/plugin/inherited"; @@ -902,14 +865,8 @@ public class ProjectUri public static String phase = "http://apache.org/maven/project/profiles#collection/profile/build/plugins#collection/plugin/executions#collection/execution/phase"; - public static class Goals - { - public static String xURI = - "http://apache.org/maven/project/profiles#collection/profile/build/plugins#collection/plugin/executions#collection/execution/goals#collection"; - - public static String goal = - "http://apache.org/maven/project/profiles#collection/profile/build/plugins#collection/plugin/executions#collection/execution/goals#collection/goal"; - } + public static String goals = + "http://apache.org/maven/project/profiles#collection/profile/build/plugins#collection/plugin/executions#collection/execution/goals"; public static String inherited = "http://apache.org/maven/project/profiles#collection/profile/build/plugins#collection/plugin/executions#collection/execution/inherited"; @@ -973,20 +930,14 @@ public class ProjectUri } } - public static class Goals - { - public static String xURI = - "http://apache.org/maven/project/profiles#collection/profile/build/plugins#collection/plugin/goals#collection"; - - public static String goal = - "http://apache.org/maven/project/profiles#collection/profile/build/plugins#collection/plugin/goals#collection/goal"; - } + public static String goals = + "http://apache.org/maven/project/profiles#collection/profile/build/plugins/plugin/goals"; public static String inherited = - "http://apache.org/maven/project/profiles#collection/profile/build/plugins#collection/plugin/inherited"; + "http://apache.org/maven/project/profiles#collection/profile/build/plugins/plugin/inherited"; public static String configuration = - "http://apache.org/maven/project/profiles#collection/profile/build/plugins#collection/plugin/configuration"; + "http://apache.org/maven/project/profiles#collection/profile/build/plugins/plugin/configuration"; } } } diff --git a/maven-project-builder/src/test/java/org/apache/maven/project/builder/EnforcerPomTest.java b/maven-project-builder/src/test/java/org/apache/maven/project/builder/EnforcerPomTest.java index f1a58146d4..dc32a7c449 100644 --- a/maven-project-builder/src/test/java/org/apache/maven/project/builder/EnforcerPomTest.java +++ b/maven-project-builder/src/test/java/org/apache/maven/project/builder/EnforcerPomTest.java @@ -12,7 +12,7 @@ import static org.junit.Assert.*; public class EnforcerPomTest { - @org.junit.Test + @org.junit.Test public void dependencyManagementWithScopeAndClassifier() throws IOException { List mp = new ArrayList(); diff --git a/maven-project-builder/src/test/java/org/apache/maven/project/builder/PluginSpecTest.java b/maven-project-builder/src/test/java/org/apache/maven/project/builder/PluginSpecTest.java deleted file mode 100644 index abce4a0cc0..0000000000 --- a/maven-project-builder/src/test/java/org/apache/maven/project/builder/PluginSpecTest.java +++ /dev/null @@ -1,73 +0,0 @@ -package org.apache.maven.project.builder; - -import static org.junit.Assert.*; -import org.apache.maven.shared.model.*; -import org.apache.maven.shared.model.impl.DefaultModelDataSource; - -import java.util.List; -import java.util.ArrayList; -import java.util.Arrays; - -public class PluginSpecTest { - - @org.junit.Test - public void goalsInherited() { - List mp = new ArrayList(); - mp.add(new ModelProperty(ProjectUri.xUri, null)); - mp.add(new ModelProperty(ProjectUri.Build.xUri, null)); - mp.add(new ModelProperty(ProjectUri.Build.PluginManagement.xUri, null)); - mp.add(new ModelProperty(ProjectUri.Build.PluginManagement.Plugins.xUri, null)); - mp.add(new ModelProperty(ProjectUri.Build.PluginManagement.Plugins.Plugin.xUri, null)); - mp.add(new ModelProperty(ProjectUri.Build.PluginManagement.Plugins.Plugin.groupId, "gid")); - mp.add(new ModelProperty(ProjectUri.Build.PluginManagement.Plugins.Plugin.artifactId, "aid")); - mp.add(new ModelProperty(ProjectUri.Build.PluginManagement.Plugins.Plugin.version, "v1")); - - mp.add(new ModelProperty(ProjectUri.Build.PluginManagement.Plugins.Plugin.Executions.xUri, null)); - mp.add(new ModelProperty(ProjectUri.Build.PluginManagement.Plugins.Plugin.Executions.Execution.xUri, null)); - mp.add(new ModelProperty(ProjectUri.Build.PluginManagement.Plugins.Plugin.Executions.Execution.id, "site-docs")); - mp.add(new ModelProperty(ProjectUri.Build.PluginManagement.Plugins.Plugin.Executions.Execution.phase, "phase")); - // mp.add(new ModelProperty(ProjectUri.Build.PluginManagement.Plugins.Plugin.Executions.Execution.goals, null)); - /* - pre-site - - xdoc - xsd - - - - standard - - java - xpp3-reader - xpp3-writer - - - - - List mp2 = new ArrayList(); - mp2.add(new ModelProperty(ProjectUri.xUri, null)); - mp2.add(new ModelProperty(ProjectUri.Dependencies.xUri, null)); - mp2.add(new ModelProperty(ProjectUri.Dependencies.Dependency.xUri, null)); - mp2.add(new ModelProperty(ProjectUri.Dependencies.Dependency.groupId, "gid")); - mp2.add(new ModelProperty(ProjectUri.Dependencies.Dependency.artifactId, "aid")); - mp2.add(new ModelProperty(ProjectUri.Dependencies.Dependency.xUri, null)); - mp2.add(new ModelProperty(ProjectUri.Dependencies.Dependency.groupId, "gid")); - mp2.add(new ModelProperty(ProjectUri.Dependencies.Dependency.artifactId, "aid")); - mp2.add(new ModelProperty(ProjectUri.Dependencies.Dependency.classifier, "tests")); - - DomainModel childModel = new DefaultDomainModel(mp2); - DomainModel parentModel = new DefaultDomainModel(mp); - - ModelTransformerContext ctx = new ModelTransformerContext(Arrays.asList(new ArtifactModelContainerFactory(), - new IdModelContainerFactory())); - - ModelTransformer transformer = new PomTransformer(new DefaultDomainModelFactory()); - DomainModel domainModel = ctx.transform( Arrays.asList(childModel, parentModel), transformer, transformer ); - - DefaultModelDataSource source = new DefaultModelDataSource(); - source.init(domainModel.getModelProperties(), Arrays.asList(new ArtifactModelContainerFactory(), new IdModelContainerFactory())); - List containers = source.queryFor(ProjectUri.Dependencies.Dependency.xUri); - */ - } - -}