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.2 = org.apache.maven.its.annotation-with-inheritance-from-deps:annotation-with-inheritance-from-deps:1.0: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
invoker.goals.2 = org.apache.maven.its.annotation-with-inheritance-from-deps:annotation-with-inheritance-from-deps:1.0-SNAPSHOT:first
invoker.goals.3 = org.apache.maven.its.annotation-with-inheritance-from-deps:annotation-with-inheritance-from-deps:1.0-SNAPSHOT:help

View File

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

View File

@ -1,6 +1,3 @@
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.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.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>
<artifactId>help</artifactId>
<version>1.0</version>
<version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<description>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,3 @@
invoker.goals.1 = clean install -DskipTests
invoker.goals.2 = org.apache.maven.its.basic-java-annotations:maven-it-basic-java-annotations:1.0:it0014
#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
invoker.goals.2 = org.apache.maven.its.basic-java-annotations:maven-it-basic-java-annotations:1.0-SNAPSHOT:it0014
invoker.goals.3 = org.apache.maven.its.basic-java-annotations:maven-it-basic-java-annotations:1.0-SNAPSHOT:help

View File

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

View File

@ -1,3 +1,3 @@
invoker.goals.1 = install -DskipTests
invoker.goals.2 = org.apache.maven.its.it0013:maven-it-it0013:1.0:it0013
invoker.goals.1 = clean install -DskipTests
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>
<artifactId>maven-it-it0013</artifactId>
<version>1.0</version>
<version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Integration Test :: it0013</name>

View File

@ -1,47 +1,48 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its</groupId>
<artifactId>jdk-default-version</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<!--
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
-->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>@project.version@</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>@sitePluginVersion@</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<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>
<groupId>org.apache.maven.its</groupId>
<artifactId>jdk-default-version</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<!--
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
-->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>@project.version@</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>@sitePluginVersion@</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<reporting>
<plugins>
<plugin>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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