don't test help generation in all it, use doclet for help generation to not force users to add annotations artifact as a dependency

git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/branches/MPLUGIN-189@1337275 13f79535-47bb-0310-9956-ffa450edef68
master
Olivier Lamy 2012-05-11 16:45:45 +00:00
parent 0aa8ad9c05
commit 2eef7a412b
21 changed files with 123 additions and 91 deletions

View File

@ -1,5 +1,3 @@
invoker.goals.1 = install invoker.goals.1 = install
invoker.goals.2 = org.apache.maven.its.annotation-with-inheritance-from-deps:annotation-with-inheritance-from-deps:1.0:first invoker.goals.2 = org.apache.maven.its.annotation-with-inheritance-from-deps:annotation-with-inheritance-from-deps:1.0-SNAPSHOT:first
#FIXME disabled need to find a solution for the chicken and eggs issue. invoker.goals.3 = org.apache.maven.its.annotation-with-inheritance-from-deps:annotation-with-inheritance-from-deps:1.0-SNAPSHOT:help
#help sources are generated @generated-sources but need descriptor which need compile phase first for classes scanning
#invoker.goals.3 = org.apache.maven.its.basic-java-annotations:maven-it-basic-java-annotations:1.0::help

View File

@ -24,7 +24,7 @@ under the License.
<groupId>org.apache.maven.its.annotation-with-inheritance-from-deps</groupId> <groupId>org.apache.maven.its.annotation-with-inheritance-from-deps</groupId>
<artifactId>annotation-with-inheritance-from-deps</artifactId> <artifactId>annotation-with-inheritance-from-deps</artifactId>
<version>1.0</version> <version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging> <packaging>maven-plugin</packaging>
<name>Maven Integration Test :: annotation-with-inheritance-from-deps</name> <name>Maven Integration Test :: annotation-with-inheritance-from-deps</name>
@ -103,6 +103,12 @@ under the License.
<goal>descriptor</goal> <goal>descriptor</goal>
</goals> </goals>
</execution> </execution>
<execution>
<id>help-goal</id>
<goals>
<goal>helpmojo</goal>
</goals>
</execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>

View File

@ -1,6 +1,3 @@
invoker.goals.1 = clean install -DskipTests invoker.goals.1 = clean install -DskipTests
invoker.goals.2 = org.apache.maven.its.annotation-with-inheritance-reactor:module-mojo:1.0-SNAPSHOT:it0014 invoker.goals.2 = org.apache.maven.its.annotation-with-inheritance-reactor:module-mojo:1.0-SNAPSHOT:it0014
invoker.goals.3 = org.apache.maven.its.annotation-with-inheritance-reactor:module-mojo:1.0-SNAPSHOT:first invoker.goals.3 = org.apache.maven.its.annotation-with-inheritance-reactor:module-mojo:1.0-SNAPSHOT:first
#FIXME disabled need to find a solution for the chicken and eggs issue.
#help sources are generated @generated-sources but need descriptor which need compile phase first for classes scanning
#invoker.goals.3 = org.apache.maven.its.basic-java-annotations:maven-it-basic-java-annotations:1.0::help

View File

@ -1,2 +1,2 @@
invoker.goals.1 = clean install -DskipTests invoker.goals.1 = clean install -DskipTests
invoker.goals.2 = org.apache.maven.its.plugin:help:1.0:help invoker.goals.2 = org.apache.maven.its.plugin:help:1.0-SNAPSHOT:help

View File

@ -24,7 +24,7 @@ under the License.
<groupId>org.apache.maven.its.plugin</groupId> <groupId>org.apache.maven.its.plugin</groupId>
<artifactId>help</artifactId> <artifactId>help</artifactId>
<version>1.0</version> <version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging> <packaging>maven-plugin</packaging>
<description> <description>

View File

@ -24,7 +24,7 @@ under the License.
<groupId>org.apache.maven.its.plugin</groupId> <groupId>org.apache.maven.its.plugin</groupId>
<artifactId>help</artifactId> <artifactId>help</artifactId>
<version>1.0</version> <version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging> <packaging>maven-plugin</packaging>
<description> <description>

View File

@ -25,7 +25,7 @@ under the License.
<parent> <parent>
<groupId>org.apache.maven.its.plugin</groupId> <groupId>org.apache.maven.its.plugin</groupId>
<artifactId>ipcr</artifactId> <artifactId>ipcr</artifactId>
<version>1.0</version> <version>1.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>ipcr-dep-a</artifactId> <artifactId>ipcr-dep-a</artifactId>

View File

