From 8fdaaf62188077e5f962d5b359205e01614b5520 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Mon, 22 Dec 2008 12:46:34 +0000 Subject: [PATCH] o Created UT from MNG-3886 git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@728667 13f79535-47bb-0310-9956-ffa450edef68 --- .../project/builder/PomConstructionTest.java | 18 ++++ .../plugin-exec-goals-order/pom.xml | 83 +++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 maven-project/src/test/resources-project-builder/plugin-exec-goals-order/pom.xml diff --git a/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java b/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java index db9155709a..3d23d7ba40 100644 --- a/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java +++ b/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java @@ -100,6 +100,24 @@ public class PomConstructionTest } */ + /* FIXME: cf. MNG-3886 + public void testOrderOfGoalsFromPluginExecution() + throws Exception + { + PomTestWrapper pom = buildPom( "plugin-exec-goals-order" ); + assertEquals( "b", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) ); + assertEquals( "a", pom.getValue( "build/plugins[1]/executions[1]/goals[2]" ) ); + assertEquals( "d", pom.getValue( "build/plugins[1]/executions[1]/goals[3]" ) ); + assertEquals( "c", pom.getValue( "build/plugins[1]/executions[1]/goals[4]" ) ); + assertEquals( "e", pom.getValue( "build/plugins[1]/executions[1]/goals[5]" ) ); + assertEquals( "b", pom.getValue( "build/plugins[2]/executions[1]/goals[1]" ) ); + assertEquals( "a", pom.getValue( "build/plugins[2]/executions[1]/goals[2]" ) ); + assertEquals( "d", pom.getValue( "build/plugins[2]/executions[1]/goals[3]" ) ); + assertEquals( "c", pom.getValue( "build/plugins[2]/executions[1]/goals[4]" ) ); + assertEquals( "e", pom.getValue( "build/plugins[2]/executions[1]/goals[5]" ) ); + } + */ + private PomArtifactResolver artifactResolver( String basedir ) { return new FileBasedPomArtifactResolver( new File( BASE_POM_DIR, basedir ) ); diff --git a/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/pom.xml b/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/pom.xml new file mode 100644 index 0000000000..d7aa083048 --- /dev/null +++ b/maven-project/src/test/resources-project-builder/plugin-exec-goals-order/pom.xml @@ -0,0 +1,83 @@ + + + + + + 4.0.0 + + org.apache.maven.its.mng3886 + test + 0.1 + pom + + Maven Integration Test :: MNG-3886 + + Test that the goals from a plugin execution are executed in the order given by the POM, regardless whether + plugin management is present or not. + + + + + + + org.apache.maven.its.plugins + maven-it-plugin-b + 1.0-SNAPSHOT + + + + + + + org.apache.maven.its.plugins + maven-it-plugin-a + 1.0-SNAPSHOT + + + + b + a + d + c + e + + + + + + + org.apache.maven.its.plugins + maven-it-plugin-b + 1.0-SNAPSHOT + + + + b + a + d + c + e + + + + + + +