From 65d8620ee91f61cf69d8bdf87116827175d4163a Mon Sep 17 00:00:00 2001 From: Vincent Siveton Date: Mon, 25 Feb 2008 13:15:10 +0000 Subject: [PATCH] MPLUGIN-45: Plugin dependencies are not put in generated plugin.xml o honor the code in AbstractGeneratorMojo#execute(), i.e. project.getRuntimeDependencies() o improved doc git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@630836 13f79535-47bb-0310-9956-ffa450edef68 --- .../plugin/DescriptorGeneratorMojo.java | 1 + .../site/apt/examples/generate-descriptor.apt | 64 ++++++++++++++++++- 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java index 48253de..de2646c 100644 --- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java +++ b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java @@ -33,6 +33,7 @@ import java.io.File; * @version $Id$ * @goal descriptor * @phase generate-resources + * @requiresDependencyResolution runtime */ public class DescriptorGeneratorMojo extends AbstractGeneratorMojo diff --git a/maven-plugin-plugin/src/site/apt/examples/generate-descriptor.apt b/maven-plugin-plugin/src/site/apt/examples/generate-descriptor.apt index c1c8451..324399e 100644 --- a/maven-plugin-plugin/src/site/apt/examples/generate-descriptor.apt +++ b/maven-plugin-plugin/src/site/apt/examples/generate-descriptor.apt @@ -3,7 +3,7 @@ ------ Maria Odea Ching ------ - July 2006 + February 2008 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one @@ -50,3 +50,65 @@ Configuring Generation of Plugin Descriptor The <<>> parameter will set the goal prefix for the plugin that is specified in the descriptor. The <<>> parameter, on the other hand, specifies the target location of the generated plugin descriptor. +* Example + + For instance, if we make reference on <<>> from <<>> which is generated by the + Maven Archetype Plugin, i.e.: + +----- +mvn archetype:create \ + -DgroupId=org.apache.maven.plugin.my \ + -DartifactId=maven-my-plugin \ + -DarchetypeArtifactId=maven-archetype-mojo +----- + + The generated plugin descriptor generated by <<>> should be: + +----- + + + org.apache.maven.plugin.my + maven-my-plugin + 1.0-SNAPSHOT + my + false + true + + + touch + Goal which touches a timestamp file. + false + true + false + false + false + true + process-sources + org.apache.maven.plugin.my.MyMojo + java + per-lookup + once-per-session + + + outputDirectory + java.io.File + true + true + Location of the file. + + + + ${project.build.directory} + + + + + + org.apache.maven + maven-plugin-api + jar + 2.0 + + + +----- \ No newline at end of file