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:
Brett Leslie Porter 2005-06-23 18:33:19 +00:00
parent 7999f398e2
commit b63d6e9d32
5 changed files with 31 additions and 52 deletions

View File

@ -20,7 +20,7 @@
<target name="initTaskDefs">
<path id="maven.classpath">
<!-- 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>
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant">
@ -63,16 +63,16 @@
<fileset refid="my.dependency.fileset"/>
</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"/>
</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"/>
<pom refid="maven.project"/>
</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">
<authentication username="brett" privateKey="${user.home}/.ssh/id_dsa"/>
</remoteRepository>
@ -128,7 +128,7 @@
<remoteRepository refid="deploy.repository"/>
</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"/>
<remoteRepository refid="deploy.repository"/>
<pom refid="maven.project"/>

View File

@ -133,7 +133,7 @@
<distributionManagement>
<site>
<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>
</distributionManagement>
<build>

View File

@ -28,6 +28,9 @@
<includes>
<include>maven-core-*.jar</include>
</includes>
<excludes>
<exclude>maven-core-*-sources.jar</exclude>
</excludes>
</fileSet>
</fileSets>
<dependencySets>
@ -35,6 +38,7 @@
<outputDirectory>core</outputDirectory>
<includes>
<include>plexus:plexus-container-default</include>
<include>plexus:plexus-utils</include>
</includes>
</dependencySet>
<dependencySet>
@ -48,7 +52,6 @@
<excludes>
<exclude>plexus:plexus-container-default</exclude>
<exclude>classworlds:classworlds</exclude>
<!-- included in default container - not needed -->
<exclude>plexus:plexus-utils</exclude>
<!-- transitively picked up via default container - not needed -->
<exclude>junit:junit</exclude>

View File

@ -55,10 +55,12 @@ import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.InputStream;
import java.net.URL;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import java.util.Properties;
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
@ -416,35 +418,20 @@ public class MavenCli
private static void showVersion()
{
// TODO: is there a beter way? Maybe read the manifest?
String version = "unknown";
InputStream resourceAsStream;
try
{
for ( Enumeration e = MavenCli.class.getClassLoader().getResources( "/META-INF/maven/pom.xml" );
e.hasMoreElements(); )
{
URL resource = (URL) e.nextElement();
if ( resource.getPath().indexOf( "maven-core" ) >= 0 )
{
MavenXpp3Reader reader = new MavenXpp3Reader();
Model model = reader.read( new InputStreamReader( resource.openStream() ) );
version = model.getVersion();
break;
}
}
Properties properties = new Properties();
resourceAsStream = MavenCli.class.getClassLoader().getResourceAsStream(
"META-INF/maven/org.apache.maven/maven-core/pom.properties" );
properties.load( resourceAsStream );
System.out.println( "Maven version: " + version );
System.out.println( "Maven version: " + properties.getProperty( "version", "unknown" ) );
}
catch ( IOException e )
{
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() );
}
}
// ----------------------------------------------------------------------

View File

@ -562,7 +562,7 @@ public class DefaultPluginManager
ArtifactRepository localRepository = session.getLocalRepository();
Set dependencies = metadataSource.retrieve( pluginArtifact, localRepository,
remoteRepositories );
project.getPluginArtifactRepositories() );
ArtifactResolutionResult result = artifactResolver.resolveTransitively( dependencies, pluginArtifact,
localRepository,
@ -1057,17 +1057,6 @@ public class DefaultPluginManager
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 );
}
}