You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2012/05/12 12:27:53 UTC
svn commit: r1337500 [1/3] - in /maven/plugin-tools/trunk: ./
maven-plugin-annotations/ maven-plugin-plugin/ maven-plugin-plugin/src/it/
maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/
maven-plugin-plugin/src/it/annotation-with-inheri...
Author: olamy
Date: Sat May 12 10:27:50 2012
New Revision: 1337500
URL: http://svn.apache.org/viewvc?rev=1337500&view=rev
Log:
merge -r 1331607:1337487 https://svn.apache.org/repos/asf/maven/plugin-tools/branches/MPLUGIN-189
merge annotations branch
Added:
maven/plugin-tools/trunk/maven-plugin-annotations/ (props changed)
- copied from r1337487, maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-annotations/
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/annotation-with-inheritance/
- copied from r1337487, maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance/
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/
- copied from r1337487, maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/annotation-with-inheritance-reactor/
- copied from r1337487, maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/annotation-with-inheritance-reactor/
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic-annotations/
- copied from r1337487, maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-plugin/src/it/java-basic-annotations/
maven/plugin-tools/trunk/maven-plugin-tools-annotations/ (props changed)
- copied from r1337487, maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/
maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorException.java
- copied unchanged from r1337487, maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorException.java
maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/resources/help-class-source.vm
- copied unchanged from r1337487, maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-api/src/main/resources/help-class-source.vm
Modified:
maven/plugin-tools/trunk/ (props changed)
maven/plugin-tools/trunk/maven-plugin-plugin/pom.xml
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-basic/invoker.properties
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-basic/pom.xml
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-package/invoker.properties
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-package/pom.xml
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/pom.xml
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-b/pom.xml
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/invoker.properties
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/pom.xml
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/test/pom.xml
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/invoker.properties
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/pom.xml
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-187/invoker.properties
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/invoker.properties
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/pom.xml
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-report/invoker.properties
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-report/pom.xml
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/settings.xml
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/skip/invoker.properties
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/skip/pom.xml
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/source-encoding/latin-1/pom.xml
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/source-encoding/pom.xml
maven/plugin-tools/trunk/maven-plugin-plugin/src/it/source-encoding/utf-8/pom.xml
maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java
maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java
maven/plugin-tools/trunk/maven-plugin-tools-ant/pom.xml
maven/plugin-tools/trunk/maven-plugin-tools-api/pom.xml
maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/DefaultPluginToolsRequest.java
maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/PluginToolsRequest.java
maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/Generator.java
maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java
maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java
maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScanner.java
maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/util/PluginUtils.java
maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/AbstractGeneratorTestCase.java
maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/PluginHelpGeneratorTest.java
maven/plugin-tools/trunk/maven-plugin-tools-beanshell/pom.xml
maven/plugin-tools/trunk/maven-plugin-tools-java/pom.xml
maven/plugin-tools/trunk/maven-plugin-tools-java/src/test/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractorTest.java
maven/plugin-tools/trunk/maven-plugin-tools-javadoc/pom.xml
maven/plugin-tools/trunk/maven-plugin-tools-model/pom.xml
maven/plugin-tools/trunk/pom.xml
Propchange: maven/plugin-tools/trunk/
------------------------------------------------------------------------------
Merged /maven/plugin-tools/branches/MPLUGIN-189:r1331608-1331609,1331612-1337487
Propchange: maven/plugin-tools/trunk/maven-plugin-annotations/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat May 12 10:27:50 2012
@@ -0,0 +1,12 @@
+*~
+*.log
+target
+*.ipr
+*.iws
+*.iml
+.wtpmodules
+.project
+.classpath
+.settings
+bin
+target-eclipse
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/pom.xml?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/pom.xml Sat May 12 10:27:50 2012
@@ -28,7 +28,7 @@
</parent>
<artifactId>maven-plugin-plugin</artifactId>
- <version>2.10-SNAPSHOT</version>
+ <version>3.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven Plugin Plugin</name>
@@ -59,10 +59,10 @@
</distributionManagement>
<properties>
- <mavenVersion>2.0.6</mavenVersion>
- <pluginToolsVersion>2.10-SNAPSHOT</pluginToolsVersion>
<doxiaVersion>1.2</doxiaVersion>
<doxia-sitetoolsVersion>1.2</doxia-sitetoolsVersion>
+ <mavenVersion>2.0.6</mavenVersion>
+ <it.debug>true</it.debug>
</properties>
<!-- Copy from project up -->
@@ -72,22 +72,27 @@
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-api</artifactId>
- <version>${pluginToolsVersion}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-model</artifactId>
- <version>${pluginToolsVersion}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-java</artifactId>
- <version>${pluginToolsVersion}</version>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.plugin-tools</groupId>
+ <artifactId>maven-plugin-tools-annotations</artifactId>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-beanshell</artifactId>
- <version>${pluginToolsVersion}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
@@ -101,6 +106,29 @@
<artifactId>plexus-utils</artifactId>
<version>2.0.5</version>
</dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-archiver</artifactId>
+ <version>2.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-velocity</artifactId>
+ <version>1.1.8</version>
+ <exclusions>
+ <exclusion>
+ <groupId>velocity</groupId>
+ <artifactId>velocity</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- other -->
+ <dependency>
+ <groupId>org.apache.velocity</groupId>
+ <artifactId>velocity</artifactId>
+ <version>1.7</version>
+ </dependency>
</dependencies>
</dependencyManagement>
@@ -161,6 +189,7 @@
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-api</artifactId>
</dependency>
+
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
@@ -196,11 +225,34 @@
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.maven.plugin-tools</groupId>
+ <artifactId>maven-plugin-tools-annotations</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
<!-- plexus -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-velocity</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>velocity</groupId>
+ <artifactId>velocity</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- other -->
+ <dependency>
+ <groupId>org.apache.velocity</groupId>
+ <artifactId>velocity</artifactId>
+ </dependency>
+
</dependencies>
<build>
@@ -229,6 +281,15 @@
</configuration>
</plugin>
</plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <version>2.9</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
</build>
<profiles>
@@ -277,10 +338,13 @@
<pluginManagement>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
+ <version>1.6-SNAPSHOT</version>
<configuration>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+ <debug>${it.debug}</debug>
<filterProperties>
<sitePluginVersion>3.0</sitePluginVersion>
</filterProperties>
@@ -292,6 +356,14 @@
</plugins>
</pluginManagement>
</build>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.plugin-tools</groupId>
+ <artifactId>maven-plugin-tools-annotations</artifactId>
+ <version>${project.version}</version>
+ <classifier>tests</classifier>
+ </dependency>
+ </dependencies>
</profile>
</profiles>
</project>
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-basic/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-basic/invoker.properties?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-basic/invoker.properties (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-basic/invoker.properties Sat May 12 10:27:50 2012
@@ -1,2 +1,2 @@
-invoker.goals.1 = install
-invoker.goals.2 = org.apache.maven.its.plugin:help:1.0:help
+invoker.goals.1 = clean install -DskipTests
+invoker.goals.2 = org.apache.maven.its.plugin:help:1.0-SNAPSHOT:help
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-basic/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-basic/pom.xml?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-basic/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-basic/pom.xml Sat May 12 10:27:50 2012
@@ -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>
@@ -41,9 +41,24 @@ 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>
</dependencies>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.4</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-package/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-package/invoker.properties?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-package/invoker.properties (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-package/invoker.properties Sat May 12 10:27:50 2012
@@ -1 +1 @@
-invoker.goals = compile
+invoker.goals = clean compile
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-package/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-package/pom.xml?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-package/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/help-package/pom.xml Sat May 12 10:27:50 2012
@@ -23,8 +23,8 @@ under the License.
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its.plugin</groupId>
- <artifactId>help</artifactId>
- <version>1.0</version>
+ <artifactId>help-package</artifactId>
+ <version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<description>
@@ -41,9 +41,24 @@ 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>
</dependencies>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.4</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/pom.xml?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-a/pom.xml Sat May 12 10:27:50 2012
@@ -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>
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-b/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-b/pom.xml?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-b/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/dep-b/pom.xml Sat May 12 10:27:50 2012
@@ -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>
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/invoker.properties?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/invoker.properties (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/invoker.properties Sat May 12 10:27:50 2012
@@ -1,4 +1,4 @@
-invoker.goals.1 = clean install
+invoker.goals.1 = clean install -DskipTests
invoker.profiles.1 = setup
invoker.goals.2 = clean process-classes
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/pom.xml?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/pom.xml Sat May 12 10:27:50 2012
@@ -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>
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/test/pom.xml?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/test/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ignore-plugin-class-realm/test/pom.xml Sat May 12 10:27:50 2012
@@ -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>
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/invoker.properties?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/invoker.properties (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/invoker.properties Sat May 12 10:27:50 2012
@@ -1,2 +1,3 @@
-invoker.goals.1 = install
-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
+
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/pom.xml?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/pom.xml Sat May 12 10:27:50 2012
@@ -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>
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-187/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-187/invoker.properties?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-187/invoker.properties (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-187/invoker.properties Sat May 12 10:27:50 2012
@@ -1 +1 @@
-invoker.goals = clean plugin:report
+invoker.goals = clean plugin:report -DskipTests
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/invoker.properties?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/invoker.properties (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/invoker.properties Sat May 12 10:27:50 2012
@@ -1 +1 @@
-invoker.goals = clean site
+invoker.goals = clean site -DskipTests
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/pom.xml?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/pom.xml Sat May 12 10:27:50 2012
@@ -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>
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-report/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-report/invoker.properties?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-report/invoker.properties (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-report/invoker.properties Sat May 12 10:27:50 2012
@@ -1 +1 @@
-invoker.goals = clean site
+invoker.goals = clean site -DskipTests
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-report/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-report/pom.xml?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-report/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/plugin-report/pom.xml Sat May 12 10:27:50 2012
@@ -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>
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/settings.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/settings.xml?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/settings.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/settings.xml Sat May 12 10:27:50 2012
@@ -20,6 +20,13 @@ under the License.
-->
<settings>
+ <!--mirrors>
+ <mirror>
+ <id>local.mirror</id>
+ <url>@localRepositoryUrl@</url>
+ <mirrorOf>central</mirrorOf>
+ </mirror>
+ </mirrors-->
<profiles>
<profile>
<id>it-repo</id>
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/skip/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/skip/invoker.properties?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/skip/invoker.properties (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/skip/invoker.properties Sat May 12 10:27:50 2012
@@ -1,2 +1,2 @@
-invoker.goals = install
+invoker.goals = install -DskipTests
invoker.mavenOpts = -Dmaven.plugin.skip=true
\ No newline at end of file
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/skip/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/skip/pom.xml?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/skip/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/skip/pom.xml Sat May 12 10:27:50 2012
@@ -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>
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/source-encoding/latin-1/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/source-encoding/latin-1/pom.xml?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/source-encoding/latin-1/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/source-encoding/latin-1/pom.xml Sat May 12 10:27:50 2012
@@ -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>
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/source-encoding/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/source-encoding/pom.xml?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/source-encoding/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/source-encoding/pom.xml Sat May 12 10:27:50 2012
@@ -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>
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/source-encoding/utf-8/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/source-encoding/utf-8/pom.xml?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/source-encoding/utf-8/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/source-encoding/utf-8/pom.xml Sat May 12 10:27:50 2012
@@ -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>
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java Sat May 12 10:27:50 2012
@@ -19,6 +19,8 @@ package org.apache.maven.plugin.plugin;
* under the License.
*/
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException;
@@ -28,12 +30,15 @@ import org.apache.maven.tools.plugin.Def
import org.apache.maven.tools.plugin.PluginToolsRequest;
import org.apache.maven.tools.plugin.extractor.ExtractionException;
import org.apache.maven.tools.plugin.generator.Generator;
+import org.apache.maven.tools.plugin.generator.GeneratorException;
import org.apache.maven.tools.plugin.scanner.MojoScanner;
import org.apache.maven.tools.plugin.util.PluginUtils;
import org.codehaus.plexus.util.ReaderFactory;
import java.io.File;
import java.io.IOException;
+import java.lang.annotation.Documented;
+import java.util.List;
import java.util.Set;
/**
@@ -41,7 +46,6 @@ import java.util.Set;
*
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
* @version $Id$
- *
* @threadSafe
*/
public abstract class AbstractGeneratorMojo
@@ -66,7 +70,7 @@ public abstract class AbstractGeneratorM
/**
* The file encoding of the source files.
- *
+ *
* @parameter expression="${encoding}" default-value="${project.build.sourceEncoding}"
* @since 2.5
*/
@@ -80,6 +84,16 @@ public abstract class AbstractGeneratorM
protected String goalPrefix;
/**
+ * By default an exception is throw if no mojo descriptor is found. As the maven-plugin is defined in core, the
+ * descriptor generator mojo is bound to generate-resources phase.
+ * But for annotations, the compiled classes are needed, so skip error
+ *
+ * @parameter expression="${maven.plugin.skipErrorNoDescriptorsFound}" default-value="false"
+ * @since 3.0
+ */
+ protected boolean skipErrorNoDescriptorsFound;
+
+ /**
* The role names of mojo extractors to use.
* <p/>
* If not set, all mojo extractors will be used. If set to an empty extractor name, no mojo extractors
@@ -90,12 +104,12 @@ public abstract class AbstractGeneratorM
* <pre>
* <!-- Use all mojo extractors -->
* <extractors/>
- *
+ *
* <!-- Use no mojo extractors -->
* <extractors>
* <extractor/>
* </extractors>
- *
+ *
* <!-- Use only bsh mojo extractor -->
* <extractors>
* <extractor>bsh</extractor>
@@ -115,6 +129,36 @@ public abstract class AbstractGeneratorM
protected boolean skip;
/**
+ * The set of dependencies for the current project
+ *
+ * @parameter default-value = "${project.artifacts}"
+ * @required
+ * @readonly
+ * @since 3.0
+ */
+ protected Set<Artifact> dependencies;
+
+ /**
+ * List of Remote Repositories used by the resolver
+ *
+ * @parameter expression="${project.remoteArtifactRepositories}"
+ * @readonly
+ * @required
+ * @since 3.0
+ */
+ protected List<ArtifactRepository> remoteRepos;
+
+ /**
+ * Location of the local repository.
+ *
+ * @parameter expression="${localRepository}"
+ * @readonly
+ * @required
+ * @since 3.0
+ */
+ protected ArtifactRepository local;
+
+ /**
* @return the output directory where files will be generated.
*/
protected abstract File getOutputDirectory();
@@ -124,7 +168,9 @@ public abstract class AbstractGeneratorM
*/
protected abstract Generator createGenerator();
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
public void execute()
throws MojoExecutionException
{
@@ -138,11 +184,11 @@ public abstract class AbstractGeneratorM
return;
}
- if ( project.getArtifactId().toLowerCase().startsWith( "maven-" )
- && project.getArtifactId().toLowerCase().endsWith( "-plugin" )
- && !"org.apache.maven.plugins".equals( project.getGroupId() ) )
+ if ( project.getArtifactId().toLowerCase().startsWith( "maven-" )
+ && project.getArtifactId().toLowerCase().endsWith( "-plugin" ) && !"org.apache.maven.plugins".equals(
+ project.getGroupId() ) )
{
- getLog().error( "\n\nArtifact Ids of the format maven-___-plugin are reserved for \n"
+ getLog().error( "\n\nArtifact Ids of the format maven-___-plugin are reserved for \n"
+ "plugins in the Group Id org.apache.maven.plugins\n"
+ "Please change your artifactId to the format ___-maven-plugin\n"
+ "In the future this error will break the build.\n\n" );
@@ -156,8 +202,8 @@ public abstract class AbstractGeneratorM
else if ( !goalPrefix.equals( defaultGoalPrefix ) )
{
getLog().warn(
- "\n\nGoal prefix is specified as: '" + goalPrefix + "'. "
- + "Maven currently expects it to be '" + defaultGoalPrefix + "'.\n" );
+ "\n\nGoal prefix is specified as: '" + goalPrefix + "'. " + "Maven currently expects it to be '"
+ + defaultGoalPrefix + "'.\n" );
}
mojoScanner.setActiveExtractors( extractors );
@@ -180,19 +226,23 @@ public abstract class AbstractGeneratorM
if ( encoding == null || encoding.length() < 1 )
{
getLog().warn( "Using platform encoding (" + ReaderFactory.FILE_ENCODING
- + " actually) to read mojo metadata, i.e. build is platform dependent!" );
+ + " actually) to read mojo metadata, i.e. build is platform dependent!" );
}
else
{
getLog().info( "Using '" + encoding + "' encoding to read mojo metadata." );
}
-
+
try
{
pluginDescriptor.setDependencies( PluginUtils.toComponentDependencies( project.getRuntimeDependencies() ) );
-
+
PluginToolsRequest request = new DefaultPluginToolsRequest( project, pluginDescriptor );
request.setEncoding( encoding );
+ request.setSkipErrorNoDescriptorsFound( skipErrorNoDescriptorsFound );
+ request.setDependencies( dependencies );
+ request.setLocal( this.local );
+ request.setRemoteRepos( this.remoteRepos );
mojoScanner.populatePluginDescriptor( request );
@@ -200,7 +250,7 @@ public abstract class AbstractGeneratorM
createGenerator().execute( getOutputDirectory(), request );
}
- catch ( IOException e )
+ catch ( GeneratorException e )
{
throw new MojoExecutionException( "Error writing plugin descriptor", e );
}
@@ -217,7 +267,8 @@ public abstract class AbstractGeneratorM
catch ( LinkageError e )
{
throw new MojoExecutionException( "The API of the mojo scanner is not compatible with this plugin version."
- + " Please check the plugin dependencies configured in the POM and ensure the versions match.", e );
+ + " Please check the plugin dependencies configured in the POM and ensure the versions match.",
+ e );
}
}
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java Sat May 12 10:27:50 2012
@@ -19,20 +19,21 @@ package org.apache.maven.plugin.plugin;
* under the License.
*/
-import java.io.File;
-
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.tools.plugin.generator.Generator;
import org.apache.maven.tools.plugin.generator.PluginHelpGenerator;
+import org.codehaus.plexus.velocity.VelocityComponent;
+
+import java.io.File;
/**
* Generates a <code>HelpMojo</code> class.
*
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
* @version $Id$
- * @since 2.4
* @goal helpmojo
* @phase generate-sources
+ * @since 2.4
*/
public class HelpGeneratorMojo
extends AbstractGeneratorMojo
@@ -47,7 +48,7 @@ public class HelpGeneratorMojo
/**
* The name of the package for the generated <code>HelpMojo</code>. By default, the package will be calculated based
* on the packages of the other plugin goals.
- *
+ *
* @parameter
* @since 2.6
*/
@@ -61,19 +62,35 @@ public class HelpGeneratorMojo
*/
private boolean useJava5;
- /** {@inheritDoc} */
+ /**
+ * Velocity component.
+ *
+ * @component
+ * @readonly
+ * @required
+ */
+ private VelocityComponent velocity;
+
+ /**
+ * {@inheritDoc}
+ */
protected File getOutputDirectory()
{
return outputDirectory;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
protected Generator createGenerator()
{
- return new PluginHelpGenerator().setHelpPackageName( helpPackageName ).setUseJava5( useJava5 );
+ return new PluginHelpGenerator().setHelpPackageName( helpPackageName ).setUseJava5(
+ useJava5 ).setVelocityComponent( this.velocity );
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
public void execute()
throws MojoExecutionException
{
@@ -83,5 +100,7 @@ public class HelpGeneratorMojo
{
project.addCompileSourceRoot( outputDirectory.getAbsolutePath() );
}
+
}
+
}
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java Sat May 12 10:27:50 2012
@@ -19,15 +19,6 @@ package org.apache.maven.plugin.plugin;
* under the License.
*/
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.ResourceBundle;
-
import org.apache.maven.doxia.sink.Sink;
import org.apache.maven.doxia.siterenderer.Renderer;
import org.apache.maven.model.Plugin;
@@ -42,21 +33,30 @@ import org.apache.maven.reporting.MavenR
import org.apache.maven.tools.plugin.DefaultPluginToolsRequest;
import org.apache.maven.tools.plugin.PluginToolsRequest;
import org.apache.maven.tools.plugin.extractor.ExtractionException;
+import org.apache.maven.tools.plugin.generator.GeneratorException;
import org.apache.maven.tools.plugin.generator.PluginXdocGenerator;
import org.apache.maven.tools.plugin.scanner.MojoScanner;
import org.apache.maven.tools.plugin.util.PluginUtils;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.xml.Xpp3Dom;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+
/**
* Generates the Plugin's documentation report.
*
* @author <a href="snicoll@apache.org">Stephane Nicoll</a>
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
* @version $Id$
- * @since 2.0
* @goal report
* @execute phase="compile"
+ * @since 2.0
*/
public class PluginReport
extends AbstractMavenReport
@@ -91,13 +91,12 @@ public class PluginReport
*/
protected MojoScanner mojoScanner;
- /**
- * The file encoding of the source files.
- *
- * @parameter expression="${encoding}" default-value="${project.build.sourceEncoding}"
- *
- * @since 2.7
- */
+ /**
+ * The file encoding of the source files.
+ *
+ * @parameter expression="${encoding}" default-value="${project.build.sourceEncoding}"
+ * @since 2.7
+ */
private String encoding;
@@ -124,10 +123,10 @@ public class PluginReport
private Requirements requirements;
/**
- * The goal prefix that will appear before the ":".
- * By default, this plugin applies a heuristic to derive a heuristic from
- * the plugin's artifactId.
- *
+ * The goal prefix that will appear before the ":".
+ * By default, this plugin applies a heuristic to derive a heuristic from
+ * the plugin's artifactId.
+ * <p/>
* It removes any occurrences of the regular expression <strong>-?maven-?</strong>,
* and then removes any occurrences of <strong>-?plugin-?</strong>.
* <p>
@@ -158,31 +157,41 @@ public class PluginReport
*/
private boolean skipReport;
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
protected Renderer getSiteRenderer()
{
return siteRenderer;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
protected String getOutputDirectory()
{
return outputDirectory.getPath();
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
protected MavenProject getProject()
{
return project;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
public boolean canGenerateReport()
{
return "maven-plugin".equals( project.getPackaging() );
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@SuppressWarnings( "unchecked" )
protected void executeReport( Locale locale )
throws MavenReportException
@@ -205,8 +214,7 @@ public class PluginReport
}
else
{
- getLog().warn(
- "\n\nGoal prefix is specified as: '" + goalPrefix + "'. Maven currently expects it to be '"
+ getLog().warn( "\n\nGoal prefix is specified as: '" + goalPrefix + "'. Maven currently expects it to be '"
+ defaultGoalPrefix + "'.\n" );
}
@@ -224,11 +232,11 @@ public class PluginReport
try
{
pluginDescriptor.setDependencies( PluginUtils.toComponentDependencies( project.getRuntimeDependencies() ) );
-
+
PluginToolsRequest request = new DefaultPluginToolsRequest( project, pluginDescriptor );
request.setEncoding( encoding );
- try
+ try
{
mojoScanner.populatePluginDescriptor( request );
}
@@ -243,11 +251,11 @@ public class PluginReport
generatePluginDocumentation( pluginDescriptor, locale );
// Write the overview
- PluginOverviewRenderer r = new PluginOverviewRenderer( project, requirements, getSink(), pluginDescriptor,
- locale );
+ PluginOverviewRenderer r =
+ new PluginOverviewRenderer( project, requirements, getSink(), pluginDescriptor, locale );
r.render();
}
-
+
catch ( ExtractionException e )
{
throw new MavenReportException( "Error extracting plugin descriptor: \'" + e.getLocalizedMessage() + "\'",
@@ -255,19 +263,25 @@ public class PluginReport
}
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
public String getDescription( Locale locale )
{
return getBundle( locale ).getString( "report.plugin.description" );
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
public String getName( Locale locale )
{
return getBundle( locale ).getString( "report.plugin.name" );
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
public String getOutputName()
{
return "plugin-info";
@@ -275,7 +289,7 @@ public class PluginReport
/**
* @param pluginDescriptor not null
- * @param locale not null
+ * @param locale not null
* @throws MavenReportException if any
*/
private void generatePluginDocumentation( PluginDescriptor pluginDescriptor, Locale locale )
@@ -287,9 +301,10 @@ public class PluginReport
outputDir.mkdirs();
PluginXdocGenerator generator = new PluginXdocGenerator( project, locale );
- generator.execute( outputDir, pluginDescriptor );
+ PluginToolsRequest pluginToolsRequest = new DefaultPluginToolsRequest( project, pluginDescriptor );
+ generator.execute( outputDir, pluginToolsRequest );
}
- catch ( IOException e )
+ catch ( GeneratorException e )
{
throw new MavenReportException( "Error writing plugin documentation", e );
}
@@ -321,11 +336,11 @@ public class PluginReport
private final Locale locale;
/**
- * @param project not null
- * @param requirements not null
- * @param sink not null
+ * @param project not null
+ * @param requirements not null
+ * @param sink not null
* @param pluginDescriptor not null
- * @param locale not null
+ * @param locale not null
*/
public PluginOverviewRenderer( MavenProject project, Requirements requirements, Sink sink,
PluginDescriptor pluginDescriptor, Locale locale )
@@ -341,13 +356,17 @@ public class PluginReport
this.locale = locale;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
public String getTitle()
{
return getBundle( locale ).getString( "report.plugin.title" );
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@SuppressWarnings( { "unchecked", "rawtypes" } )
public void renderBody()
{
@@ -362,7 +381,6 @@ public class PluginReport
paragraph( getBundle( locale ).getString( "report.plugin.goals.intro" ) );
-
boolean hasMavenReport = false;
for ( Iterator<MojoDescriptor> i = pluginDescriptor.getMojos().iterator(); i.hasNext(); )
{
@@ -381,11 +399,11 @@ public class PluginReport
String descriptionColumnName = getBundle( locale ).getString( "report.plugin.goals.column.description" );
if ( hasMavenReport )
{
- tableHeader( new String[] { goalColumnName, isMavenReport, descriptionColumnName } );
+ tableHeader( new String[]{ goalColumnName, isMavenReport, descriptionColumnName } );
}
else
{
- tableHeader( new String[] { goalColumnName, descriptionColumnName } );
+ tableHeader( new String[]{ goalColumnName, descriptionColumnName } );
}
List<MojoDescriptor> mojos = new ArrayList<MojoDescriptor>();
@@ -449,15 +467,16 @@ public class PluginReport
String maven = discoverMavenRequirement( project, requirements );
sink.tableRow();
tableCell( getBundle( locale ).getString( "report.plugin.systemrequirements.maven" ) );
- tableCell( ( maven != null ? maven : getBundle( locale )
- .getString( "report.plugin.systemrequirements.nominimum" ) ) );
+ tableCell( ( maven != null
+ ? maven
+ : getBundle( locale ).getString( "report.plugin.systemrequirements.nominimum" ) ) );
sink.tableRow_();
String jdk = discoverJdkRequirement( project, requirements );
sink.tableRow();
tableCell( getBundle( locale ).getString( "report.plugin.systemrequirements.jdk" ) );
- tableCell( ( jdk != null ? jdk : getBundle( locale )
- .getString( "report.plugin.systemrequirements.nominimum" ) ) );
+ tableCell(
+ ( jdk != null ? jdk : getBundle( locale ).getString( "report.plugin.systemrequirements.nominimum" ) ) );
sink.tableRow_();
sink.tableRow();
@@ -482,9 +501,9 @@ public class PluginReport
sink.tableRow();
tableCell( key );
- tableCell( ( StringUtils.isNotEmpty( requirements.getOthers().getProperty( key ) ) ? requirements
- .getOthers().getProperty( key ) : getBundle( locale )
- .getString( "report.plugin.systemrequirements.nominimum" ) ) );
+ tableCell( ( StringUtils.isNotEmpty( requirements.getOthers().getProperty( key ) )
+ ? requirements.getOthers().getProperty( key )
+ : getBundle( locale ).getString( "report.plugin.systemrequirements.nominimum" ) ) );
sink.tableRow_();
}
}
@@ -515,31 +534,32 @@ public class PluginReport
sb.append( "<project>" ).append( '\n' );
sb.append( " ..." ).append( '\n' );
sb.append( " <build>" ).append( '\n' );
- sb.append( " <!-- " + getBundle( locale ).getString( "report.plugin.usage.pluginManagement" ) + " -->" )
- .append( '\n' );
+ sb.append(
+ " <!-- " + getBundle( locale ).getString( "report.plugin.usage.pluginManagement" ) + " -->" ).append(
+ '\n' );
sb.append( " <pluginManagement>" ).append( '\n' );
sb.append( " <plugins>" ).append( '\n' );
sb.append( " <plugin>" ).append( '\n' );
- sb.append( " <groupId>" ).append( pluginDescriptor.getGroupId() ).append( "</groupId>" )
- .append( '\n' );
- sb.append( " <artifactId>" ).append( pluginDescriptor.getArtifactId() ).append( "</artifactId>" )
- .append( '\n' );
- sb.append( " <version>" ).append( pluginDescriptor.getVersion() ).append( "</version>" )
- .append( '\n' );
+ sb.append( " <groupId>" ).append( pluginDescriptor.getGroupId() ).append( "</groupId>" ).append(
+ '\n' );
+ sb.append( " <artifactId>" ).append( pluginDescriptor.getArtifactId() ).append(
+ "</artifactId>" ).append( '\n' );
+ sb.append( " <version>" ).append( pluginDescriptor.getVersion() ).append( "</version>" ).append(
+ '\n' );
sb.append( " </plugin>" ).append( '\n' );
sb.append( " ..." ).append( '\n' );
sb.append( " </plugins>" ).append( '\n' );
sb.append( " </pluginManagement>" ).append( '\n' );
- sb.append( " <!-- " + getBundle( locale ).getString( "report.plugin.usage.plugins" ) + " -->" )
- .append( '\n' );
+ sb.append( " <!-- " + getBundle( locale ).getString( "report.plugin.usage.plugins" ) + " -->" ).append(
+ '\n' );
sb.append( " <plugins>" ).append( '\n' );
sb.append( " <plugin>" ).append( '\n' );
- sb.append( " <groupId>" ).append( pluginDescriptor.getGroupId() ).append( "</groupId>" )
- .append( '\n' );
- sb.append( " <artifactId>" ).append( pluginDescriptor.getArtifactId() ).append( "</artifactId>" )
- .append( '\n' );
- sb.append( " <version>" ).append( pluginDescriptor.getVersion() ).append( "</version>" )
- .append( '\n' );
+ sb.append( " <groupId>" ).append( pluginDescriptor.getGroupId() ).append( "</groupId>" ).append(
+ '\n' );
+ sb.append( " <artifactId>" ).append( pluginDescriptor.getArtifactId() ).append(
+ "</artifactId>" ).append( '\n' );
+ sb.append( " <version>" ).append( pluginDescriptor.getVersion() ).append( "</version>" ).append(
+ '\n' );
sb.append( " </plugin>" ).append( '\n' );
sb.append( " ..." ).append( '\n' );
sb.append( " </plugins>" ).append( '\n' );
@@ -548,17 +568,18 @@ public class PluginReport
if ( hasMavenReport )
{
sb.append( " ..." ).append( '\n' );
- sb.append( " <!-- " + getBundle( locale ).getString( "report.plugin.usage.reporting" ) + " -->" )
- .append( '\n' );
+ sb.append(
+ " <!-- " + getBundle( locale ).getString( "report.plugin.usage.reporting" ) + " -->" ).append(
+ '\n' );
sb.append( " <reporting>" ).append( '\n' );
sb.append( " <plugins>" ).append( '\n' );
sb.append( " <plugin>" ).append( '\n' );
- sb.append( " <groupId>" ).append( pluginDescriptor.getGroupId() ).append( "</groupId>" )
- .append( '\n' );
- sb.append( " <artifactId>" ).append( pluginDescriptor.getArtifactId() ).append( "</artifactId>" )
- .append( '\n' );
- sb.append( " <version>" ).append( pluginDescriptor.getVersion() ).append( "</version>" )
- .append( '\n' );
+ sb.append( " <groupId>" ).append( pluginDescriptor.getGroupId() ).append( "</groupId>" ).append(
+ '\n' );
+ sb.append( " <artifactId>" ).append( pluginDescriptor.getArtifactId() ).append(
+ "</artifactId>" ).append( '\n' );
+ sb.append( " <version>" ).append( pluginDescriptor.getVersion() ).append( "</version>" ).append(
+ '\n' );
sb.append( " </plugin>" ).append( '\n' );
sb.append( " ..." ).append( '\n' );
sb.append( " </plugins>" ).append( '\n' );
@@ -581,7 +602,7 @@ public class PluginReport
* Try to lookup on the Maven prerequisites property.
* If not specified, uses the value defined by the user.
*
- * @param project not null
+ * @param project not null
* @param requirements not null
* @return the Maven version
*/
@@ -606,7 +627,7 @@ public class PluginReport
* If not specified, uses the value defined by the user.
* If not specified, uses the value of the system property <code>java.specification.version</code>.
*
- * @param project not null
+ * @param project not null
* @param requirements not null
* @return the JDK version
*/
@@ -686,11 +707,11 @@ public class PluginReport
jdk = pluginConf.getChild( "target" ).getValue();
}
- if ( jdk == null )
+ if ( jdk == null )
{
return backupJdk;
}
- else
+ else
{
return jdk;
}
Propchange: maven/plugin-tools/trunk/maven-plugin-tools-annotations/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat May 12 10:27:50 2012
@@ -0,0 +1,12 @@
+*~
+*.log
+target
+*.ipr
+*.iws
+*.iml
+.wtpmodules
+.project
+.classpath
+.settings
+bin
+target-eclipse
Modified: maven/plugin-tools/trunk/maven-plugin-tools-ant/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-ant/pom.xml?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-ant/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-tools-ant/pom.xml Sat May 12 10:27:50 2012
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools</artifactId>
- <version>2.10-SNAPSHOT</version>
+ <version>3.0-SNAPSHOT</version>
</parent>
<artifactId>maven-plugin-tools-ant</artifactId>
Modified: maven/plugin-tools/trunk/maven-plugin-tools-api/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-api/pom.xml?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-api/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-tools-api/pom.xml Sat May 12 10:27:50 2012
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools</artifactId>
- <version>2.10-SNAPSHOT</version>
+ <version>3.0-SNAPSHOT</version>
</parent>
<artifactId>maven-plugin-tools-api</artifactId>
@@ -71,6 +71,31 @@
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-velocity</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>velocity</groupId>
+ <artifactId>velocity</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- other -->
+ <dependency>
+ <groupId>org.apache.velocity</groupId>
+ <artifactId>velocity</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>asm</groupId>
+ <artifactId>asm</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>asm</groupId>
+ <artifactId>asm-commons</artifactId>
+ </dependency>
<!-- misc -->
<dependency>
@@ -93,6 +118,20 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemPropertyVariables>
+ <java.io.tmpdir>${project.build.outputDirectory}</java.io.tmpdir>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
<profiles>
<profile>
<id>reporting</id>
Modified: maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/DefaultPluginToolsRequest.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/DefaultPluginToolsRequest.java?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/DefaultPluginToolsRequest.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/DefaultPluginToolsRequest.java Sat May 12 10:27:50 2012
@@ -19,23 +19,29 @@ package org.apache.maven.tools.plugin;
* under the License.
*/
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.plugin.descriptor.MojoDescriptor;
import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.ReaderFactory;
import org.codehaus.plexus.util.StringUtils;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
/**
* Default implementation of {@link PluginToolsRequest}, which is used to pass parameters to components used to extract
* {@link MojoDescriptor} instances from different types of metadata for a given plugin.
- *
+ *
* @author jdcasey
* @since 2.5
*/
public class DefaultPluginToolsRequest
implements PluginToolsRequest
{
-
+
private static final String DEFAULT_ENCODING = ReaderFactory.FILE_ENCODING;
private PluginDescriptor pluginDescriptor;
@@ -44,6 +50,14 @@ public class DefaultPluginToolsRequest
private String encoding = DEFAULT_ENCODING;
+ private boolean skipErrorNoDescriptorsFound;
+
+ private Set<Artifact> dependencies;
+
+ private List<ArtifactRepository> remoteRepos;
+
+ private ArtifactRepository local;
+
public DefaultPluginToolsRequest( MavenProject project, PluginDescriptor pluginDescriptor )
{
this.project = project;
@@ -57,7 +71,7 @@ public class DefaultPluginToolsRequest
{
return pluginDescriptor;
}
-
+
/**
* {@inheritDoc}
*/
@@ -74,7 +88,7 @@ public class DefaultPluginToolsRequest
{
return project;
}
-
+
/**
* {@inheritDoc}
*/
@@ -109,4 +123,57 @@ public class DefaultPluginToolsRequest
return this;
}
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isSkipErrorNoDescriptorsFound()
+ {
+ return skipErrorNoDescriptorsFound;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public PluginToolsRequest setSkipErrorNoDescriptorsFound( boolean skipErrorNoDescriptorsFound )
+ {
+ this.skipErrorNoDescriptorsFound = skipErrorNoDescriptorsFound;
+ return this;
+ }
+
+ public Set<Artifact> getDependencies()
+ {
+ if ( this.dependencies == null )
+ {
+ this.dependencies = new HashSet<Artifact>();
+ }
+ return dependencies;
+ }
+
+ public PluginToolsRequest setDependencies( Set<Artifact> dependencies )
+ {
+ this.dependencies = dependencies;
+ return this;
+ }
+
+ public List<ArtifactRepository> getRemoteRepos()
+ {
+ return remoteRepos;
+ }
+
+ public PluginToolsRequest setRemoteRepos( List<ArtifactRepository> remoteRepos )
+ {
+ this.remoteRepos = remoteRepos;
+ return this;
+ }
+
+ public ArtifactRepository getLocal()
+ {
+ return local;
+ }
+
+ public PluginToolsRequest setLocal( ArtifactRepository local )
+ {
+ this.local = local;
+ return this;
+ }
}
Modified: maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/PluginToolsRequest.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/PluginToolsRequest.java?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/PluginToolsRequest.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/PluginToolsRequest.java Sat May 12 10:27:50 2012
@@ -19,30 +19,35 @@ package org.apache.maven.tools.plugin;
* under the License.
*/
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.plugin.descriptor.MojoDescriptor;
import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.apache.maven.project.MavenProject;
+import java.util.List;
+import java.util.Set;
+
/**
* Request that encapsulates all information relevant to the process of extracting {@link MojoDescriptor}
* instances from metadata for a certain type of mojo.
- *
+ *
* @author jdcasey
* @since 2.5
*/
public interface PluginToolsRequest
{
-
+
/**
* Return the current {@link MavenProject} instance in use.
*/
MavenProject getProject();
-
+
/**
* @see PluginToolsRequest#getProject()
*/
PluginToolsRequest setProject( MavenProject project );
-
+
/**
* Return the {@link PluginDescriptor} currently being populated as part of the build of the
* current plugin project.
@@ -53,21 +58,81 @@ public interface PluginToolsRequest
* @see PluginToolsRequest#getPluginDescriptor()
*/
PluginToolsRequest setPluginDescriptor( PluginDescriptor pluginDescriptor );
-
+
/**
* Gets the file encoding of the source files.
- *
+ *
* @return The file encoding of the source files, never <code>null</code>.
*/
String getEncoding();
/**
* Sets the file encoding of the source files.
- *
+ *
* @param encoding The file encoding of the source files, may be empty or <code>null</code> to use the platform's
- * default encoding.
+ * default encoding.
* @return This request.
*/
PluginToolsRequest setEncoding( String encoding );
+ /**
+ * By default an exception is throw if no mojo descriptor is found. As the maven-plugin is defined in core, the
+ * descriptor generator mojo is bound to generate-resources phase.
+ * But for annotations, the compiled classes are needed, so skip error
+ *
+ * @since 3.0
+ */
+ PluginToolsRequest setSkipErrorNoDescriptorsFound( boolean skipErrorNoDescriptorsFound );
+
+ /**
+ * @return
+ * @since 3.0
+ */
+ boolean isSkipErrorNoDescriptorsFound();
+
+ /**
+ * Returns the list of {@link Artifact} used in class path scanning for annotations
+ *
+ * @return
+ * @since 3.0
+ */
+ Set<Artifact> getDependencies();
+
+ /**
+ * @param dependencies
+ * @return
+ * @since 3.0
+ */
+ PluginToolsRequest setDependencies( Set<Artifact> dependencies );
+
+ /**
+ *
+ * @return
+ * @since 3.0
+ */
+ List<ArtifactRepository> getRemoteRepos();
+
+ /**
+ *
+ * @param remoteRepos
+ * @return
+ * @since 3.0
+ */
+ PluginToolsRequest setRemoteRepos( List<ArtifactRepository> remoteRepos );
+
+ /**
+ *
+ * @return
+ * @since 3.0
+ */
+ ArtifactRepository getLocal();
+
+ /**
+ *
+ * @param local
+ * @return
+ * @since 3.0
+ */
+ PluginToolsRequest setLocal( ArtifactRepository local );
+
}
Modified: maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/Generator.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/Generator.java?rev=1337500&r1=1337499&r2=1337500&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/Generator.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/Generator.java Sat May 12 10:27:50 2012
@@ -33,18 +33,7 @@ import java.io.IOException;
*/
public interface Generator
{
- /**
- * Execute the generation for a given plugin descriptor.
- *
- * @param destinationDirectory required
- * @param pluginDescriptor required
- * @throws IOException if any
- *
- * @deprecated Use {@link Generator#execute(File, PluginToolsRequest)} instead.
- */
- void execute( File destinationDirectory, PluginDescriptor pluginDescriptor )
- throws IOException;
-
+
/**
* Execute the generation for a given plugin descriptor.
*
@@ -55,5 +44,5 @@ public interface Generator
* @since 2.5
*/
void execute( File destinationDirectory, PluginToolsRequest request )
- throws IOException;
+ throws GeneratorException;
}
\ No newline at end of file