You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jv...@apache.org on 2004/03/16 00:54:51 UTC
cvs commit: maven-components/maven-core/src/java/org/apache/maven/plugin/plexus/discovery MavenPluginDiscoverer.java
jvanzyl 2004/03/15 15:54:51
Added: maven-core/src/java/org/apache/maven/plugin/plexus/discovery
MavenPluginDiscoverer.java
Log:
o maven plugin discoverer which is an extension of the standard
plexus component discoverer.
Revision Changes Path
1.1 maven-components/maven-core/src/java/org/apache/maven/plugin/plexus/discovery/MavenPluginDiscoverer.java
Index: MavenPluginDiscoverer.java
===================================================================
package org.apache.maven.plugin.plexus.discovery;
import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.codehaus.plexus.component.discovery.AbstractComponentDiscoverer;
import org.codehaus.plexus.configuration.PlexusConfiguration;
import java.util.ArrayList;
import java.util.List;
/**
*
*
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
*
* @version $Id: MavenPluginDiscoverer.java,v 1.1 2004/03/15 23:54:51 jvanzyl Exp $
*/
public class MavenPluginDiscoverer
extends AbstractComponentDiscoverer
{
private PluginDescriptorBuilder builder;
public MavenPluginDiscoverer()
{
builder = new PluginDescriptorBuilder();
}
public String getComponentDescriptorLocation()
{
return "META-INF/maven/plugin.xml";
}
// ----------------------------------------------------------------------------------
// <plugin>
// <implementation>org.apache.maven.plugin.AntlrPlugin</implementation>
// <id>antlr</id>
// <goals>
// <goal>
// <name>antlr</name>
// <configuration>
// <outputDirectory>#maven.build.dest</outputDirectory>
// <resources>#project.build.resources</resources>
// </configuration>
// </goal>
// </goals>
// </plugin>
// ----------------------------------------------------------------------------------
public List createComponentDescriptors( PlexusConfiguration componentDescriptorConfiguration )
throws Exception
{
List componentDescriptors = new ArrayList();
PluginDescriptor pluginDescriptor = builder.build( componentDescriptorConfiguration );
componentDescriptors.add( pluginDescriptor );
return componentDescriptors;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org