mirror of https://github.com/apache/maven.git
PR: MNG-52
change type of maven plugins to "maven-plugin" instead of plugin. This should allow other products to have different plugin types, if necessary. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163562 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5914d6c19b
commit
5c1f5b1e57
|
@ -30,6 +30,6 @@ public class PluginHandler
|
|||
|
||||
public String directory()
|
||||
{
|
||||
return "plugins";
|
||||
return "maven-plugins";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
|
||||
<component>
|
||||
<role>org.apache.maven.artifact.handler.ArtifactHandler</role>
|
||||
<role-hint>plugin</role-hint>
|
||||
<role-hint>maven-plugin</role-hint>
|
||||
<implementation>org.apache.maven.artifact.handler.PluginHandler</implementation>
|
||||
</component>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>maven</groupId>
|
||||
<artifactId>maven-it0013-plugin</artifactId>
|
||||
<packaging>plugin</packaging>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
@ -20,4 +20,4 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</model>
|
||||
</model>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>maven</groupId>
|
||||
<artifactId>maven-it0015-plugin</artifactId>
|
||||
<packaging>plugin</packaging>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
@ -38,4 +38,4 @@
|
|||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
</model>
|
||||
</model>
|
||||
|
|
|
@ -83,9 +83,9 @@ public class DefaultPluginManager
|
|||
protected ArtifactFilter artifactFilter;
|
||||
|
||||
protected PathTranslator pathTranslator;
|
||||
|
||||
|
||||
protected ArtifactRepositoryFactory artifactRepositoryFactory;
|
||||
|
||||
|
||||
protected UserModelBuilder userModelBuilder;
|
||||
|
||||
public DefaultPluginManager()
|
||||
|
@ -135,7 +135,8 @@ public class DefaultPluginManager
|
|||
|
||||
private Set pluginsInProcess = new HashSet();
|
||||
|
||||
public void processPluginDescriptor( MavenPluginDescriptor mavenPluginDescriptor ) throws CycleDetectedException
|
||||
public void processPluginDescriptor( MavenPluginDescriptor mavenPluginDescriptor )
|
||||
throws CycleDetectedException
|
||||
{
|
||||
if ( pluginsInProcess.contains( mavenPluginDescriptor.getPluginId() ) )
|
||||
{
|
||||
|
@ -206,7 +207,8 @@ public class DefaultPluginManager
|
|||
}
|
||||
|
||||
// TODO: don't throw Exception
|
||||
public void verifyPluginForGoal( String goalName, MavenSession session ) throws Exception
|
||||
public void verifyPluginForGoal( String goalName, MavenSession session )
|
||||
throws Exception
|
||||
{
|
||||
String pluginId = getPluginId( goalName );
|
||||
|
||||
|
@ -215,7 +217,8 @@ public class DefaultPluginManager
|
|||
}
|
||||
|
||||
// TODO: don't throw Exception
|
||||
public void verifyPlugin( String groupId, String artifactId, MavenSession session ) throws Exception
|
||||
public void verifyPlugin( String groupId, String artifactId, MavenSession session )
|
||||
throws Exception
|
||||
{
|
||||
if ( !isPluginInstalled( groupId, artifactId ) )
|
||||
{
|
||||
|
@ -260,8 +263,9 @@ public class DefaultPluginManager
|
|||
|
||||
artifactFactory = (ArtifactFactory) container.lookup( ArtifactFactory.ROLE );
|
||||
|
||||
Artifact pluginArtifact = artifactFactory.createArtifact( "maven", artifactId, version, null, "plugin",
|
||||
"jar", null );
|
||||
// TODO: more hard coding here...
|
||||
Artifact pluginArtifact = artifactFactory.createArtifact( "maven", artifactId, version, null,
|
||||
"maven-plugin", "jar", null );
|
||||
|
||||
addPlugin( pluginArtifact, session );
|
||||
}
|
||||
|
@ -276,7 +280,8 @@ public class DefaultPluginManager
|
|||
}
|
||||
|
||||
// TODO: don't throw Exception
|
||||
protected void addPlugin( Artifact pluginArtifact, MavenSession session ) throws Exception
|
||||
protected void addPlugin( Artifact pluginArtifact, MavenSession session )
|
||||
throws Exception
|
||||
{
|
||||
ArtifactResolver artifactResolver = null;
|
||||
MavenProjectBuilder mavenProjectBuilder = null;
|
||||
|
@ -424,7 +429,8 @@ public class DefaultPluginManager
|
|||
}
|
||||
|
||||
// TODO: don't throw Exception
|
||||
private void releaseComponents( MojoDescriptor goal, PluginExecutionRequest request ) throws Exception
|
||||
private void releaseComponents( MojoDescriptor goal, PluginExecutionRequest request )
|
||||
throws Exception
|
||||
{
|
||||
if ( request != null && request.getParameters() != null )
|
||||
{
|
||||
|
@ -470,8 +476,8 @@ public class DefaultPluginManager
|
|||
String expression = parameter.getExpression();
|
||||
|
||||
Object value = PluginParameterExpressionEvaluator.evaluate( expression, session );
|
||||
|
||||
getLogger().debug("Evaluated mojo parameter expression: \'" + expression + "\' to: " + value);
|
||||
|
||||
getLogger().debug( "Evaluated mojo parameter expression: \'" + expression + "\' to: " + value );
|
||||
|
||||
if ( value == null )
|
||||
{
|
||||
|
@ -485,7 +491,7 @@ public class DefaultPluginManager
|
|||
|
||||
if ( type != null && ( type.equals( "File" ) || type.equals( "java.io.File" ) ) )
|
||||
{
|
||||
value = pathTranslator.alignToBaseDirectory( (String)value,
|
||||
value = pathTranslator.alignToBaseDirectory( (String) value,
|
||||
session.getProject().getFile().getParentFile() );
|
||||
}
|
||||
|
||||
|
@ -555,8 +561,8 @@ public class DefaultPluginManager
|
|||
{
|
||||
StringBuffer message = new StringBuffer();
|
||||
|
||||
message.append( "The '" + parameter.getName() ).append( "' parameter is required for the execution of the " )
|
||||
.append( mojo.getId() ).append( " mojo and cannot be null." );
|
||||
message.append( "The '" + parameter.getName() ).append( "' parameter is required for the execution of the " ).append(
|
||||
mojo.getId() ).append( " mojo and cannot be null." );
|
||||
|
||||
return message.toString();
|
||||
}
|
||||
|
@ -565,7 +571,8 @@ public class DefaultPluginManager
|
|||
// Lifecycle
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
public void contextualize( Context context ) throws ContextException
|
||||
public void contextualize( Context context )
|
||||
throws ContextException
|
||||
{
|
||||
container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
|
||||
}
|
||||
|
@ -573,18 +580,11 @@ public class DefaultPluginManager
|
|||
public void initialize()
|
||||
{
|
||||
// TODO: configure this from bootstrap or scan lib
|
||||
artifactFilter = new ExclusionSetFilter( new String[] {
|
||||
"maven-core",
|
||||
"maven-artifact",
|
||||
"maven-model",
|
||||
"maven-user-model",
|
||||
"maven-monitor",
|
||||
"maven-plugin",
|
||||
"plexus-container-api",
|
||||
"plexus-container-default",
|
||||
"plexus-artifact-container",
|
||||
"wagon-provider-api",
|
||||
"classworlds" } );
|
||||
artifactFilter = new ExclusionSetFilter( new String[]{"maven-core", "maven-artifact", "maven-model",
|
||||
"maven-user-model", "maven-monitor", "maven-plugin",
|
||||
"plexus-container-api", "plexus-container-default",
|
||||
"plexus-artifact-container", "wagon-provider-api",
|
||||
"classworlds"} );
|
||||
|
||||
// TODO: move this to be configurable from the Maven component
|
||||
remotePluginRepositories = new ArrayList();
|
||||
|
@ -601,13 +601,14 @@ public class DefaultPluginManager
|
|||
// TODO: Warn about this failure.
|
||||
userModel = new UserModel();
|
||||
}
|
||||
|
||||
|
||||
Repository pluginRepo = new Repository();
|
||||
pluginRepo.setId( "plugin-repository" );
|
||||
pluginRepo.setUrl( "http://repo1.maven.org" );
|
||||
|
||||
ArtifactRepository pluginRepository = artifactRepositoryFactory.createArtifactRepository( pluginRepo, userModel );
|
||||
|
||||
|
||||
ArtifactRepository pluginRepository = artifactRepositoryFactory.createArtifactRepository( pluginRepo,
|
||||
userModel );
|
||||
|
||||
remotePluginRepositories.add( pluginRepository );
|
||||
}
|
||||
|
||||
|
@ -616,7 +617,7 @@ public class DefaultPluginManager
|
|||
// ----------------------------------------------------------------------
|
||||
|
||||
private void resolveTransitiveDependencies( MavenSession context, ArtifactResolver artifactResolver,
|
||||
MavenProjectBuilder mavenProjectBuilder )
|
||||
MavenProjectBuilder mavenProjectBuilder )
|
||||
throws ArtifactResolutionException
|
||||
{
|
||||
MavenProject project = context.getProject();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>maven</groupId>
|
||||
<artifactId>maven-assemble-plugin</artifactId>
|
||||
<packaging>plugin</packaging>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<name>Maven Assemble Plugin</name>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<dependencies>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>maven</groupId>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<packaging>plugin</packaging>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<name>Maven Clean Plugin</name>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<inceptionYear>2001</inceptionYear>
|
||||
|
@ -20,4 +20,4 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</model>
|
||||
</model>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>maven</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<packaging>plugin</packaging>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<name>Maven Compiler Plugin</name>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<inceptionYear>2001</inceptionYear>
|
||||
|
@ -41,4 +41,4 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</model>
|
||||
</model>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>maven</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<packaging>plugin</packaging>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<name>Maven Deploy Plugin</name>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<inceptionYear>2004</inceptionYear>
|
||||
|
@ -55,4 +55,4 @@
|
|||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</model>
|
||||
</model>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>maven</groupId>
|
||||
<artifactId>maven-ejb-plugin</artifactId>
|
||||
<packaging>plugin</packaging>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<name>Maven EJB Plugin</name>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<dependencies>
|
||||
|
@ -54,4 +54,4 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</model>
|
||||
</model>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>maven</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<packaging>plugin</packaging>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<name>Maven Install Plugin</name>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<inceptionYear>2004</inceptionYear>
|
||||
|
@ -41,4 +41,4 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</model>
|
||||
</model>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>maven</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<packaging>plugin</packaging>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<name>Maven Jar Plugin</name>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<dependencies>
|
||||
|
@ -61,4 +61,4 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</model>
|
||||
</model>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>maven</groupId>
|
||||
<artifactId>maven-plugin-plugin</artifactId>
|
||||
<packaging>plugin</packaging>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<name>Maven</name>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<inceptionYear>2001</inceptionYear>
|
||||
|
@ -62,4 +62,4 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</model>
|
||||
</model>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
</parent>
|
||||
<groupId>maven</groupId>
|
||||
<artifactId>maven-pom-plugin</artifactId>
|
||||
<packaging>plugin</packaging>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<name>Maven POM Plugin</name>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<dependencies>
|
||||
|
@ -46,4 +46,4 @@
|
|||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</model>
|
||||
</model>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>maven</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<packaging>plugin</packaging>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<name>Maven Resources Plugin</name>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<dependencies>
|
||||
|
@ -26,4 +26,4 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</model>
|
||||
</model>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>maven</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<packaging>plugin</packaging>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<name>Maven Surefire Plugin</name>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<dependencies>
|
||||
|
@ -26,4 +26,4 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</model>
|
||||
</model>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>maven</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<packaging>plugin</packaging>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<name>Maven War Plugin</name>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<dependencies>
|
||||
|
@ -68,4 +68,4 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</model>
|
||||
</model>
|
||||
|
|
Loading…
Reference in New Issue