mirror of https://github.com/apache/maven.git
merge changes for rev 193190 from the alpha-3 tag
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@193195 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7999f398e2
commit
b63d6e9d32
|
@ -20,7 +20,7 @@
|
||||||
<target name="initTaskDefs">
|
<target name="initTaskDefs">
|
||||||
<path id="maven.classpath">
|
<path id="maven.classpath">
|
||||||
<!-- don't forget to set the value! -->
|
<!-- don't forget to set the value! -->
|
||||||
<pathelement location="target/maven-artifact-ant-2.0-SNAPSHOT-dep.jar"/>
|
<pathelement location="target/maven-artifact-ant-2.0-alpha-3-dep.jar"/>
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant">
|
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant">
|
||||||
|
@ -63,16 +63,16 @@
|
||||||
<fileset refid="my.dependency.fileset"/>
|
<fileset refid="my.dependency.fileset"/>
|
||||||
</copy>
|
</copy>
|
||||||
|
|
||||||
<artifact:install file="target/maven-artifact-ant-2.0-SNAPSHOT.jar">
|
<artifact:install file="target/maven-artifact-ant-2.0-alpha-3.jar">
|
||||||
<pom refid="maven.project"/>
|
<pom refid="maven.project"/>
|
||||||
</artifact:install>
|
</artifact:install>
|
||||||
|
|
||||||
<artifact:deploy file="target/maven-artifact-ant-2.0-SNAPSHOT.jar">
|
<artifact:deploy file="target/maven-artifact-ant-2.0-alpha-3.jar">
|
||||||
<remoteRepository refid="deploy.repository"/>
|
<remoteRepository refid="deploy.repository"/>
|
||||||
<pom refid="maven.project"/>
|
<pom refid="maven.project"/>
|
||||||
</artifact:deploy>
|
</artifact:deploy>
|
||||||
|
|
||||||
<artifact:deploy file="target/maven-artifact-ant-2.0-SNAPSHOT.jar">
|
<artifact:deploy file="target/maven-artifact-ant-2.0-alpha-3.jar">
|
||||||
<remoteRepository url="scp://localhost/tmp/deployment-repo">
|
<remoteRepository url="scp://localhost/tmp/deployment-repo">
|
||||||
<authentication username="brett" privateKey="${user.home}/.ssh/id_dsa"/>
|
<authentication username="brett" privateKey="${user.home}/.ssh/id_dsa"/>
|
||||||
</remoteRepository>
|
</remoteRepository>
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
<remoteRepository refid="deploy.repository"/>
|
<remoteRepository refid="deploy.repository"/>
|
||||||
</artifact:dependencies>
|
</artifact:dependencies>
|
||||||
|
|
||||||
<artifact:deploy file="target/maven-artifact-ant-2.0-SNAPSHOT.jar">
|
<artifact:deploy file="target/maven-artifact-ant-2.0-alpha-3.jar">
|
||||||
<localRepository refid="local.repository.scm"/>
|
<localRepository refid="local.repository.scm"/>
|
||||||
<remoteRepository refid="deploy.repository"/>
|
<remoteRepository refid="deploy.repository"/>
|
||||||
<pom refid="maven.project"/>
|
<pom refid="maven.project"/>
|
||||||
|
|
|
@ -133,7 +133,7 @@
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<site>
|
<site>
|
||||||
<id>website</id>
|
<id>website</id>
|
||||||
<url>scp://www.apache.org//www/maven.apache.org/m2</url>
|
<url>scp://minotaur.apache.org//www/maven.apache.org/m2</url>
|
||||||
</site>
|
</site>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -28,6 +28,9 @@
|
||||||
<includes>
|
<includes>
|
||||||
<include>maven-core-*.jar</include>
|
<include>maven-core-*.jar</include>
|
||||||
</includes>
|
</includes>
|
||||||
|
<excludes>
|
||||||
|
<exclude>maven-core-*-sources.jar</exclude>
|
||||||
|
</excludes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
</fileSets>
|
</fileSets>
|
||||||
<dependencySets>
|
<dependencySets>
|
||||||
|
@ -35,6 +38,7 @@
|
||||||
<outputDirectory>core</outputDirectory>
|
<outputDirectory>core</outputDirectory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>plexus:plexus-container-default</include>
|
<include>plexus:plexus-container-default</include>
|
||||||
|
<include>plexus:plexus-utils</include>
|
||||||
</includes>
|
</includes>
|
||||||
</dependencySet>
|
</dependencySet>
|
||||||
<dependencySet>
|
<dependencySet>
|
||||||
|
@ -48,7 +52,6 @@
|
||||||
<excludes>
|
<excludes>
|
||||||
<exclude>plexus:plexus-container-default</exclude>
|
<exclude>plexus:plexus-container-default</exclude>
|
||||||
<exclude>classworlds:classworlds</exclude>
|
<exclude>classworlds:classworlds</exclude>
|
||||||
<!-- included in default container - not needed -->
|
|
||||||
<exclude>plexus:plexus-utils</exclude>
|
<exclude>plexus:plexus-utils</exclude>
|
||||||
<!-- transitively picked up via default container - not needed -->
|
<!-- transitively picked up via default container - not needed -->
|
||||||
<exclude>junit:junit</exclude>
|
<exclude>junit:junit</exclude>
|
||||||
|
|
|
@ -55,10 +55,12 @@ import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
||||||
|
@ -416,35 +418,20 @@ public class MavenCli
|
||||||
|
|
||||||
private static void showVersion()
|
private static void showVersion()
|
||||||
{
|
{
|
||||||
// TODO: is there a beter way? Maybe read the manifest?
|
InputStream resourceAsStream;
|
||||||
|
|
||||||
String version = "unknown";
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
for ( Enumeration e = MavenCli.class.getClassLoader().getResources( "/META-INF/maven/pom.xml" );
|
Properties properties = new Properties();
|
||||||
e.hasMoreElements(); )
|
resourceAsStream = MavenCli.class.getClassLoader().getResourceAsStream(
|
||||||
{
|
"META-INF/maven/org.apache.maven/maven-core/pom.properties" );
|
||||||
URL resource = (URL) e.nextElement();
|
properties.load( resourceAsStream );
|
||||||
if ( resource.getPath().indexOf( "maven-core" ) >= 0 )
|
|
||||||
{
|
|
||||||
MavenXpp3Reader reader = new MavenXpp3Reader();
|
|
||||||
Model model = reader.read( new InputStreamReader( resource.openStream() ) );
|
|
||||||
version = model.getVersion();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
System.out.println( "Maven version: " + version );
|
System.out.println( "Maven version: " + properties.getProperty( "version", "unknown" ) );
|
||||||
}
|
}
|
||||||
catch ( IOException e )
|
catch ( IOException e )
|
||||||
{
|
{
|
||||||
System.err.println( "Unable determine version from JAR file: " + e.getMessage() );
|
System.err.println( "Unable determine version from JAR file: " + e.getMessage() );
|
||||||
}
|
}
|
||||||
catch ( XmlPullParserException e )
|
|
||||||
{
|
|
||||||
System.err.println( "Unable to parse POM in JAR file: " + e.getMessage() );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
|
@ -562,7 +562,7 @@ public class DefaultPluginManager
|
||||||
|
|
||||||
ArtifactRepository localRepository = session.getLocalRepository();
|
ArtifactRepository localRepository = session.getLocalRepository();
|
||||||
Set dependencies = metadataSource.retrieve( pluginArtifact, localRepository,
|
Set dependencies = metadataSource.retrieve( pluginArtifact, localRepository,
|
||||||
remoteRepositories );
|
project.getPluginArtifactRepositories() );
|
||||||
|
|
||||||
ArtifactResolutionResult result = artifactResolver.resolveTransitively( dependencies, pluginArtifact,
|
ArtifactResolutionResult result = artifactResolver.resolveTransitively( dependencies, pluginArtifact,
|
||||||
localRepository,
|
localRepository,
|
||||||
|
@ -1057,17 +1057,6 @@ public class DefaultPluginManager
|
||||||
|
|
||||||
artifactResolver.resolve( artifact, remoteArtifactRepositories, localRepository );
|
artifactResolver.resolve( artifact, remoteArtifactRepositories, localRepository );
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: is this really necessary?
|
|
||||||
for ( Iterator it = project.getPluginArtifacts().iterator(); it.hasNext(); )
|
|
||||||
{
|
|
||||||
Artifact artifact = (Artifact) it.next();
|
|
||||||
|
|
||||||
artifactResolver.resolve( artifact, remoteArtifactRepositories, localRepository );
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: is this really necessary?
|
|
||||||
artifactResolver.resolve( project.getParentArtifact(), remoteArtifactRepositories, localRepository );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue