Repository: maven-integration-testing
Updated Branches:
  refs/heads/master 5faef7b9d -> 104986975


[MNG-5799] Incorrect execution order of plugins in the same phase


Project: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/commit/583bb69e
Tree: 
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/583bb69e
Diff: 
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/583bb69e

Branch: refs/heads/master
Commit: 583bb69e005817a72e87d20f7e3bc5c61cd5e861
Parents: 5faef7b
Author: Christian Schulte <schu...@apache.org>
Authored: Sun Feb 28 05:12:18 2016 +0100
Committer: Christian Schulte <schu...@apache.org>
Committed: Sun Feb 28 05:12:18 2016 +0100

----------------------------------------------------------------------
 .../apache/maven/it/IntegrationTestSuite.java   |  1 +
 .../it/MavenITmng5799ExecutionOrderTest.java    | 55 +++++++++++++++++++
 .../src/test/resources/mng-5799/pom.xml         | 58 ++++++++++++++++++++
 .../java/org/apache/maven/its/mng5977/Test.java | 35 ++++++++++++
 4 files changed, 149 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/583bb69e/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
----------------------------------------------------------------------
diff --git 
a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java 
b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
index 67680a9..33cda33 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
@@ -106,6 +106,7 @@ public class IntegrationTestSuite
         // 
-------------------------------------------------------------------------------------------------------------
         // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- 
MNG-3137
 
+        suite.addTestSuite( MavenITmng5799ExecutionOrderTest.class );
         suite.addTestSuite( MavenITmng5971HierarchicalImportScopeTest.class );
         suite.addTestSuite( MavenITmng5958LifecyclePhaseBinaryCompat.class );
         suite.addTestSuite( 
MavenITmng4463DependencyManagementImportVersionRanges.class );

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/583bb69e/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5799ExecutionOrderTest.java
----------------------------------------------------------------------
diff --git 
a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5799ExecutionOrderTest.java
 
b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5799ExecutionOrderTest.java
new file mode 100644
index 0000000..a1ddb47
--- /dev/null
+++ 
b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5799ExecutionOrderTest.java
@@ -0,0 +1,55 @@
+package org.apache.maven.it;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+import java.util.Arrays;
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * [MNG-5799] Incorrect execution order of plugins in the same phase
+ *
+ * @author Christian Schulte
+ */
+public class MavenITmng5799ExecutionOrderTest
+    extends AbstractMavenIntegrationTestCase
+{
+
+    public MavenITmng5799ExecutionOrderTest()
+    {
+        super( "[3.4,)" );
+    }
+
+    public void testExecutionOrder()
+        throws Exception
+    {
+        final File testDir = ResourceExtractor.simpleExtractResources( 
getClass(), "/mng-5799" );
+
+        final Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+        verifier.setAutoclean( false );
+        verifier.executeGoals( Arrays.asList( new String[]
+        {
+            "clean", "test"
+        } ) );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/583bb69e/core-it-suite/src/test/resources/mng-5799/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5799/pom.xml 
b/core-it-suite/src/test/resources/mng-5799/pom.xml
new file mode 100644
index 0000000..239468d
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5799/pom.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.its.mng5799</groupId>
+  <artifactId>test</artifactId>
+  <version>1.0</version>
+  <packaging>jar</packaging>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>1.10</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>regex-property</goal>
+            </goals>
+            <phase>test</phase>
+            <configuration>
+              <name>mng5799ProjectProperty</name>
+              <value>PROVIDED</value>
+              <regex>ignore</regex>
+              <failIfNoMatch>false</failIfNoMatch>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.19.1</version>
+        <executions>
+          <execution>
+            <id>default-test</id>
+          </execution>
+        </executions>
+        <configuration>
+          <systemPropertyVariables>
+            
<mng5799SystemProperty>${mng5799ProjectProperty}</mng5799SystemProperty>
+          </systemPropertyVariables>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.12</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/583bb69e/core-it-suite/src/test/resources/mng-5799/src/test/java/org/apache/maven/its/mng5977/Test.java
----------------------------------------------------------------------
diff --git 
a/core-it-suite/src/test/resources/mng-5799/src/test/java/org/apache/maven/its/mng5977/Test.java
 
b/core-it-suite/src/test/resources/mng-5799/src/test/java/org/apache/maven/its/mng5977/Test.java
new file mode 100644
index 0000000..35fe331
--- /dev/null
+++ 
b/core-it-suite/src/test/resources/mng-5799/src/test/java/org/apache/maven/its/mng5977/Test.java
@@ -0,0 +1,35 @@
+package org.apache.maven.its.mng5977;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+public class Test
+{
+
+    @org.junit.Test
+    public void 
ensureProjectPropertyHasBeenSetInTheSamePhaseBeforeTheSurefirePluginIsExecuting()
+    {
+        final String mng5799SystemProperty = System.getProperty( 
"mng5799SystemProperty" );
+        assertNotNull( "Expected system property.", mng5799SystemProperty );
+        assertEquals( "Expected interpolated system property.", "PROVIDED", 
mng5799SystemProperty );
+    }
+
+}

Reply via email to