mirror of https://github.com/apache/maven.git
o Decoupled it0047 from production dependency
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@700933 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2152ce5102
commit
372cc6fe9a
|
@ -21,8 +21,11 @@ package org.apache.maven.it;
|
|||
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
import org.apache.maven.it.util.StringUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
public class MavenIT0047Test
|
||||
extends AbstractMavenIntegrationTestCase
|
||||
|
@ -37,11 +40,18 @@ public class MavenIT0047Test
|
|||
{
|
||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0047" );
|
||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.executeGoal( "compile" );
|
||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0047/Person.class" );
|
||||
Properties systemProperties = new Properties();
|
||||
systemProperties.put( "depres.compileClassPath", new File( testDir, "target/compile.txt" ).getAbsolutePath() );
|
||||
verifier.setSystemProperties( systemProperties );
|
||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution::compile" );
|
||||
verifier.assertFilePresent( "target/compile.txt" );
|
||||
verifier.verifyErrorFreeLog();
|
||||
verifier.resetStreams();
|
||||
|
||||
List lines = verifier.loadLines( "target/compile.txt", "UTF-8" );
|
||||
String paths = StringUtils.join( lines.iterator(), "\t" ).replace( '\\', '/' );
|
||||
assertTrue( paths.indexOf( "org/apache/maven/its/it0047/direct-dep/1.0/direct-dep-1.0.jar" ) >= 0 );
|
||||
assertTrue( paths.indexOf( "org/apache/maven/its/it0047/transitive-dep/1.1/transitive-dep-1.1.jar" ) >= 0 );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,16 +1,56 @@
|
|||
<?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>
|
||||
<name>Maven Integration Test :: it0047</name>
|
||||
|
||||
<groupId>org.apache.maven.its.it0047</groupId>
|
||||
<artifactId>maven-it-it0047</artifactId>
|
||||
<description>Test the use case for having a compile time dependency be transitive:
|
||||
when you extend a class you need its dependencies at compile time.</description>
|
||||
<version>1.0</version>
|
||||
|
||||
<name>Maven Integration Test :: it0047</name>
|
||||
<description>
|
||||
Test the use case for having a compile time dependency be transitive:
|
||||
when you extend a class you need its dependencies at compile time.
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<!-- should bring in transitive-dep, too -->
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-container-default</artifactId>
|
||||
<version>1.0-alpha-7</version>
|
||||
<groupId>org.apache.maven.its.it0047</groupId>
|
||||
<artifactId>direct-dep</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>maven-core-it</id>
|
||||
<url>file:///${basedir}/repo</url>
|
||||
<releases>
|
||||
<checksumPolicy>ignore</checksumPolicy>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<checksumPolicy>ignore</checksumPolicy>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
</project>
|
||||
|
|
Binary file not shown.
|
@ -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.it0047</groupId>
|
||||
<artifactId>direct-dep</artifactId>
|
||||
<version>1.0</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>maven-core-it</id>
|
||||
<url>file:///${basedir}/repo</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<!-- compile-scoped dependencies should be transitive for the sake of class inheritance -->
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.its.it0047</groupId>
|
||||
<artifactId>transitive-dep</artifactId>
|
||||
<version>1.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><metadata>
|
||||
<groupId>org.apache.maven.its.it0047</groupId>
|
||||
<artifactId>direct-dep</artifactId>
|
||||
<version>1.0</version>
|
||||
<versioning>
|
||||
<versions>
|
||||
<version>1.0</version>
|
||||
</versions>
|
||||
<lastUpdated>20081001201944</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>
|
Binary file not shown.
|
@ -0,0 +1,36 @@
|
|||
<?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.it0047</groupId>
|
||||
<artifactId>transitive-dep</artifactId>
|
||||
<version>1.1</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>maven-core-it</id>
|
||||
<url>file:///${basedir}/repo</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</project>
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><metadata>
|
||||
<groupId>org.apache.maven.its.it0047</groupId>
|
||||
<artifactId>transitive-dep</artifactId>
|
||||
<version>1.1</version>
|
||||
<versioning>
|
||||
<versions>
|
||||
<version>1.1</version>
|
||||
</versions>
|
||||
<lastUpdated>20081001201930</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>
|
|
@ -1,19 +0,0 @@
|
|||
package org.apache.maven.it0047;
|
||||
|
||||
import org.codehaus.plexus.PlexusTestCase;
|
||||
|
||||
public class Person
|
||||
extends PlexusTestCase
|
||||
{
|
||||
private String name;
|
||||
|
||||
public void setName( String name )
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue