diff --git a/m2-bootstrap-all.sh b/m2-bootstrap-all.sh index 6b68328..20b6be1 100644 --- a/m2-bootstrap-all.sh +++ b/m2-bootstrap-all.sh @@ -26,13 +26,3 @@ ret=$?; if [ $ret != 0 ]; then exit $ret; fi ret=$?; if [ $ret != 0 ]; then exit $ret; fi ) ret=$?; if [ $ret != 0 ]; then exit $ret; fi - -( - cd ./maven-core-it - echo - echo "Running maven-core integration tests ..." - echo - ./maven-core-it.sh $ARGS - ret=$?; if [ $ret != 0 ]; then exit $ret; fi -) -ret=$?; if [ $ret != 0 ]; then exit $ret; fi diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/deployer/ArtifactDeployerTest.java b/maven-artifact/src/test/java/org/apache/maven/artifact/deployer/ArtifactDeployerTest.java deleted file mode 100644 index 3be443b..0000000 --- a/maven-artifact/src/test/java/org/apache/maven/artifact/deployer/ArtifactDeployerTest.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.apache.maven.artifact.deployer; - -/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed 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.artifact.Artifact; -import org.apache.maven.artifact.ArtifactComponentTestCase; - -import java.io.File; - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public class ArtifactDeployerTest - extends ArtifactComponentTestCase -{ - private ArtifactDeployer artifactDeployer; - - protected void setUp() - throws Exception - { - super.setUp(); - - artifactDeployer = (ArtifactDeployer) lookup( ArtifactDeployer.ROLE ); - } - - protected String component() - { - return "deployer"; - } - - public void testArtifactInstallation() - throws Exception - { - String artifactBasedir = new File( basedir, "src/test/resources/artifact-install" ).getAbsolutePath(); - - Artifact artifact = createArtifact( "artifact", "1.0" ); - - artifactDeployer.deploy( artifactBasedir, artifact, remoteRepository() ); - - assertRemoteArtifactPresent( artifact ); - } -} \ No newline at end of file diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/manager/DefaultWagonManagerTest.java b/maven-artifact/src/test/java/org/apache/maven/artifact/manager/DefaultWagonManagerTest.java deleted file mode 100644 index 59c601f..0000000 --- a/maven-artifact/src/test/java/org/apache/maven/artifact/manager/DefaultWagonManagerTest.java +++ /dev/null @@ -1,74 +0,0 @@ -package org.apache.maven.artifact.manager; - -/* ==================================================================== - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed 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.wagon.UnsupportedProtocolException; -import org.apache.maven.wagon.Wagon; -import org.codehaus.plexus.PlexusTestCase; - -/** - * @author Michal Maczka - * @version $Id$ - */ -public class DefaultWagonManagerTest - extends PlexusTestCase -{ - public void testDefaultWagonManager() - throws Exception - { - WagonManager wagonManager = (WagonManager) lookup( WagonManager.ROLE ); - - Wagon wagon = null; - - try - { - wagon = (Wagon) wagonManager.getWagon( "a" ); - - assertNotNull( wagon ); - - wagon = (Wagon) wagonManager.getWagon( "b1" ); - - assertNotNull( wagon ); - - wagon = (Wagon) wagonManager.getWagon( "b2" ); - - assertNotNull( wagon ); - - wagon = (Wagon) wagonManager.getWagon( "c" ); - - assertNotNull( wagon ); - } - catch ( Exception e ) - { - e.printStackTrace(); - - fail( e.getMessage() ); - } - - try - { - wagon = (Wagon) wagonManager.getWagon( "d" ); - - fail( "Expected :" + UnsupportedProtocolException.class.getName() ); - } - catch ( UnsupportedProtocolException e ) - { - //ok - } - } -} diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/manager/WagonA.java b/maven-artifact/src/test/java/org/apache/maven/artifact/manager/WagonA.java deleted file mode 100644 index dcc6daf..0000000 --- a/maven-artifact/src/test/java/org/apache/maven/artifact/manager/WagonA.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.apache.maven.artifact.manager; - -/* ==================================================================== - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed 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.wagon.providers.file.FileWagon; - -/** - * - * - * @author Jason van Zyl - * - * @version $Id$ - */ -public class WagonA - extends FileWagon -{ - public String[] getSupportedProtocols() - { - return new String[]{ "a" }; - } -} diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/manager/WagonB.java b/maven-artifact/src/test/java/org/apache/maven/artifact/manager/WagonB.java deleted file mode 100644 index 4a41545..0000000 --- a/maven-artifact/src/test/java/org/apache/maven/artifact/manager/WagonB.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.apache.maven.artifact.manager; - -/* ==================================================================== - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed 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.wagon.providers.file.FileWagon; - -/** - * - * - * @author Jason van Zyl - * - * @version $Id$ - */ -public class WagonB - extends FileWagon -{ - public String[] getSupportedProtocols() - { - return new String[]{ "b1", "b2" }; - } -} diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/manager/WagonC.java b/maven-artifact/src/test/java/org/apache/maven/artifact/manager/WagonC.java deleted file mode 100644 index d19378e..0000000 --- a/maven-artifact/src/test/java/org/apache/maven/artifact/manager/WagonC.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.apache.maven.artifact.manager; - -/* ==================================================================== - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed 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.wagon.providers.file.FileWagon; - -/** - * - * - * @author Jason van Zyl - * - * @version $Id$ - */ -public class WagonC - extends FileWagon -{ - public String[] getSupportedProtocols() - { - return new String[]{ "c" }; - } -} diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java b/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java deleted file mode 100644 index e746bb4..0000000 --- a/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java +++ /dev/null @@ -1,224 +0,0 @@ -package org.apache.maven.artifact.resolver; - -/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed 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.artifact.ArtifactComponentTestCase; -import org.apache.maven.artifact.DefaultArtifact; -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.metadata.ArtifactMetadataSource; -import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.codehaus.plexus.util.FileUtils; - -import java.io.File; -import java.io.Writer; -import java.io.FileWriter; -import java.util.Set; -import java.util.HashSet; - -/** - * @author Jason van Zyl - * @version $Id$ - */ - -// It would be cool if there was a hook that i could use to setup a test environment. -// I want to setup a local/remote repositories for testing but i don't want to have -// to change them when i change the layout of the repositories. So i want to generate -// the structure i want to test by using the artifact handler manager which dictates -// the layout used for a particular artifact type. - -public class ArtifactResolverTest - extends ArtifactComponentTestCase -{ - private ArtifactResolver artifactResolver; - - protected void setUp() - throws Exception - { - super.setUp(); - - artifactResolver = (ArtifactResolver) lookup( ArtifactResolver.ROLE ); - } - - protected String component() - { - return "resolver"; - } - - public void testResolutionOfASingleArtifactWhereTheArtifactIsPresentInTheLocalRepository() - throws Exception - { - Artifact a = createLocalArtifact( "a", "1.0" ); - - artifactResolver.resolve( a, remoteRepositories(), localRepository() ); - - assertLocalArtifactPresent( a ); - } - - public void testResolutionOfASingleArtifactWhereTheArtifactIsNotPresentLocallyAndMustBeRetrievedFromTheRemoteRepository() - throws Exception - { - Artifact b = createLocalArtifact( "b", "1.0" ); - - artifactResolver.resolve( b, remoteRepositories(), localRepository() ); - - assertLocalArtifactPresent( b ); - } - - public void testResolutionOfASetOfArtifactsWhereTheArtifactsArePresentInTheLocalRepository() - throws Exception - { - Set artifacts = new HashSet(); - - Artifact c = createLocalArtifact( "c", "1.0" ); - - Artifact d = createLocalArtifact( "d", "1.0" ); - - artifacts.add( c ); - - artifacts.add( d ); - - Set resolvedArtifacts = artifactResolver.resolve( artifacts, remoteRepositories(), localRepository() ); - - assertEquals( 2, resolvedArtifacts.size() ); - - // The artifacts have undergone no transformations and they are present so the original - // artifacts sent into the resolver should be returned as they were sent in. - - assertTrue( resolvedArtifacts.contains( c ) ); - - assertTrue( resolvedArtifacts.contains( d ) ); - } - - public void testResolutionOfASetOfArtifactsWhereTheArtifactsAreNotPresentInTheLocalRepositoryAndMustBeRetrievedFromTheRemoteRepository() - throws Exception - { - Set artifacts = new HashSet(); - - Artifact e = createRemoteArtifact( "e", "1.0" ); - - Artifact f = createRemoteArtifact( "f", "1.0" ); - - artifacts.add( e ); - - artifacts.add( f ); - - Set resolvedArtifacts = artifactResolver.resolve( artifacts, remoteRepositories(), localRepository() ); - - assertEquals( 2, resolvedArtifacts.size() ); - - // The artifacts have undergone no transformations and they are present so the original - // artifacts sent into the resolver should be returned as they were sent in. - - assertTrue( resolvedArtifacts.contains( e ) ); - - assertTrue( resolvedArtifacts.contains( f ) ); - } - - - public void testTransitiveResolutionWhereAllArtifactsArePresentInTheLocalRepository() - throws Exception - { - Artifact g = createLocalArtifact( "g", "1.0" ); - - Artifact h = createLocalArtifact( "h", "1.0" ); - - ArtifactMetadataSource mds = new ArtifactMetadataSource() - { - public Set retrieve( Artifact artifact ) - throws ArtifactMetadataRetrievalException - { - Set dependencies = new HashSet(); - - if ( artifact.getArtifactId().equals( "g" ) ) - { - try - { - dependencies.add( new DefaultArtifact( "maven", "h", "1.0", "jar" ) ); - } - catch ( Exception e ) - { - throw new ArtifactMetadataRetrievalException( "Cannot retrieve metadata." ); - } - } - - return dependencies; - } - }; - - ArtifactResolutionResult result = artifactResolver.resolveTransitively( g, - remoteRepositories(), - localRepository(), - mds ); - - assertEquals( 2, result.getArtifacts().size() ); - - assertTrue( result.getArtifacts().containsKey( g.getId() ) ); - - assertTrue( result.getArtifacts().containsKey( h.getId() ) ); - - assertLocalArtifactPresent( g ); - - assertLocalArtifactPresent( h ); - } - - public void testTransitiveResolutionWhereAllArtifactsAreNotPresentInTheLocalRepositoryAndMustBeRetrievedFromTheRemoteRepository() - throws Exception - { - Artifact i = createRemoteArtifact( "i", "1.0" ); - - Artifact j = createRemoteArtifact( "j", "1.0" ); - - ArtifactMetadataSource mds = new ArtifactMetadataSource() - { - public Set retrieve( Artifact artifact ) - throws ArtifactMetadataRetrievalException - { - Set dependencies = new HashSet(); - - if ( artifact.getArtifactId().equals( "i" ) ) - { - try - { - dependencies.add( new DefaultArtifact( "maven", "j", "1.0", "jar" ) ); - } - catch ( Exception e ) - { - throw new ArtifactMetadataRetrievalException( "Cannot retrieve metadata." ); - } - } - - return dependencies; - } - }; - - ArtifactResolutionResult result = artifactResolver.resolveTransitively( i, - remoteRepositories(), - localRepository(), - mds ); - - assertEquals( 2, result.getArtifacts().size() ); - - assertTrue( result.getArtifacts().containsKey( i.getId() ) ); - - assertTrue( result.getArtifacts().containsKey( j.getId() ) ); - - assertLocalArtifactPresent( i ); - - assertLocalArtifactPresent( j ); - } -} \ No newline at end of file diff --git a/maven-core/pom.xml b/maven-core/pom.xml index 80a11a1..3705b96 100644 --- a/maven-core/pom.xml +++ b/maven-core/pom.xml @@ -47,22 +47,11 @@ ognl 2.5.1 - - - marmalade - marmalade-core - 0.1 - - - marmalade - marmalade-el-ognl - 0.1 - maven wagon-api - 1.0-alpha-1-SNAPSHOT + 0.9-SNAPSHOT diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java index b8cb9a5..6b7555c 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java @@ -267,12 +267,7 @@ public class DefaultPluginManager "maven-plugin", }; - container.addComponent( pluginArtifact, - artifactResolver, - remotePluginRepositories, - localRepository, - sr, - excludes ); + throw new UnsupportedOperationException(); } public void contextualize( Context context ) diff --git a/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginDiscoverer.java b/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginDiscoverer.java index 16a0a66..90db09f 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginDiscoverer.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginDiscoverer.java @@ -75,8 +75,6 @@ public class MavenPluginDiscoverer ComponentSetDescriptor componentSet = new MavenPluginDescriptor( pluginDescriptor ); - componentSet.setId( pluginDescriptor.getId() ); - // ---------------------------------------------------------------------- // If the ComponentSet states any dependencies then we want to collect // them and store them for later use. diff --git a/maven-mboot2/src/main/java/MBoot.java b/maven-mboot2/src/main/java/MBoot.java index 3c63379..bfd09d5 100644 --- a/maven-mboot2/src/main/java/MBoot.java +++ b/maven-mboot2/src/main/java/MBoot.java @@ -61,8 +61,7 @@ public class MBoot "xpp3/jars/xpp3-1.1.3.3.jar", "xstream/jars/xstream-1.0-SNAPSHOT.jar", "maven/jars/maven-artifact-2.0-SNAPSHOT.jar", - "maven/jars/wagon-api-1.0-alpha-1-SNAPSHOT.jar", - "maven/jars/wagon-http-lightweight-1.0-alpha-1-SNAPSHOT.jar" + "maven/jars/wagon-api-0.9-SNAPSHOT.jar", }; String[] builds = new String[] diff --git a/maven-plugins/maven-install-plugin/pom.xml b/maven-plugins/maven-install-plugin/pom.xml index b885b66..aab54e3 100644 --- a/maven-plugins/maven-install-plugin/pom.xml +++ b/maven-plugins/maven-install-plugin/pom.xml @@ -33,7 +33,7 @@ maven wagon-api - 1.0-alpha-1-SNAPSHOT + 0.9-SNAPSHOT diff --git a/maven-plugins/maven-jar-plugin/pom.xml b/maven-plugins/maven-jar-plugin/pom.xml index f54e2a1..103a6e6 100644 --- a/maven-plugins/maven-jar-plugin/pom.xml +++ b/maven-plugins/maven-jar-plugin/pom.xml @@ -37,7 +37,7 @@ maven wagon-api - 1.0-alpha-1-SNAPSHOT + 0.9-SNAPSHOT diff --git a/maven-plugins/maven-pom-plugin/pom.xml b/maven-plugins/maven-pom-plugin/pom.xml index 82a34c3..3fa3855 100644 --- a/maven-plugins/maven-pom-plugin/pom.xml +++ b/maven-plugins/maven-pom-plugin/pom.xml @@ -31,7 +31,7 @@ maven wagon-api - 1.0-alpha-1-SNAPSHOT + 0.9-SNAPSHOT diff --git a/maven-plugins/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/ResourcesMojoTest.java b/maven-plugins/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/ResourcesMojoTest.java deleted file mode 100644 index c52827a..0000000 --- a/maven-plugins/maven-resources-plugin/src/test/java/org/apache/maven/plugin/resources/ResourcesMojoTest.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.apache.maven.plugin.resources; - -/* ==================================================================== - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed 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.model.Resource; -import org.apache.maven.plugin.PluginTestCase; -import org.apache.maven.project.MavenProjectBuilder; -import org.apache.maven.project.MavenProject; -import org.codehaus.plexus.embed.Embedder; - -import java.io.File; -import java.io.FileWriter; -import java.io.PrintWriter; -import java.util.Collections; -import java.util.Map; -import java.util.HashMap; - -/** - * @author Brett Porter - * @version $Id$ - */ -public class ResourcesMojoTest - extends PluginTestCase -{ - private static final String TEST_DIRECTORY = "target/tests/test-data"; - private static final String OUTPUT_DIRECTORY = "target/tests/output"; - - public ResourcesMojoTest( String s ) - { - super( s ); - } - - protected void setupPlugin() - throws Exception - { - plugin = new ResourcesMojo(); - - // have to mkdir CVS as it can't be in CVS! - File f = new File( basedir, TEST_DIRECTORY + "/CVS" ); - f.mkdirs(); - f = new File( f, "Root" ); - PrintWriter w = new PrintWriter( new FileWriter( f ) ); - w.println( ":local:/cvs/root" ); - w.close(); - - w = new PrintWriter( new FileWriter( new File( basedir, TEST_DIRECTORY + "/test.txt" ) ) ); - w.println( "test data" ); - w.close(); - - // make sure the things in the output directory we test aren't there - f = new File( basedir, OUTPUT_DIRECTORY + "/CVS/Root" ); - f.delete(); - f.getParentFile().delete(); - f = new File( basedir, OUTPUT_DIRECTORY + "/test.txt" ); - f.delete(); - f.getParentFile().delete(); - } - - protected Map getTestParameters() - throws Exception - { - Embedder embedder = new Embedder(); - - //embedder.setClassLoader( Thread.currentThread().getContextClassLoader() ); - - embedder.start(); - - MavenProjectBuilder builder = (MavenProjectBuilder) embedder.lookup( MavenProjectBuilder.ROLE ); - - // TODO: here it would be much nicer to just use resources from some test project.xml file for - // testing the standard resources elements - // MavenProject project = builder.build( new File( basedir, "project.xml" ) ); - - Map parameters = new HashMap(); - - File directory = new File( basedir, TEST_DIRECTORY ); - assertEquals( "sanity check name of directory " + directory, "test-data", directory.getName() ); - - File f = new File( directory, "CVS/Root" ); - assertTrue( "sanity check creation of CVS file " + f, f.exists() ); - f = new File( directory, "test.txt" ); - assertTrue( "sanity check creation of file " + f, f.exists() ); - - Resource r = new Resource(); - r.setDirectory( TEST_DIRECTORY ); - parameters.put( "resources", Collections.singletonList( r ) ); - - f = new File( basedir, OUTPUT_DIRECTORY ); - assertFalse( "sanity check no output directory" + f, f.exists() ); - - parameters.put( "outputDirectory", OUTPUT_DIRECTORY ); - - return parameters; - } - - protected void validatePluginExecution() - throws Exception - { - File f = new File( basedir + "/" + OUTPUT_DIRECTORY, "CVS/Root" ); - assertFalse( "check no creation of CVS file " + f, f.exists() ); - assertFalse( "check no creation of CVS directory " + f, f.getParentFile().exists() ); - f = new File( basedir + "/" + OUTPUT_DIRECTORY, "test.txt" ); - assertTrue( "check creation of resource " + f, f.exists() ); - } -}