maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r1059191 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/mng-4975/
Date Fri, 14 Jan 2011 22:40:07 GMT
Author: bentmann
Date: Fri Jan 14 22:40:06 2011
New Revision: 1059191

URL: http://svn.apache.org/viewvc?rev=1059191&view=rev
Log:
[MNG-4975] [regression] plugin executions injected from profile run before instead of after
existing executions in the POM

o Added IT

Added:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4975ProfileInjectedPluginExecutionOrderTest.java
  (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4975/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4975/pom.xml
  (with props)
Modified:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java?rev=1059191&r1=1059190&r2=1059191&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
Fri Jan 14 22:40:06 2011
@@ -83,6 +83,7 @@ public class IntegrationTestSuite
         // -------------------------------------------------------------------------------------------------------------
         // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
 
+        suite.addTestSuite( MavenITmng4975ProfileInjectedPluginExecutionOrderTest.class );
         suite.addTestSuite( MavenITmng4966AbnormalUrlPreservationTest.class );
         suite.addTestSuite( MavenITmng4960MakeLikeReactorResumeTest.class );
         suite.addTestSuite( MavenITmng4955LocalVsRemoteSnapshotResolutionTest.class );

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4975ProfileInjectedPluginExecutionOrderTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4975ProfileInjectedPluginExecutionOrderTest.java?rev=1059191&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4975ProfileInjectedPluginExecutionOrderTest.java
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4975ProfileInjectedPluginExecutionOrderTest.java
Fri Jan 14 22:40:06 2011
@@ -0,0 +1,64 @@
+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 org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-4975">MNG-4975</a>.
+ * 
+ * @author Benjamin Bentmann
+ */
+public class MavenITmng4975ProfileInjectedPluginExecutionOrderTest
+    extends AbstractMavenIntegrationTestCase
+{
+
+    public MavenITmng4975ProfileInjectedPluginExecutionOrderTest()
+    {
+        super( "[2.0.7,3.0-alpha-1),[3.0.3,)" );
+    }
+
+    /**
+     * Test that plugin executions (in the same phase) are properly ordered after profile
injection.
+     */
+    public void testit()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4975"
);
+
+        Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+        verifier.setAutoclean( false );
+        verifier.deleteDirectory( "target" );
+        verifier.getCliOptions().add( "-Pprofile2,profile1" );
+        verifier.executeGoal( "validate" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+
+        List lines = verifier.loadLines( "target/exec.log", "UTF-8" );
+        List expected = Arrays.asList( new String[] { "1", "2", "3", "4", "5" } );
+        assertEquals( expected, lines );
+    }
+
+}

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4975ProfileInjectedPluginExecutionOrderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4975ProfileInjectedPluginExecutionOrderTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4975/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4975/pom.xml?rev=1059191&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4975/pom.xml
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4975/pom.xml
Fri Jan 14 22:40:06 2011
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng4975</groupId>
+  <artifactId>test</artifactId>
+  <version>0.1</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-4975</name> 
+  <description>
+    Test that plugin executions (in the same phase) are properly ordered after profile injection.
+  </description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-log-file</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <configuration>
+          <logFile>target/exec.log</logFile>
+        </configuration>
+        <executions>
+          <execution>
+            <id>one</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>log-string</goal>
+            </goals>
+            <configuration>
+              <string>1</string>
+            </configuration>
+          </execution>
+          <execution>
+            <id>two</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>log-string</goal>
+            </goals>
+            <configuration>
+              <string>2</string>
+            </configuration>
+          </execution>
+          <execution>
+            <id>three</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>log-string</goal>
+            </goals>
+            <configuration>
+              <string>3</string>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <profiles>
+    <profile>
+      <id>profile1</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.its.plugins</groupId>
+            <artifactId>maven-it-plugin-log-file</artifactId>
+            <executions>
+              <execution>
+                <id>four</id>
+                <phase>validate</phase>
+                <goals>
+                  <goal>log-string</goal>
+                </goals>
+                <configuration>
+                  <string>4</string>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>profile2</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.its.plugins</groupId>
+            <artifactId>maven-it-plugin-log-file</artifactId>
+            <executions>
+              <execution>
+                <id>five</id>
+                <phase>validate</phase>
+                <goals>
+                  <goal>log-string</goal>
+                </goals>
+                <configuration>
+                  <string>5</string>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+</project>

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4975/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4975/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



Mime
View raw message