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:
Brett Leslie Porter 2005-03-15 22:31:54 +00:00
parent 5914d6c19b
commit 5c1f5b1e57
17 changed files with 62 additions and 61 deletions

View File

@ -30,6 +30,6 @@ public class PluginHandler
public String directory()
{
return "plugins";
return "maven-plugins";
}
}

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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 )
{
@ -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,17 +580,10 @@ 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",
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
@ -606,7 +606,8 @@ public class DefaultPluginManager
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 );
}

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>