generate components.xml rather than writing it manually java sources module

git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1337693 13f79535-47bb-0310-9956-ffa450edef68
master
Olivier Lamy 2012-05-12 21:34:01 +00:00
parent c9fb1abe07
commit d132fe7590
3 changed files with 16 additions and 36 deletions

View File

@ -61,6 +61,16 @@
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-annotations</artifactId>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- misc -->
<dependency>
@ -87,6 +97,10 @@
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-metadata</artifactId>
</plugin>
</plugins>
</build>

View File

@ -38,6 +38,7 @@ import org.apache.maven.tools.plugin.PluginToolsRequest;
import org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor;
import org.apache.maven.tools.plugin.extractor.ExtractionException;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.logging.AbstractLogEnabled;
import org.codehaus.plexus.util.StringUtils;
@ -59,6 +60,7 @@ import java.util.TreeMap;
* @version $Id$
* @see org.apache.maven.plugin.descriptor.MojoDescriptor
*/
@Component( role = MojoDescriptorExtractor.class, hint = "java")
public class JavaMojoDescriptorExtractor
extends AbstractLogEnabled
implements MojoDescriptorExtractor, JavaMojoAnnotation

View File

@ -1,36 +0,0 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<component-set>
<components>
<!--
|
| JavaMojoDescriptorExtractor, a MojoDescriptor extractor to read
| descriptors from java sources.
|
-->
<component>
<role>org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor</role>
<role-hint>java</role-hint>
<implementation>org.apache.maven.tools.plugin.extractor.java.JavaMojoDescriptorExtractor</implementation>
</component>
</components>
</component-set>