mirror of https://github.com/apache/maven.git
[MNG-3208] Injection of an inter-module dependency via profile does not affect reactor projects ordering
o Added IT git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@929102 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b48e355ee0
commit
a9ebc936fc
|
@ -363,6 +363,7 @@ public class IntegrationTestSuite
|
|||
suite.addTestSuite( MavenITmng3259DepsDroppedInMultiModuleBuildTest.class );
|
||||
suite.addTestSuite( MavenITmng3220ImportScopeTest.class );
|
||||
suite.addTestSuite( MavenITmng3217InterPluginDependencyTest.class );
|
||||
suite.addTestSuite( MavenITmng3208ProfileAwareReactorSortingTest.class );
|
||||
suite.addTestSuite( MavenITmng3203DefaultLifecycleExecIdTest.class );
|
||||
suite.addTestSuite( MavenITmng3183LoggingToFileTest.class );
|
||||
suite.addTestSuite( MavenITmng3139UseCachedMetadataOfBlacklistedRepoTest.class );
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
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-3208">MNG-3208</a>.
|
||||
*
|
||||
* @author Benjamin Bentmann
|
||||
*/
|
||||
public class MavenITmng3208ProfileAwareReactorSortingTest
|
||||
extends AbstractMavenIntegrationTestCase
|
||||
{
|
||||
|
||||
public MavenITmng3208ProfileAwareReactorSortingTest()
|
||||
{
|
||||
super( "[2.0.3,)" );
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify that project sorting consideres dependencies injected by profiles.
|
||||
*/
|
||||
public void testit()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3208" );
|
||||
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.setAutoclean( false );
|
||||
verifier.deleteDirectory( "target" );
|
||||
verifier.getCliOptions().add( "-Pmng3208" );
|
||||
verifier.executeGoal( "validate" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
|
||||
List order = verifier.loadLines( "target/order.txt", "UTF-8" );
|
||||
assertEquals( Arrays.asList( new String[] { "mod-b", "mod-a" } ), order );
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
<?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.mng3208</groupId>
|
||||
<artifactId>mod-a</artifactId>
|
||||
<version>0.1</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Maven Integration Test :: MNG-3208 :: Mod-A</name>
|
||||
<description>
|
||||
Verify that project sorting consideres dependencies injected by profiles.
|
||||
</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/order.txt</logFile>
|
||||
<string>mod-a</string>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>first</id>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>log-string</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>mng3208</id>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.its.mng3208</groupId>
|
||||
<artifactId>mod-b</artifactId>
|
||||
<version>0.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
|
@ -0,0 +1,57 @@
|
|||
<?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.mng3208</groupId>
|
||||
<artifactId>mod-b</artifactId>
|
||||
<version>0.1</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Maven Integration Test :: MNG-3208 :: Mod-B</name>
|
||||
<description>
|
||||
Verify that project sorting consideres dependencies injected by profiles.
|
||||
</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/order.txt</logFile>
|
||||
<string>mod-b</string>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>first</id>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>log-string</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,40 @@
|
|||
<?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.mng3208</groupId>
|
||||
<artifactId>test</artifactId>
|
||||
<version>0.1</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>Maven Integration Test :: MNG-3208</name>
|
||||
<description>
|
||||
Verify that project sorting consideres dependencies injected by profiles.
|
||||
</description>
|
||||
|
||||
<modules>
|
||||
<!-- NOTE: Deliberately put in reverse order of expected build order -->
|
||||
<module>mod-a</module>
|
||||
<module>mod-b</module>
|
||||
</modules>
|
||||
</project>
|
Loading…
Reference in New Issue