@ -25,7 +25,7 @@ under the License.
<parent> <parent>
<groupId>org.apache.maven.its.plugin</groupId> <groupId>org.apache.maven.its.plugin</groupId>
<artifactId>ipcr</artifactId> <artifactId>ipcr</artifactId>
<version>1.0</version> <version>1.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>ipcr-dep-b</artifactId> <artifactId>ipcr-dep-b</artifactId>
@ -42,7 +42,7 @@ under the License.
<dependency> <dependency>
<groupId>org.apache.maven.its.plugin</groupId> <groupId>org.apache.maven.its.plugin</groupId>
<artifactId>ipcr-dep-a</artifactId> <artifactId>ipcr-dep-a</artifactId>
<version>1.0</version> <version>${project.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -24,7 +24,7 @@ under the License.
<groupId>org.apache.maven.its.plugin</groupId> <groupId>org.apache.maven.its.plugin</groupId>
<artifactId>ipcr</artifactId> <artifactId>ipcr</artifactId>
<version>1.0</version> <version>1.0-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Aggregator</name> <name>Aggregator</name>

View File

@ -25,7 +25,7 @@ under the License.
<parent> <parent>
<groupId>org.apache.maven.its.plugin</groupId> <groupId>org.apache.maven.its.plugin</groupId>
<artifactId>ipcr</artifactId> <artifactId>ipcr</artifactId>
<version>1.0</version> <version>1.0-SNAPSHOT</version>
</parent> </parent>
<artifactId>ipcr-plugin</artifactId> <artifactId>ipcr-plugin</artifactId>
@ -45,7 +45,7 @@ under the License.
<dependency> <dependency>
<groupId>org.apache.maven.its.plugin</groupId> <groupId>org.apache.maven.its.plugin</groupId>
<artifactId>ipcr-dep-b</artifactId> <artifactId>ipcr-dep-b</artifactId>
<version>1.0</version> <version>${project.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
@ -58,7 +58,7 @@ under the License.
<dependency> <dependency>
<groupId>org.apache.maven.its.plugin</groupId> <groupId>org.apache.maven.its.plugin</groupId>
<artifactId>ipcr-dep-b</artifactId> <artifactId>ipcr-dep-b</artifactId>
<version>1.0</version> <version>1.0-SNAPSHOT</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.apache.maven.its.plugin</groupId> <groupId>org.apache.maven.its.plugin</groupId>

View File

@ -1,5 +1,3 @@
invoker.goals.1 = clean install -DskipTests invoker.goals.1 = clean install -DskipTests
invoker.goals.2 = org.apache.maven.its.basic-java-annotations:maven-it-basic-java-annotations:1.0:it0014 invoker.goals.2 = org.apache.maven.its.basic-java-annotations:maven-it-basic-java-annotations:1.0-SNAPSHOT:it0014
#FIXME disabled need to find a solution for the chicken and eggs issue. invoker.goals.3 = org.apache.maven.its.basic-java-annotations:maven-it-basic-java-annotations:1.0-SNAPSHOT:help
#help sources are generated @generated-sources but need descriptor which need compile phase first for classes scanning
#invoker.goals.3 = org.apache.maven.its.basic-java-annotations:maven-it-basic-java-annotations:1.0::help

View File

@ -24,7 +24,7 @@ under the License.
<groupId>org.apache.maven.its.basic-java-annotations</groupId> <groupId>org.apache.maven.its.basic-java-annotations</groupId>
<artifactId>maven-it-basic-java-annotations</artifactId> <artifactId>maven-it-basic-java-annotations</artifactId>
<version>1.0</version> <version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging> <packaging>maven-plugin</packaging>
<name>Maven Integration Test :: basic-java-annotations</name> <name>Maven Integration Test :: basic-java-annotations</name>
@ -44,6 +44,12 @@ under the License.
<artifactId>maven-plugin-api</artifactId> <artifactId>maven-plugin-api</artifactId>
<version>2.0</version> <version>2.0</version>
</dependency> </dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>org.apache.maven.plugin-tools</groupId> <groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId> <artifactId>maven-plugin-annotations</artifactId>
@ -70,7 +76,6 @@ under the License.
</execution> </execution>
<execution> <execution>
<id>help-goal</id> <id>help-goal</id>
<phase>process-classes</phase>
<goals> <goals>
<goal>helpmojo</goal> <goal>helpmojo</goal>
</goals> </goals>

View File

@ -1,3 +1,3 @@
invoker.goals.1 = install -DskipTests invoker.goals.1 = clean install -DskipTests
invoker.goals.2 = org.apache.maven.its.it0013:maven-it-it0013:1.0:it0013 invoker.goals.2 = org.apache.maven.its.it0013:maven-it-it0013:1.0-SNAPSHOT:it0013

View File

@ -24,7 +24,7 @@ under the License.
<groupId>org.apache.maven.its.it0013</groupId> <groupId>org.apache.maven.its.it0013</groupId>
<artifactId>maven-it-it0013</artifactId> <artifactId>maven-it-it0013</artifactId>
<version>1.0</version> <version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging> <packaging>maven-plugin</packaging>
<name>Maven Integration Test :: it0013</name> <name>Maven Integration Test :: it0013</name>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its</groupId> <groupId>org.apache.maven.its</groupId>
<artifactId>jdk-default-version</artifactId> <artifactId>jdk-default-version</artifactId>

View File

@ -30,7 +30,7 @@ under the License.
<groupId>org.apache.maven.its</groupId> <groupId>org.apache.maven.its</groupId>
<artifactId>plugin-report</artifactId> <artifactId>plugin-report</artifactId>
<version>1.0</version> <version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging> <packaging>maven-plugin</packaging>
<name>MPLUGIN-105</name> <name>MPLUGIN-105</name>

View File

@ -24,7 +24,7 @@ under the License.
<groupId>org.apache.maven.its.it0013</groupId> <groupId>org.apache.maven.its.it0013</groupId>
<artifactId>mplugin-174</artifactId> <artifactId>mplugin-174</artifactId>
<version>1.0</version> <version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging> <packaging>maven-plugin</packaging>
<name>MPLUGIN-174</name> <name>MPLUGIN-174</name>

View File

@ -24,7 +24,7 @@ under the License.
<groupId>org.apache.maven.its.plugin</groupId> <groupId>org.apache.maven.its.plugin</groupId>
<artifactId>latin-1</artifactId> <artifactId>latin-1</artifactId>
<version>1.0</version> <version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging> <packaging>maven-plugin</packaging>
<name>Latin-1</name> <name>Latin-1</name>
@ -49,12 +49,12 @@ under the License.
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version> <version>2.4</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<version>2.2</version> <version>2.5</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>

View File

@ -24,7 +24,7 @@ under the License.
<groupId>org.apache.maven.its.plugin</groupId> <groupId>org.apache.maven.its.plugin</groupId>
<artifactId>aggregator</artifactId> <artifactId>aggregator</artifactId>
<version>1.0</version> <version>1.0-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Aggregator</name> <name>Aggregator</name>

View File

@ -24,7 +24,7 @@ under the License.
<groupId>org.apache.maven.its.plugin</groupId> <groupId>org.apache.maven.its.plugin</groupId>
<artifactId>utf-8</artifactId> <artifactId>utf-8</artifactId>
<version>1.0</version> <version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging> <packaging>maven-plugin</packaging>
<name>UTF-8</name> <name>UTF-8</name>
@ -49,12 +49,12 @@ under the License.
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version> <version>2.4</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<version>2.2</version> <version>2.5</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>

View File

@ -14,14 +14,13 @@ import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
/** /**
* @author * @author
* @version * @version
* @goal help
* @requiresProject false
* @threadSafe
*/ */
@Mojo( name = "help", threadSafe = true, requiresProject = false)
public class HelpMojo public class HelpMojo
extends AbstractMojo extends AbstractMojo
{ {
@ -29,28 +28,56 @@ public class HelpMojo
* If <code>true</code>, display all settable properties for each goal. * If <code>true</code>, display all settable properties for each goal.
* *
*/ */
@Parameter( expression = "${detail}", defaultValue = "false" ) //@Parameter( expression = "${detail}", defaultValue = "false" )
private boolean detail; //private boolean detail;
/** /**
* The name of the goal for which to show help. If unspecified, all goals will be displayed. * The name of the goal for which to show help. If unspecified, all goals will be displayed.
* *
*/ */
@Parameter( expression = "${goal}" ) //@Parameter( expression = "${goal}" )
private java.lang.String goal; //private java.lang.String goal;
/** /**
* The maximum length of a display line, should be positive. * The maximum length of a display line, should be positive.
* *
*/ */
@Parameter( expression = "${lineLength}", defaultValue = "80" ) //@Parameter( expression = "${lineLength}", defaultValue = "80" )
private int lineLength; //private int lineLength;
/** /**
* The number of spaces per indentation level, should be positive. * The number of spaces per indentation level, should be positive.
* *
*/ */
@Parameter( expression = "${indentSize}", defaultValue = "2" ) //@Parameter( expression = "${indentSize}", defaultValue = "2" )
//private int indentSize;
/**
* If <code>true</code>, display all settable properties for each goal.
*
* @parameter expression="${detail}" default-value="false"
*/
private boolean detail;
/**
* The name of the goal for which to show help. If unspecified, all goals will be displayed.
*
* @parameter expression="${goal}"
*/
private java.lang.String goal;
/**
* The maximum length of a display line, should be positive.
*
* @parameter expression="${lineLength}" default-value="80"
*/
private int lineLength;
/**
* The number of spaces per indentation level, should be positive.
*
* @parameter expression="${indentSize}" default-value="2"
*/
private int indentSize; private int indentSize;
// groupId/artifactId/version // groupId/artifactId/version