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>
@ -117,7 +119,7 @@ public class MavenCli
// ----------------------------------------------------------------------
initializeSystemProperties( commandLine );
if( commandLine.hasOption( CLIManager.ACTIVATE_PROFILES ) )
{
System.setProperty(ProfileActivationUtils.ACTIVE_PROFILE_IDS, commandLine.getOptionValue( CLIManager.ACTIVATE_PROFILES ) );
@ -189,12 +191,12 @@ public class MavenCli
showFatalError( "Unable to read settings.xml", e, showErrors );
return 1;
}
if ( commandLine.hasOption( CLIManager.BATCH_MODE ) )
{
settings.setInteractiveMode( false );
}
if ( commandLine.hasOption( CLIManager.FORCE_PLUGIN_UPDATES ) )
{
settings.getRuntimeInfo().setPluginUpdateOverride( Boolean.TRUE );
@ -397,54 +399,39 @@ public class MavenCli
{
artifactRepositoryFactory.setGlobalSnapshotPolicy( ArtifactRepository.SNAPSHOT_POLICY_ALWAYS );
}
if ( commandLine.hasOption( CLIManager.CHECKSUM_FAILURE_POLICY ) )
{
System.out.println( "+ Enabling strict checksum verification on all artifact downloads.");
artifactRepositoryFactory.setGlobalChecksumPolicy( ArtifactRepository.CHECKSUM_POLICY_FAIL );
}
else if ( commandLine.hasOption( CLIManager.CHECKSUM_WARNING_POLICY ) )
{
System.out.println( "+ Disabling strict checksum verification on all artifact downloads.");
artifactRepositoryFactory.setGlobalChecksumPolicy( ArtifactRepository.CHECKSUM_POLICY_WARN );
}
return localRepository;
}
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() );
}
}
// ----------------------------------------------------------------------
@ -523,15 +510,15 @@ public class MavenCli
public static final char NON_RECURSIVE = 'N';
public static final char UPDATE_SNAPSHOTS = 'U';
public static final char ACTIVATE_PROFILES = 'P';
public static final String FORCE_PLUGIN_UPDATES = "update-plugins";
public static final String SUPPRESS_PLUGIN_UPDATES = "no-plugin-updates";
public static final char CHECKSUM_FAILURE_POLICY = 'C';
public static final char CHECKSUM_WARNING_POLICY = 'c';
public CLIManager()

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 );
}
}