mirror of https://github.com/apache/maven.git
o we simply can't survive right now without inserting plexus utils, we just have too many builds without
declared dependencies on it o cleaning up some unused stuff from the bootstrap git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@534974 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d985970c2a
commit
11a113d316
|
@ -19,11 +19,8 @@ classworlds.version=1.2-alpha-7
|
||||||
plexus-active-collections.version=1.0-beta-1
|
plexus-active-collections.version=1.0-beta-1
|
||||||
plexus.version=1.0-alpha-24
|
plexus.version=1.0-alpha-24
|
||||||
plexus-utils.version=1.4.1
|
plexus-utils.version=1.4.1
|
||||||
plexus-interactivity-api.version=1.0-alpha-6-SNAPSHOT
|
|
||||||
commons-cli.version=1.0
|
commons-cli.version=1.0
|
||||||
commons-lang.version=2.1
|
|
||||||
wagon.version=1.0-beta-2
|
wagon.version=1.0-beta-2
|
||||||
jsch.version=0.1.27
|
|
||||||
doxia.version=1.0-alpha-9-SNAPSHOT
|
doxia.version=1.0-alpha-9-SNAPSHOT
|
||||||
modello.version=1.0-alpha-13
|
modello.version=1.0-alpha-13
|
||||||
junit.version=3.8.1
|
junit.version=3.8.1
|
||||||
|
|
|
@ -121,7 +121,6 @@ under the License.
|
||||||
<pull orgpath="org/codehaus/plexus/plexus-container-default" version="${plexus.version}" name="plexus-container-default" repository="codehaus"/>
|
<pull orgpath="org/codehaus/plexus/plexus-container-default" version="${plexus.version}" name="plexus-container-default" repository="codehaus"/>
|
||||||
<pull orgpath="org/codehaus/plexus/plexus-component-api" version="${plexus.version}" name="plexus-component-api" repository="codehaus"/>
|
<pull orgpath="org/codehaus/plexus/plexus-component-api" version="${plexus.version}" name="plexus-component-api" repository="codehaus"/>
|
||||||
<pull orgpath="org/codehaus/plexus/plexus-classworlds" version="${classworlds.version}" name="plexus-classworlds" repository="codehaus"/>
|
<pull orgpath="org/codehaus/plexus/plexus-classworlds" version="${classworlds.version}" name="plexus-classworlds" repository="codehaus"/>
|
||||||
<pull orgpath="org/codehaus/plexus/plexus-interactivity-api" version="${plexus-interactivity-api.version}" name="plexus-interactivity-api" repository="codehaus"/>
|
|
||||||
<pull orgpath="org/apache/maven/maven-parent" version="4" name="maven-parent" type="pom"/>
|
<pull orgpath="org/apache/maven/maven-parent" version="4" name="maven-parent" type="pom"/>
|
||||||
<pull orgpath="org/apache/maven/plugins/maven-plugins" version="4-SNAPSHOT" name="maven-plugins" type="pom"/>
|
<pull orgpath="org/apache/maven/plugins/maven-plugins" version="4-SNAPSHOT" name="maven-plugins" type="pom"/>
|
||||||
<pull orgpath="org/apache/apache" version="3" name="apache" type="pom"/>
|
<pull orgpath="org/apache/apache" version="3" name="apache" type="pom"/>
|
||||||
|
@ -131,11 +130,6 @@ under the License.
|
||||||
<pull orgpath="org/apache/maven/wagon/wagon-http-shared" version="${wagon.version}" name="wagon-http-shared"/>
|
<pull orgpath="org/apache/maven/wagon/wagon-http-shared" version="${wagon.version}" name="wagon-http-shared"/>
|
||||||
<pull orgpath="org/apache/maven/wagon/wagon-http-lightweight" version="${wagon.version}" name="wagon-http-lightweight"/>
|
<pull orgpath="org/apache/maven/wagon/wagon-http-lightweight" version="${wagon.version}" name="wagon-http-lightweight"/>
|
||||||
<pull orgpath="org/apache/maven/wagon/wagon-provider-api" version="${wagon.version}" name="wagon-provider-api"/>
|
<pull orgpath="org/apache/maven/wagon/wagon-provider-api" version="${wagon.version}" name="wagon-provider-api"/>
|
||||||
<pull orgpath="org/apache/maven/wagon/wagon-ssh-external" version="${wagon.version}" name="wagon-ssh-external"/>
|
|
||||||
<pull orgpath="org/apache/maven/wagon/wagon-ssh-common" version="${wagon.version}" name="wagon-ssh-common"/>
|
|
||||||
<pull orgpath="org/apache/maven/wagon/wagon-ssh" version="${wagon.version}" name="wagon-ssh"/>
|
|
||||||
<pull orgpath="commons-lang/commons-lang" version="${commons-lang.version}" name="commons-lang"/>
|
|
||||||
<pull orgpath="com/jcraft/jsch" version="${jsch.version}" name="jsch"/>
|
|
||||||
<!-- Wagon Deps (End) -->
|
<!-- Wagon Deps (End) -->
|
||||||
<pull orgpath="org/apache/maven/doxia/doxia-sink-api" version="${doxia.version}" name="doxia-sink-api"/>
|
<pull orgpath="org/apache/maven/doxia/doxia-sink-api" version="${doxia.version}" name="doxia-sink-api"/>
|
||||||
<pull orgpath="org/codehaus/modello/modello-core" version="${modello.version}" name="modello-core" repository="codehaus"/>
|
<pull orgpath="org/codehaus/modello/modello-core" version="${modello.version}" name="modello-core" repository="codehaus"/>
|
||||||
|
|
|
@ -20,11 +20,10 @@ package org.apache.maven.extension;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.apache.maven.ArtifactFilterManager;
|
import org.apache.maven.ArtifactFilterManager;
|
||||||
import org.apache.maven.wagon.Wagon;
|
|
||||||
import org.apache.maven.artifact.Artifact;
|
import org.apache.maven.artifact.Artifact;
|
||||||
import org.apache.maven.artifact.ArtifactUtils;
|
import org.apache.maven.artifact.ArtifactUtils;
|
||||||
import org.apache.maven.artifact.manager.WagonManager;
|
|
||||||
import org.apache.maven.artifact.factory.ArtifactFactory;
|
import org.apache.maven.artifact.factory.ArtifactFactory;
|
||||||
|
import org.apache.maven.artifact.manager.WagonManager;
|
||||||
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
|
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
|
||||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||||
import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
|
import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
|
||||||
|
@ -39,7 +38,6 @@ import org.apache.maven.project.MavenProject;
|
||||||
import org.codehaus.plexus.PlexusConstants;
|
import org.codehaus.plexus.PlexusConstants;
|
||||||
import org.codehaus.plexus.PlexusContainer;
|
import org.codehaus.plexus.PlexusContainer;
|
||||||
import org.codehaus.plexus.PlexusContainerException;
|
import org.codehaus.plexus.PlexusContainerException;
|
||||||
import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
|
|
||||||
import org.codehaus.plexus.context.Context;
|
import org.codehaus.plexus.context.Context;
|
||||||
import org.codehaus.plexus.context.ContextException;
|
import org.codehaus.plexus.context.ContextException;
|
||||||
import org.codehaus.plexus.logging.AbstractLogEnabled;
|
import org.codehaus.plexus.logging.AbstractLogEnabled;
|
||||||
|
|
|
@ -455,6 +455,8 @@ public class DefaultPluginManager
|
||||||
pluginArtifact.getId() + "': " + e.getMessage(), pluginArtifact, e );
|
pluginArtifact.getId() + "': " + e.getMessage(), pluginArtifact, e );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkPlexusUtils( resolutionGroup, artifactFactory );
|
||||||
|
|
||||||
Set dependencies = new HashSet( resolutionGroup.getArtifacts() );
|
Set dependencies = new HashSet( resolutionGroup.getArtifacts() );
|
||||||
|
|
||||||
List repositories = new ArrayList();
|
List repositories = new ArrayList();
|
||||||
|
@ -1316,4 +1318,54 @@ public class DefaultPluginManager
|
||||||
|
|
||||||
return container.lookupMap( role, pluginRealm );
|
return container.lookupMap( role, pluginRealm );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void checkPlexusUtils( ResolutionGroup resolutionGroup, ArtifactFactory artifactFactory )
|
||||||
|
{
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// If the plugin already declares a dependency on plexus-utils then we're all
|
||||||
|
// set as the plugin author is aware of its use. If we don't have a dependency
|
||||||
|
// on plexus-utils then we must protect users from stupid plugin authors who
|
||||||
|
// did not declare a direct dependency on plexus-utils because the version
|
||||||
|
// Maven uses is hidden from downstream use. We will also bump up any
|
||||||
|
// anything below 1.1 to 1.1 as this mimics the behaviour in 2.0.5 where
|
||||||
|
// plexus-utils 1.1 was being forced into use.
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
VersionRange vr = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
vr = VersionRange.createFromVersionSpec( "[1.1,)" );
|
||||||
|
}
|
||||||
|
catch ( InvalidVersionSpecificationException e )
|
||||||
|
{
|
||||||
|
// Won't happen
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean plexusUtilsPresent = false;
|
||||||
|
|
||||||
|
for ( Iterator i = resolutionGroup.getArtifacts().iterator(); i.hasNext(); )
|
||||||
|
{
|
||||||
|
Artifact a = (Artifact) i.next();
|
||||||
|
|
||||||
|
if ( a.getArtifactId().equals( "plexus-utils" ) &&
|
||||||
|
vr.containsVersion( new DefaultArtifactVersion( a.getVersion() ) ) )
|
||||||
|
{
|
||||||
|
plexusUtilsPresent = true;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !plexusUtilsPresent )
|
||||||
|
{
|
||||||
|
// We will add plexus-utils as every plugin was getting this anyway from Maven itself. We will set the
|
||||||
|
// version to the latest version we know that works as of the 2.0.6 release. We set the scope to runtime
|
||||||
|
// as this is what's implicitly happening in 2.0.6.
|
||||||
|
|
||||||
|
resolutionGroup.getArtifacts().add( artifactFactory.createArtifact( "org.codehaus.plexus",
|
||||||
|
"plexus-utils", "1.1",
|
||||||
|
Artifact.SCOPE_RUNTIME, "jar" ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,7 @@ import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Properties;
|
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>
|
||||||
* @version $Id: PluginParameterExpressionEvaluatorTest.java,v 1.5 2005/03/08
|
* @version $Id: PluginParameterExpressionEvaluatorTest.java,v 1.5 2005/03/08
|
||||||
|
|
Loading…
Reference in New Issue