mirror of https://github.com/apache/maven.git
[MNG-4052] import scope dependencies prefer to download pom rather than find it in the current project
o Added IT git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@798222 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bee7986d93
commit
ee6affefce
|
@ -120,6 +120,7 @@ public class IntegrationTestSuite
|
|||
suite.addTestSuite( MavenITmng4070WhitespaceTrimmingTest.class );
|
||||
suite.addTestSuite( MavenITmng4068AuthenticatedMirrorTest.class );
|
||||
suite.addTestSuite( MavenITmng4056ClassifierBasedDepResolutionFromReactorTest.class );
|
||||
suite.addTestSuite( MavenITmng4052ReactorAwareImportScopeTest.class );
|
||||
suite.addTestSuite( MavenITmng4053PluginConfigAttributesTest.class );
|
||||
suite.addTestSuite( MavenITmng4040ProfileInjectedModulesTest.class );
|
||||
suite.addTestSuite( MavenITmng4036ParentResolutionFromSettingsRepoTest.class );
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
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.util.ResourceExtractor;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="http://jira.codehaus.org/browse/MNG-4052">MNG-4052</a>.
|
||||
*
|
||||
* @author Benjamin Bentmann
|
||||
*/
|
||||
public class MavenITmng4052ReactorAwareImportScopeTest
|
||||
extends AbstractMavenIntegrationTestCase
|
||||
{
|
||||
|
||||
public MavenITmng4052ReactorAwareImportScopeTest()
|
||||
{
|
||||
super( "[3.0-alpha-3,)" );
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that the project builder properly detects and handles inter-model dependencies within a reactor
|
||||
* like a POM that imports another POM. To clarify, this is not about the kind of dependency where one
|
||||
* project needs another project's output for compilation/testing but about the case where one project's
|
||||
* effective model requires another project's model for its construction.
|
||||
*/
|
||||
public void testit()
|
||||
throws Exception
|
||||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4052" );
|
||||
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.setAutoclean( false );
|
||||
verifier.executeGoal( "validate" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
<?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.mng4052</groupId>
|
||||
<artifactId>imported-pom</artifactId>
|
||||
<version>0.1</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>Maven Integration Test :: MNG-4052 :: Imported POM</name>
|
||||
<description>
|
||||
Test that the project builder properly detects and handles inter-model dependencies within a reactor
|
||||
like a POM that imports another POM. To clarify, this is not about the kind of dependency where one
|
||||
project needs another project's output for compilation/testing but about the case where one project's
|
||||
effective model requires another project's model for its construction.
|
||||
</description>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
</project>
|
|
@ -0,0 +1,49 @@
|
|||
<?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.mng4052</groupId>
|
||||
<artifactId>importing-pom</artifactId>
|
||||
<version>0.1</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Maven Integration Test :: MNG-4052 :: Importing POM</name>
|
||||
<description>
|
||||
Test that the project builder properly detects and handles inter-model dependencies within a reactor
|
||||
like a POM that imports another POM. To clarify, this is not about the kind of dependency where one
|
||||
project needs another project's output for compilation/testing but about the case where one project's
|
||||
effective model requires another project's model for its construction.
|
||||
</description>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.its.mng4052</groupId>
|
||||
<artifactId>imported-pom</artifactId>
|
||||
<version>0.1</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
</project>
|
|
@ -0,0 +1,46 @@
|
|||
<?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.mng4052</groupId>
|
||||
<artifactId>parent</artifactId>
|
||||
<version>0.1</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>Maven Integration Test :: MNG-4052</name>
|
||||
<description>
|
||||
Test that the project builder properly detects and handles inter-model dependencies within a reactor
|
||||
like a POM that imports another POM. To clarify, this is not about the kind of dependency where one
|
||||
project needs another project's output for compilation/testing but about the case where one project's
|
||||
effective model requires another project's model for its construction.
|
||||
</description>
|
||||
|
||||
<modules>
|
||||
<!--
|
||||
NOTE: We intentionally list importing-pom before imported-pom here to check that the construction of their
|
||||
effective models works regardless of the reversed top-sort as given the inter-model dependencies.
|
||||
-->
|
||||
<module>importing-pom</module>
|
||||
<module>imported-pom</module>
|
||||
</modules>
|
||||
</project>
|
Loading…
Reference in New Issue