generate components.xml rather than writing it manually ant module
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1337676 13f79535-47bb-0310-9956-ffa450edef68master
parent
59feab387b
commit
298d385345
|
|
@ -61,6 +61,25 @@
|
|||
<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>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-component-metadata</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ import org.apache.maven.project.path.PathTranslator;
|
|||
import org.apache.maven.tools.plugin.PluginToolsRequest;
|
||||
import org.apache.maven.tools.plugin.extractor.AbstractScriptedMojoDescriptorExtractor;
|
||||
import org.apache.maven.tools.plugin.extractor.ExtractionException;
|
||||
import org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor;
|
||||
import org.codehaus.plexus.component.annotations.Component;
|
||||
import org.codehaus.plexus.component.repository.ComponentRequirement;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
|
||||
|
|
@ -44,8 +46,10 @@ import org.codehaus.plexus.util.StringUtils;
|
|||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
@Component( role = MojoDescriptorExtractor.class, hint = "ant")
|
||||
public class AntMojoDescriptorExtractor
|
||||
extends AbstractScriptedMojoDescriptorExtractor
|
||||
implements MojoDescriptorExtractor
|
||||
{
|
||||
/** Default metadata file extension */
|
||||
private static final String METADATA_FILE_EXTENSION = ".mojos.xml";
|
||||
|
|
|
|||
|
|
@ -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>ant</role-hint>
|
||||
<implementation>org.apache.maven.tools.plugin.extractor.ant.AntMojoDescriptorExtractor</implementation>
|
||||
</component>
|
||||
|
||||
</components>
|
||||
</component-set>
|
||||
Loading…
Reference in New Issue