mirror of
https://github.com/apache/maven.git
synced 2025-02-23 02:15:50 +00:00
o Decoupled it0010 from production deps/plugins
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@729974 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ffcea54f77
commit
1a886a1690
@ -23,6 +23,7 @@
|
|||||||
import org.apache.maven.it.util.ResourceExtractor;
|
import org.apache.maven.it.util.ResourceExtractor;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class MavenIT0010Test
|
public class MavenIT0010Test
|
||||||
extends AbstractMavenIntegrationTestCase
|
extends AbstractMavenIntegrationTestCase
|
||||||
@ -31,22 +32,28 @@ public class MavenIT0010Test
|
|||||||
/**
|
/**
|
||||||
* Since the artifact resolution does not use the project builder, we must
|
* Since the artifact resolution does not use the project builder, we must
|
||||||
* ensure that the full hierarchy of all dependencies is resolved. This
|
* ensure that the full hierarchy of all dependencies is resolved. This
|
||||||
* includes the dependencies of the parent-pom's of dependencies. This test
|
* includes the dependencies of the parent-pom's of dependencies.
|
||||||
* will check this, by depending on classworlds, which is a dependency of
|
|
||||||
* maven-component, which is the parent of maven-plugin, which is an
|
|
||||||
* explicit dependency of this test.
|
|
||||||
* # TODO: must correct the assumptions of this test
|
|
||||||
*/
|
*/
|
||||||
public void testit0010()
|
public void testit0010()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0010" );
|
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0010" );
|
||||||
|
|
||||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||||
verifier.executeGoal( "compile" );
|
verifier.setAutoclean( false );
|
||||||
verifier.assertFilePresent( "target/classes/org/apache/maven/it0010/PersonFinder.class" );
|
verifier.deleteDirectory( "target" );
|
||||||
|
verifier.deleteArtifacts( "org.apache.maven.its.it0010" );
|
||||||
|
verifier.executeGoal( "validate" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
}
|
verifier.assertArtifactPresent( "org.apache.maven.its.it0010", "a", "0.1", "jar" );
|
||||||
}
|
verifier.assertArtifactPresent( "org.apache.maven.its.it0010", "b", "0.2", "jar" );
|
||||||
|
verifier.assertArtifactPresent( "org.apache.maven.its.it0010", "parent", "1.0", "pom" );
|
||||||
|
|
||||||
|
List artifacts = verifier.loadLines( "target/compile.txt", "UTF-8" );
|
||||||
|
assertTrue( artifacts.toString(), artifacts.contains( "org.apache.maven.its.it0010:a:jar:0.1" ) );
|
||||||
|
assertTrue( artifacts.toString(), artifacts.contains( "org.apache.maven.its.it0010:b:jar:0.2" ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -1,32 +1,81 @@
|
|||||||
|
<?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>
|
<project>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<name>Maven Integration Test :: it0010</name>
|
|
||||||
<groupId>org.apache.maven.its.it0010</groupId>
|
<groupId>org.apache.maven.its.it0010</groupId>
|
||||||
<artifactId>maven-it-it0010</artifactId>
|
<artifactId>test</artifactId>
|
||||||
<description>Since the artifact resolution does not use the project builder, we must
|
|
||||||
ensure that the full hierarchy of all dependencies is resolved. This
|
|
||||||
includes the dependencies of the parent-pom's of dependencies. This test
|
|
||||||
will check this, by depending on classworlds, which is a dependency of
|
|
||||||
maven-component, which is the parent of maven-plugin, which is an
|
|
||||||
explicit dependency of this test.
|
|
||||||
# TODO: must correct the assumptions of this test
|
|
||||||
</description>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>Maven Integration Test :: it0010</name>
|
||||||
|
<description>
|
||||||
|
Since the artifact resolution does not use the project builder, we must
|
||||||
|
ensure that the full hierarchy of all dependencies is resolved. This
|
||||||
|
includes the dependencies of the parent-pom's of dependencies.
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>maven-core-it</id>
|
||||||
|
<url>file:///${basedir}/repo</url>
|
||||||
|
<releases>
|
||||||
|
<checksumPolicy>ignore</checksumPolicy>
|
||||||
|
</releases>
|
||||||
|
<snapshots>
|
||||||
|
<checksumPolicy>ignore</checksumPolicy>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven.its.it0010</groupId>
|
||||||
<artifactId>maven-plugin-api</artifactId>
|
<artifactId>a</artifactId>
|
||||||
<version>2.0-beta-1</version>
|
<version>0.1</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>3.8.1</version>
|
|
||||||
<type>jar</type>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.its.plugins</groupId>
|
||||||
|
<artifactId>maven-it-plugin-dependency-resolution</artifactId>
|
||||||
|
<version>2.1-SNAPSHOT</version>
|
||||||
|
<configuration>
|
||||||
|
<compileArtifacts>target/compile.txt</compileArtifacts>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>test</id>
|
||||||
|
<phase>validate</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>compile</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
Binary file not shown.
@ -0,0 +1,45 @@
|
|||||||
|
<?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>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.apache.maven.its.it0010</groupId>
|
||||||
|
<artifactId>parent</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>a</artifactId>
|
||||||
|
<version>0.1</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<id>maven-core-it</id>
|
||||||
|
<url>file:///${basedir}/repo</url>
|
||||||
|
</repository>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<updateReleaseInfo>true</updateReleaseInfo>
|
||||||
|
</properties>
|
||||||
|
</project>
|
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?><metadata>
|
||||||
|
<groupId>org.apache.maven.its.it0010</groupId>
|
||||||
|
<artifactId>a</artifactId>
|
||||||
|
<version>0.1</version>
|
||||||
|
<versioning>
|
||||||
|
<release>0.1</release>
|
||||||
|
<versions>
|
||||||
|
<version>0.1</version>
|
||||||
|
</versions>
|
||||||
|
<lastUpdated>20081229185855</lastUpdated>
|
||||||
|
</versioning>
|
||||||
|
</metadata>
|
Binary file not shown.
@ -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.it0010</groupId>
|
||||||
|
<artifactId>b</artifactId>
|
||||||
|
<version>0.2</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<id>maven-core-it</id>
|
||||||
|
<url>file:///${basedir}/repo</url>
|
||||||
|
</repository>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<updateReleaseInfo>true</updateReleaseInfo>
|
||||||
|
</properties>
|
||||||
|
</project>
|
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?><metadata>
|
||||||
|
<groupId>org.apache.maven.its.it0010</groupId>
|
||||||
|
<artifactId>b</artifactId>
|
||||||
|
<version>0.2</version>
|
||||||
|
<versioning>
|
||||||
|
<release>0.2</release>
|
||||||
|
<versions>
|
||||||
|
<version>0.2</version>
|
||||||
|
</versions>
|
||||||
|
<lastUpdated>20081229185350</lastUpdated>
|
||||||
|
</versioning>
|
||||||
|
</metadata>
|
@ -0,0 +1,48 @@
|
|||||||
|
<?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.it0010</groupId>
|
||||||
|
<artifactId>parent</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<id>maven-core-it</id>
|
||||||
|
<url>file:///${basedir}/repo</url>
|
||||||
|
</repository>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<updateReleaseInfo>true</updateReleaseInfo>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.its.it0010</groupId>
|
||||||
|
<artifactId>b</artifactId>
|
||||||
|
<version>0.2</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?><metadata>
|
||||||
|
<groupId>org.apache.maven.its.it0010</groupId>
|
||||||
|
<artifactId>parent</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
<versioning>
|
||||||
|
<release>1.0</release>
|
||||||
|
<versions>
|
||||||
|
<version>1.0</version>
|
||||||
|
</versions>
|
||||||
|
<lastUpdated>20081229185535</lastUpdated>
|
||||||
|
</versioning>
|
||||||
|
</metadata>
|
@ -1,11 +0,0 @@
|
|||||||
package org.apache.maven.it0010;
|
|
||||||
|
|
||||||
public class PersonFinder
|
|
||||||
{
|
|
||||||
public void findPerson()
|
|
||||||
throws Exception
|
|
||||||
{
|
|
||||||
// look it up at runtime, but do not require it at compile time
|
|
||||||
Class.forName( "org.codehaus.classworlds.ClassRealm" );
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
package org.apache.maven.it0010;
|
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
|
|
||||||
public class PersonFinderTest
|
|
||||||
extends TestCase
|
|
||||||
{
|
|
||||||
public void testFindPerson()
|
|
||||||
throws Exception
|
|
||||||
{
|
|
||||||
// should be no exceptions
|
|
||||||
new PersonFinder().findPerson();
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user