diff --git a/maven-core-it/it2002/cvs-project/pom.xml b/maven-core-it/it2002/cvs-project/pom.xml new file mode 100644 index 0000000000..6a93df6f29 --- /dev/null +++ b/maven-core-it/it2002/cvs-project/pom.xml @@ -0,0 +1,113 @@ + + 4.0.0 + org.apache.maven.it2002 + project + 1.0-SNAPSHOT + pom + + + subproject + subproject2 + + + + + plexus + plexus-container-default + 1.0-alpha-6 + test + + + + + + snapshots + http://snapshots.maven.codehaus.org/maven2 + false + true + + + + + + test + file:../target/test-repo + + + test-snaps + file:../target/test-repo + + + + + scm:cvs:ext:${user.name}@localhost:${project.file.parentFile.parentFile}/target/cvsroot:project + p1 + + + + + + org.codehaus.modello + modello-maven-plugin + + + + + src/main/resources + + + src/conf + + + + + + + + maven-project-info-reports-plugin + 2.0-beta-1 + + + + + + + + org.apache.maven + maven-artifact + 2.0-beta-1 + test + + + org.apache.maven + maven-artifact-manager + 2.0-beta-1 + test + + + + + + + env-test + + + env + test + + + + + + org.apache.maven + maven-artifact + + + + + testValue + + + + + diff --git a/maven-core-it/it2002/cvs-project/subproject/pom.xml b/maven-core-it/it2002/cvs-project/subproject/pom.xml new file mode 100644 index 0000000000..db2f9176eb --- /dev/null +++ b/maven-core-it/it2002/cvs-project/subproject/pom.xml @@ -0,0 +1,17 @@ + + 4.0.0 + + org.apache.maven.it2002 + project + 1.0-SNAPSHOT + + + project-sub1 + + + + org.apache.maven + maven-artifact-manager + + + diff --git a/maven-core-it/it2002/cvs-project/subproject/src/main/java/org/apache/maven/it2002/Thing.java b/maven-core-it/it2002/cvs-project/subproject/src/main/java/org/apache/maven/it2002/Thing.java new file mode 100644 index 0000000000..648241fe22 --- /dev/null +++ b/maven-core-it/it2002/cvs-project/subproject/src/main/java/org/apache/maven/it2002/Thing.java @@ -0,0 +1,9 @@ +package org.apache.maven.it2002; + +public class Thing +{ + public static final String ROLE = Thing.class.getName(); + + private String type; +} + diff --git a/maven-core-it/it2002/cvs-project/subproject/src/main/resources/META-INF/plexus/components.xml b/maven-core-it/it2002/cvs-project/subproject/src/main/resources/META-INF/plexus/components.xml new file mode 100644 index 0000000000..779499a82f --- /dev/null +++ b/maven-core-it/it2002/cvs-project/subproject/src/main/resources/META-INF/plexus/components.xml @@ -0,0 +1,8 @@ + + + + org.apache.maven.it2002.Thing + org.apache.maven.it2002.Thing + + + \ No newline at end of file diff --git a/maven-core-it/it2002/cvs-project/subproject/src/test/java/org/apache/maven/it2002/ContainerDependentTest.java b/maven-core-it/it2002/cvs-project/subproject/src/test/java/org/apache/maven/it2002/ContainerDependentTest.java new file mode 100644 index 0000000000..9280ae56e6 --- /dev/null +++ b/maven-core-it/it2002/cvs-project/subproject/src/test/java/org/apache/maven/it2002/ContainerDependentTest.java @@ -0,0 +1,20 @@ +package org.apache.maven.it2002; + +import org.apache.maven.artifact.resolver.ArtifactResolver; +import org.codehaus.plexus.PlexusTestCase; + +public class ContainerDependentTest extends PlexusTestCase +{ + + public void testOne() throws Exception + { + ArtifactResolver resolver = (ArtifactResolver) lookup( ArtifactResolver.ROLE ); + + assertNotNull( resolver ); + + Thing thing = (Thing) lookup( Thing.ROLE ); + + assertNotNull( thing ); + } + +} diff --git a/maven-core-it/it2002/cvs-project/subproject2/pom.xml b/maven-core-it/it2002/cvs-project/subproject2/pom.xml new file mode 100644 index 0000000000..98b28c8f55 --- /dev/null +++ b/maven-core-it/it2002/cvs-project/subproject2/pom.xml @@ -0,0 +1,29 @@ + + 4.0.0 + + org.apache.maven.it2002 + project + 1.0-SNAPSHOT + + + project-sub2 + + + + org.apache.maven.it2002 + project-sub1 + 1.0-SNAPSHOT + + + org.apache.maven + maven-artifact-manager + + + + + org.apache.maven + maven-artifact-manager + + + + diff --git a/maven-core-it/it2002/cvs-project/subproject2/src/main/java/org/apache/maven/it2002/Thing.java b/maven-core-it/it2002/cvs-project/subproject2/src/main/java/org/apache/maven/it2002/Thing.java new file mode 100644 index 0000000000..648241fe22 --- /dev/null +++ b/maven-core-it/it2002/cvs-project/subproject2/src/main/java/org/apache/maven/it2002/Thing.java @@ -0,0 +1,9 @@ +package org.apache.maven.it2002; + +public class Thing +{ + public static final String ROLE = Thing.class.getName(); + + private String type; +} + diff --git a/maven-core-it/it2002/cvs-project/subproject2/src/main/resources/META-INF/plexus/components.xml b/maven-core-it/it2002/cvs-project/subproject2/src/main/resources/META-INF/plexus/components.xml new file mode 100644 index 0000000000..779499a82f --- /dev/null +++ b/maven-core-it/it2002/cvs-project/subproject2/src/main/resources/META-INF/plexus/components.xml @@ -0,0 +1,8 @@ + + + + org.apache.maven.it2002.Thing + org.apache.maven.it2002.Thing + + + \ No newline at end of file diff --git a/maven-core-it/it2002/cvs-project/subproject2/src/test/java/org/apache/maven/it2002/ContainerDependentTest.java b/maven-core-it/it2002/cvs-project/subproject2/src/test/java/org/apache/maven/it2002/ContainerDependentTest.java new file mode 100644 index 0000000000..9280ae56e6 --- /dev/null +++ b/maven-core-it/it2002/cvs-project/subproject2/src/test/java/org/apache/maven/it2002/ContainerDependentTest.java @@ -0,0 +1,20 @@ +package org.apache.maven.it2002; + +import org.apache.maven.artifact.resolver.ArtifactResolver; +import org.codehaus.plexus.PlexusTestCase; + +public class ContainerDependentTest extends PlexusTestCase +{ + + public void testOne() throws Exception + { + ArtifactResolver resolver = (ArtifactResolver) lookup( ArtifactResolver.ROLE ); + + assertNotNull( resolver ); + + Thing thing = (Thing) lookup( Thing.ROLE ); + + assertNotNull( thing ); + } + +} diff --git a/maven-core-it/it2002/test-cvs.sh b/maven-core-it/it2002/test-cvs.sh new file mode 100755 index 0000000000..d5706f2666 --- /dev/null +++ b/maven-core-it/it2002/test-cvs.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +rm -Rf target + +mkdir target + +dir=`readlink -f ${PWD}` + +if [ "$1" == "windows" ]; then + dir=`cygpath -m $dir` + echo setting dir to $dir +fi + +export CVSROOT=:ext:localhost:$dir/target/cvsroot + +cvs init +ret=$?; if [ $ret != 0 ]; then exit $ret; fi + +cd cvs-project +cvs import -I '.svn' -m "import." project ASF INIT +ret=$?; if [ $ret != 0 ]; then exit $ret; fi +cd .. + +cd target +cvs co -d project.checkout project +ret=$?; if [ $ret != 0 ]; then exit $ret; fi + +( +cd project.checkout + +cat pom.xml | sed "s#\${project.file.parentFile.parentFile}#$dir#g" >tmp +mv tmp pom.xml + +cvs ci -m 'update scm' pom.xml +ret=$?; if [ $ret != 0 ]; then exit $ret; fi + +rm -Rf target + +mvn clean install +ret=$?; if [ $ret != 0 ]; then exit $ret; fi + +mvn -DgenerateReleasePoms=true -e release:prepare -Denv=test -B -Dtag=test-tag +ret=$?; if [ $ret != 0 ]; then exit $ret; fi + +mvn -DreleasePom=release-pom.xml -e release:perform -Denv=test +ret=$?; if [ $ret != 0 ]; then exit $ret; fi +)