diff --git a/maven-core-integration-tests/src/test/resources/it0010/pom.xml b/maven-core-integration-tests/src/test/resources/it0010/pom.xml new file mode 100644 index 0000000000..be34c59f7b --- /dev/null +++ b/maven-core-integration-tests/src/test/resources/it0010/pom.xml @@ -0,0 +1,31 @@ + + 4.0.0 + org.apache.maven + maven-core-it0010 + 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 + + jar + 1.0 + + + org.apache.maven + maven-plugin-api + 2.0-beta-1 + jar + compile + + + junit + junit + 3.8.1 + jar + test + + + diff --git a/maven-core-integration-tests/src/test/resources/it0010/src/main/java/org/apache/maven/it0010/PersonFinder.java b/maven-core-integration-tests/src/test/resources/it0010/src/main/java/org/apache/maven/it0010/PersonFinder.java new file mode 100644 index 0000000000..f7097b08d1 --- /dev/null +++ b/maven-core-integration-tests/src/test/resources/it0010/src/main/java/org/apache/maven/it0010/PersonFinder.java @@ -0,0 +1,11 @@ +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" ); + } +} diff --git a/maven-core-integration-tests/src/test/resources/it0010/src/test/java/org/apache/maven/it0010/PersonFinderTest.java b/maven-core-integration-tests/src/test/resources/it0010/src/test/java/org/apache/maven/it0010/PersonFinderTest.java new file mode 100644 index 0000000000..ce2ff39dbd --- /dev/null +++ b/maven-core-integration-tests/src/test/resources/it0010/src/test/java/org/apache/maven/it0010/PersonFinderTest.java @@ -0,0 +1,14 @@ +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(); + } +}