804 lines
28 KiB
Diff
804 lines
28 KiB
Diff
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/pom.xml b/maven-artifact/pom.xml
|
|
index fe56608..b1382cd 100644
|
|
--- a/maven-artifact/pom.xml
|
|
+++ b/maven-artifact/pom.xml
|
|
@@ -15,11 +15,6 @@
|
|
<artifactId>wagon-api</artifactId>
|
|
<version>0.9-SNAPSHOT</version>
|
|
</dependency>
|
|
- <dependency>
|
|
- <groupId>maven</groupId>
|
|
- <artifactId>wagon-http-lightweight</artifactId>
|
|
- <version>0.9-SNAPSHOT</version>
|
|
- </dependency>
|
|
<dependency>
|
|
<groupId>plexus</groupId>
|
|
<artifactId>plexus</artifactId>
|
|
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 <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
|
- * @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 <a href="michal.maczka@dimatics.com">Michal Maczka</a>
|
|
- * @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 <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
|
- *
|
|
- * @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 <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
|
- *
|
|
- * @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 <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
|
- *
|
|
- * @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 <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
|
- * @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 @@
|
|
<artifactId>ognl</artifactId>
|
|
<version>2.5.1</version>
|
|
</dependency>
|
|
- <!-- Used to support maven.xml script and goal decorating in general. -->
|
|
- <dependency>
|
|
- <groupId>marmalade</groupId>
|
|
- <artifactId>marmalade-core</artifactId>
|
|
- <version>0.1</version>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>marmalade</groupId>
|
|
- <artifactId>marmalade-el-ognl</artifactId>
|
|
- <version>0.1</version>
|
|
- </dependency>
|
|
<!-- Wagon -->
|
|
<dependency>
|
|
<groupId>maven</groupId>
|
|
<artifactId>wagon-api</artifactId>
|
|
- <version>1.0-alpha-1-SNAPSHOT</version>
|
|
+ <version>0.9-SNAPSHOT</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</project>
|
|
diff --git a/maven-core/src/bin/classworlds.conf b/maven-core/src/bin/classworlds.conf
|
|
index 0acc64a..cf81fd6 100644
|
|
--- a/maven-core/src/bin/classworlds.conf
|
|
+++ b/maven-core/src/bin/classworlds.conf
|
|
@@ -7,8 +7,8 @@ load ${maven.home}/core/plexus-0.16.jar
|
|
load ${maven.home}/core/xstream-1.0-SNAPSHOT.jar
|
|
load ${maven.home}/core/xpp3-1.1.3.3.jar
|
|
load ${maven.home}/core/maven-artifact-2.0-SNAPSHOT.jar
|
|
-load ${maven.home}/core/wagon-api-1.0-alpha-1-SNAPSHOT.jar
|
|
-load ${maven.home}/core/wagon-http-lightweight-1.0-alpha-1-SNAPSHOT.jar
|
|
+load ${maven.home}/core/wagon-api-0.9-SNAPSHOT.jar
|
|
|
|
[plexus.core.maven]
|
|
load ${maven.home}/lib/*.jar
|
|
+load ${maven.home}/core/xstream-1.0-SNAPSHOT.jar
|
|
diff --git a/maven-core/src/bin/m2 b/maven-core/src/bin/m2
|
|
index 0381a43..421c209 100755
|
|
--- a/maven-core/src/bin/m2
|
|
+++ b/maven-core/src/bin/m2
|
|
@@ -53,6 +53,10 @@ if [ -z "$JAVA_HOME" ] ; then
|
|
echo " to the installation directory of java."
|
|
fi
|
|
|
|
+if [ -z "$M2_HOME" ] ; then
|
|
+ M2_HOME="$(dirname "$(realpath "${BASH_SOURCE[0]}")")/.."
|
|
+fi
|
|
+
|
|
if [ "$cygwin" = "true" ]
|
|
then
|
|
M2_HOME=`cygpath -pu "$M2_HOME"`
|
|
@@ -75,4 +79,5 @@ $JAVACMD \
|
|
$MAVEN_OPTS \
|
|
-classpath "$CP" \
|
|
"-Dclassworlds.conf=$CLASSWORLDS_CONF" \
|
|
+ "-Dmaven.home=$M2_HOME" \
|
|
$MAIN_CLASS $@
|
|
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-compiler-plugin/src/main/java/org/apache/maven/plugin/CompilerMojo.java b/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompilerMojo.java
|
|
index 0ed1497..e821d8d 100644
|
|
--- a/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompilerMojo.java
|
|
+++ b/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompilerMojo.java
|
|
@@ -95,19 +95,7 @@ public class CompilerMojo
|
|
}
|
|
}
|
|
|
|
- boolean compilationError = false;
|
|
-
|
|
- for ( Iterator i = messages.iterator(); i.hasNext(); )
|
|
- {
|
|
- CompilerError message = (CompilerError) i.next();
|
|
-
|
|
- if ( message.isError() )
|
|
- {
|
|
- compilationError = true;
|
|
- }
|
|
- }
|
|
-
|
|
- if ( compilationError )
|
|
+ if (!messages.isEmpty())
|
|
{
|
|
response.setExecutionFailure( true, new CompilationFailureResponse( messages ) );
|
|
}
|
|
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 @@
|
|
<dependency>
|
|
<groupId>maven</groupId>
|
|
<artifactId>wagon-api</artifactId>
|
|
- <version>1.0-alpha-1-SNAPSHOT</version>
|
|
+ <version>0.9-SNAPSHOT</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</project>
|
|
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 @@
|
|
<dependency>
|
|
<groupId>maven</groupId>
|
|
<artifactId>wagon-api</artifactId>
|
|
- <version>1.0-alpha-1-SNAPSHOT</version>
|
|
+ <version>0.9-SNAPSHOT</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</project>
|
|
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 @@
|
|
<dependency>
|
|
<groupId>maven</groupId>
|
|
<artifactId>wagon-api</artifactId>
|
|
- <version>1.0-alpha-1-SNAPSHOT</version>
|
|
+ <version>0.9-SNAPSHOT</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</project>
|
|
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 <a href="mailto:brett@apache.org">Brett Porter</a>
|
|
- * @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() );
|
|
- }
|
|
-}
|