Files
BefatorNix/maven/maven_2-bootstrap-4.patch
T
2026-08-28 19:53:27 +02:00

302 lines
13 KiB
Diff

diff --git a/m2-bootstrap-all.sh b/m2-bootstrap-all.sh
index b771312..e219bab 100644
--- a/m2-bootstrap-all.sh
+++ b/m2-bootstrap-all.sh
@@ -30,13 +30,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/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java
index eb5fb5d..da807de 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java
@@ -23,6 +23,9 @@ public interface ArtifactResolver
Artifact resolve( Artifact artifact, List remoteRepositories, ArtifactRepository localRepository )
throws ArtifactResolutionException;
+ Artifact resolve( Artifact artifact, Set remoteRepositories, ArtifactRepository localRepository )
+ throws ArtifactResolutionException;
+
ArtifactResolutionResult resolveTransitively( Artifact artifact, List remoteRepositories,
ArtifactRepository localRepository, ArtifactMetadataSource source ) throws ArtifactResolutionException;
@@ -36,7 +39,11 @@ public interface ArtifactResolver
ArtifactRepository localRepository, ArtifactMetadataSource source, ArtifactFilter filter )
throws ArtifactResolutionException;
+ ArtifactResolutionResult resolveTransitively( Set artifacts, Set remoteRepositories,
+ ArtifactRepository localRepository, ArtifactMetadataSource source, ArtifactFilter filter )
+ throws ArtifactResolutionException;
+
void addArtifactRequestTransformation(
org.apache.maven.artifact.resolver.transform.ArtifactRequestTransformation requestTransformation );
-}
\ No newline at end of file
+}
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
index c7c7bf2..138c6c4 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
@@ -11,6 +11,7 @@ import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
import org.apache.maven.artifact.resolver.transform.ArtifactRequestTransformation;
import org.apache.maven.wagon.TransferFailedException;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -44,6 +45,10 @@ public class DefaultArtifactResolver
// Implementation
// ----------------------------------------------------------------------
+ public Artifact resolve(Artifact artifact, Set remoteRepositories, ArtifactRepository localRepository) throws ArtifactResolutionException {
+ return resolve(artifact, new ArrayList(remoteRepositories), localRepository);
+ }
+
public Artifact resolve( Artifact artifact, List remoteRepositories, ArtifactRepository localRepository )
throws ArtifactResolutionException
{
@@ -132,6 +137,13 @@ public class DefaultArtifactResolver
// Transitive modes
// ----------------------------------------------------------------------
+ public ArtifactResolutionResult resolveTransitively( Set artifacts, Set remoteRepositories,
+ ArtifactRepository localRepository, ArtifactMetadataSource source, ArtifactFilter filter )
+ throws ArtifactResolutionException
+ {
+ return resolveTransitively(artifacts, new ArrayList(remoteRepositories), localRepository, source, filter);
+ }
+
public ArtifactResolutionResult resolveTransitively( Set artifacts, List remoteRepositories,
ArtifactRepository localRepository, ArtifactMetadataSource source, ArtifactFilter filter )
throws ArtifactResolutionException
@@ -287,4 +299,4 @@ public class DefaultArtifactResolver
{
}
-}
\ No newline at end of file
+}
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/filter/ArtifactFilter.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/filter/ArtifactFilter.java
index 779d879..9ac5077 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/filter/ArtifactFilter.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/filter/ArtifactFilter.java
@@ -27,4 +27,6 @@ public interface ArtifactFilter
//TODO(JVZ): change the signature of this to filter(Artifact) where the meaning of filter is
// to exclude. I did this backward and it's confusing.
boolean include( Artifact artifact );
+
+ boolean include( String artifactId );
}
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/filter/ExclusionSetFilter.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/filter/ExclusionSetFilter.java
index f146b18..43c7097 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/filter/ExclusionSetFilter.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/filter/ExclusionSetFilter.java
@@ -50,4 +50,14 @@ public class ExclusionSetFilter
return true;
}
+
+ public boolean include( String artifactId )
+ {
+ if ( excludes.contains( artifactId ) )
+ {
+ return false;
+ }
+
+ return true;
+ }
}
diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index 4161ee1..33a5bb3 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -75,41 +75,6 @@
<type>jar</type>
<scope>compile</scope>
</dependency>
- <dependency>
- <groupId>maven</groupId>
- <artifactId>wagon-http-lightweight</artifactId>
- <version>1.0-alpha-2-SNAPSHOT</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>plexus</groupId>
- <artifactId>plexus-marmalade-factory</artifactId>
- <version>1.0-alpha-2-SNAPSHOT</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>maven</groupId>
- <artifactId>maven-script-marmalade</artifactId>
- <version>2.0-SNAPSHOT</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>marmalade</groupId>
- <artifactId>marmalade-core</artifactId>
- <version>1.0-alpha2-SNAPSHOT</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>xpp3</groupId>
- <artifactId>xpp3</artifactId>
- <version>1.1.3.3</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
</dependencies>
<reports>
<plugins>
@@ -129,4 +94,4 @@
<url>scp://www.apache.org//www/maven.apache.org/m2</url>
</site>
</distributionManagement>
-</model>
\ No newline at end of file
+</model>
diff --git a/maven-core/src/bin/m2 b/maven-core/src/bin/m2
index eca5aa1..1005f12 100755
--- a/maven-core/src/bin/m2
+++ b/maven-core/src/bin/m2
@@ -5,6 +5,14 @@
# All rights reserved.
# -----------------------------------------------------------------------------
+if [ -z "$M2_HOME" ]; then
+ #find the path of the bin directory
+ BIN_DIR=`dirname $0`
+
+ #use dirname once again to trim the /bin from the m2_home path
+ M2_HOME=`dirname $BIN_DIR`
+fi
+
#@#
CLASSWORLDS_JAR=${M2_HOME}/core/boot/classworlds-*.jar
CLASSWORLDS_CONF=${M2_HOME}/bin/m2.conf
@@ -63,14 +71,6 @@ if $cygwin; then
[ -n "$M2_HOME" ] && M2_HOME=`cygpath --path --unix "$M2_HOME"`
fi
-if [ -z "$M2_HOME" ]; then
- #find the path of the bin directory
- BIN_DIR=`dirname $0`
-
- #use dirname once again to trim the /bin from the m2_home path
- M2_HOME=`dirname $BIN_DIR`
-fi
-
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
[ -n "$CLASSWORLDS_JAR" ] && CLASSWORLDS_JAR=`cygpath --path --windows "$CLASSWORLDS_JAR"`
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 896701c..a58ca05 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
@@ -282,7 +282,7 @@ public class DefaultPluginManager
MavenMetadataSource metadataSource = new MavenMetadataSource( artifactResolver, mavenProjectBuilder );
( (ArtifactEnabledContainer) container ).addComponent( pluginArtifact, artifactResolver,
- remotePluginRepositories,
+ new HashSet(remotePluginRepositories),
session.getLocalRepository(), metadataSource,
artifactFilter );
}
diff --git a/maven-core/src/main/resources/META-INF/plexus/plexus.xml b/maven-core/src/main/resources/META-INF/plexus/plexus.xml
index 3a4c4b4..9045132 100644
--- a/maven-core/src/main/resources/META-INF/plexus/plexus.xml
+++ b/maven-core/src/main/resources/META-INF/plexus/plexus.xml
@@ -9,13 +9,6 @@
<component-discoverer implementation="org.apache.maven.plugin.MavenPluginDiscoverer"/>
</component-discoverers>
</component-discoverer-manager>
- <component-factory-manager implementation="org.codehaus.plexus.component.factory.DefaultComponentFactoryManager">
- <component-factories>
- <component-factory implementation="org.codehaus.plexus.component.factory.marmalade.MarmaladeClasspathComponentFactory">
- <id>marmalade</id>
- </component-factory>
- </component-factories>
- </component-factory-manager>
<components>
<component>
<role>org.apache.maven.plugin.PluginManager</role>
diff --git a/maven-mboot2/src/main/java/MBoot.java b/maven-mboot2/src/main/java/MBoot.java
index 4839007..8274fb8 100644
--- a/maven-mboot2/src/main/java/MBoot.java
+++ b/maven-mboot2/src/main/java/MBoot.java
@@ -49,7 +49,7 @@ public class MBoot
// These are plexus' runtime dependencies
// ----------------------------------------------------------------------
- String[] plexusDeps = new String[]{"classworlds/jars/classworlds-1.1-alpha-1.jar",
+ String[] plexusDeps = new String[]{"classworlds/jars/classworlds-1.1-SNAPSHOT.jar",
"plexus/jars/plexus-container-default-1.0-alpha-2-SNAPSHOT.jar"};
String[] pluginGeneratorDeps = new String[]{"plexus/jars/plexus-container-default-1.0-alpha-2-SNAPSHOT.jar",
@@ -64,7 +64,7 @@ public class MBoot
// These are modello's runtime dependencies
// ----------------------------------------------------------------------
- String[] modelloDeps = new String[]{"classworlds/jars/classworlds-1.1-alpha-1.jar",
+ String[] modelloDeps = new String[]{"classworlds/jars/classworlds-1.1-SNAPSHOT.jar",
//"plexus/jars/plexus-container-api-1.0-alpha-1-SNAPSHOT.jar",
"plexus/jars/plexus-container-default-1.0-alpha-2-SNAPSHOT.jar",
//"plexus/jars/plexus-utils-1.0-alpha-1-SNAPSHOT.jar",
@@ -74,11 +74,11 @@ public class MBoot
"modello/jars/modello-xpp3-plugin-1.0-SNAPSHOT.jar"};
String[] builds = new String[]{"maven-model", "maven-user-model", "maven-monitor", "maven-plugin",
- "maven-artifact", "maven-script/maven-script-marmalade", "maven-core",
+ "maven-artifact", "maven-core",
"maven-archiver", "maven-plugin-tools/maven-plugin-tools-api",
"maven-plugin-tools/maven-plugin-tools-java",
"maven-plugin-tools/maven-plugin-tools-pluggy",
- "maven-plugin-tools/maven-plugin-tools-marmalade", "maven-core-it-support",
+ "maven-core-it-support",
"maven-core-it-verifier"};
String[] pluginBuilds = new String[]{"maven-plugins/maven-clean-plugin", "maven-plugins/maven-compiler-plugin",
@@ -1646,4 +1646,4 @@ public class MBoot
return this.directory;
}
}
-}
\ No newline at end of file
+}
diff --git a/pom.xml b/pom.xml
index 824eec8..879dbad 100644
--- a/pom.xml
+++ b/pom.xml
@@ -75,7 +75,7 @@
<dependency>
<groupId>classworlds</groupId>
<artifactId>classworlds</artifactId>
- <version>1.1-alpha-1</version>
+ <version>1.1-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
@@ -103,4 +103,4 @@
<url>scp://repo1.maven.org/home/projects/maven/repository/ibiblio-v2</url>
</repository>
</distributionManagement>
-</model>
\ No newline at end of file
+</model>