[MPLUGIN-146] Implement pluginXml parameter for maven-plugin-plugin
o Added a skip parameter instead which simply allows usage of src/main/resources/META-INF/maven/plugin.xml to yield the desired effect git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@940010 13f79535-47bb-0310-9956-ffa450edef68master
parent
a54c0dca73
commit
e869ef7b62
|
|
@ -19,6 +19,7 @@ package org.apache.maven.plugin.plugin;
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
import org.apache.maven.tools.plugin.generator.Generator;
|
import org.apache.maven.tools.plugin.generator.Generator;
|
||||||
import org.apache.maven.tools.plugin.generator.PluginDescriptorGenerator;
|
import org.apache.maven.tools.plugin.generator.PluginDescriptorGenerator;
|
||||||
|
|
||||||
|
|
@ -46,6 +47,14 @@ public class DescriptorGeneratorMojo
|
||||||
*/
|
*/
|
||||||
protected File outputDirectory;
|
protected File outputDirectory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A flag to disable generation of the <code>plugin.xml</code> in favor of a hand authored plugin descriptor.
|
||||||
|
*
|
||||||
|
* @parameter default-value="false"
|
||||||
|
* @since 2.6
|
||||||
|
*/
|
||||||
|
private boolean skipDescriptor;
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
protected File getOutputDirectory()
|
protected File getOutputDirectory()
|
||||||
{
|
{
|
||||||
|
|
@ -57,4 +66,17 @@ public class DescriptorGeneratorMojo
|
||||||
{
|
{
|
||||||
return new PluginDescriptorGenerator();
|
return new PluginDescriptorGenerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
|
public void execute()
|
||||||
|
throws MojoExecutionException
|
||||||
|
{
|
||||||
|
if ( skipDescriptor )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
super.execute();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue