generate components.xml rather than writing it manually
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1337657 13f79535-47bb-0310-9956-ffa450edef68master
parent
ca84ee10df
commit
b6e4781de6
|
|
@ -57,6 +57,18 @@
|
|||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-utils</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-component-annotations</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-container-default</artifactId>
|
||||
|
|
@ -108,6 +120,10 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-component-metadata</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ import org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor;
|
|||
import org.codehaus.plexus.archiver.UnArchiver;
|
||||
import org.codehaus.plexus.archiver.manager.ArchiverManager;
|
||||
import org.codehaus.plexus.archiver.manager.NoSuchArchiverException;
|
||||
import org.codehaus.plexus.component.annotations.Component;
|
||||
import org.codehaus.plexus.logging.AbstractLogEnabled;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
|
||||
|
|
@ -69,29 +70,22 @@ import java.util.TreeSet;
|
|||
* @author Olivier Lamy
|
||||
* @since 3.0
|
||||
*/
|
||||
@Component(role = MojoDescriptorExtractor.class, hint = "java-annotations")
|
||||
public class JavaAnnotationsMojoDescriptorExtractor
|
||||
extends AbstractLogEnabled
|
||||
implements MojoDescriptorExtractor
|
||||
{
|
||||
|
||||
/**
|
||||
* @requirement
|
||||
*/
|
||||
@org.codehaus.plexus.component.annotations.Requirement
|
||||
private MojoAnnotationsScanner mojoAnnotationsScanner;
|
||||
|
||||
/**
|
||||
* @requirement
|
||||
*/
|
||||
@org.codehaus.plexus.component.annotations.Requirement
|
||||
private ArtifactResolver artifactResolver;
|
||||
|
||||
/**
|
||||
* @requirement
|
||||
*/
|
||||
@org.codehaus.plexus.component.annotations.Requirement
|
||||
private ArtifactFactory artifactFactory;
|
||||
|
||||
/**
|
||||
* @requirement
|
||||
*/
|
||||
@org.codehaus.plexus.component.annotations.Requirement
|
||||
private ArchiverManager archiverManager;
|
||||
|
||||
public List<MojoDescriptor> execute( MavenProject project, PluginDescriptor pluginDescriptor )
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ import java.util.zip.ZipInputStream;
|
|||
* @author Olivier Lamy
|
||||
* @since 3.0
|
||||
*/
|
||||
@org.codehaus.plexus.component.annotations.Component( role = MojoAnnotationsScanner.class )
|
||||
public class DefaultMojoAnnotationsScanner
|
||||
extends AbstractLogEnabled
|
||||
implements MojoAnnotationsScanner
|
||||
|
|
|
|||
|
|
@ -26,31 +26,6 @@
|
|||
| descriptors from java classes with annotations.
|
||||
|
|
||||
-->
|
||||
<component>
|
||||
<role>org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor</role>
|
||||
<role-hint>java-annotations</role-hint>
|
||||
<implementation>org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor</implementation>
|
||||
<requirements>
|
||||
<requirement>
|
||||
<role>org.apache.maven.tools.plugin.annotations.scanner.MojoAnnotationsScanner</role>
|
||||
</requirement>
|
||||
<requirement>
|
||||
<role>org.apache.maven.artifact.resolver.ArtifactResolver</role>
|
||||
</requirement>
|
||||
<requirement>
|
||||
<role>org.apache.maven.artifact.factory.ArtifactFactory</role>
|
||||
</requirement>
|
||||
<requirement>
|
||||
<role>org.codehaus.plexus.archiver.manager.ArchiverManager</role>
|
||||
</requirement>
|
||||
</requirements>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<role>org.apache.maven.tools.plugin.annotations.scanner.MojoAnnotationsScanner</role>
|
||||
<role-hint>default</role-hint>
|
||||
<implementation>org.apache.maven.tools.plugin.annotations.scanner.DefaultMojoAnnotationsScanner</implementation>
|
||||
</component>
|
||||
|
||||
</components>
|
||||
</component-set>
|
||||
24
pom.xml
24
pom.xml
|
|
@ -223,6 +223,17 @@
|
|||
<artifactId>plexus-utils</artifactId>
|
||||
<version>3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-component-annotations</artifactId>
|
||||
<version>1.5.5</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-container-default</artifactId>
|
||||
|
|
@ -308,6 +319,19 @@
|
|||
<tagBase>https://svn.apache.org/repos/asf/maven/plugin-tools/tags</tagBase>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-component-metadata</artifactId>
|
||||
<version>1.5.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>generate-metadata</goal>
|
||||
<goal>generate-test-metadata</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
|
|
|||
Loading…
Reference in New Issue