[MPLUGIN-336] Jdk11 asm7 (#15)
* [MPLUGIN-336] get rid of javadoc tools annotation and use asm 7 beta
Signed-off-by: olivier lamy <olamy@apache.org>
* use asfMavenTlpPlgnBuild
Signed-off-by: olivier lamy <olamy@apache.org>
* get rid of some svn annotations
Signed-off-by: olivier lamy <olamy@apache.org>
* some java7 sugar syntax and fix some checkstyle
Signed-off-by: olivier lamy <olamy@apache.org>
* it run need -Dhttps.protocols=TLSv1.2 when running with 1.7
Signed-off-by: olivier lamy <olamy@apache.org>
* annotations are only java 5 :) and it's obvious no need to add comment
Signed-off-by: olivier lamy <olamy@apache.org>
* upgrade to maven 3.0
Signed-off-by: olivier lamy <olamy@apache.org>
diff --git a/Jenkinsfile b/Jenkinsfile
index 09ac70f..e9f05f7 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -17,4 +17,4 @@
* under the License.
*/
-asfMavenTlpStdBuild()
+asfMavenTlpPlgnBuild()
diff --git a/maven-plugin-annotations/pom.xml b/maven-plugin-annotations/pom.xml
index da11552..c1161f0 100644
--- a/maven-plugin-annotations/pom.xml
+++ b/maven-plugin-annotations/pom.xml
@@ -23,13 +23,13 @@
<parent>
<artifactId>maven-plugin-tools</artifactId>
<groupId>org.apache.maven.plugin-tools</groupId>
- <version>3.6-SNAPSHOT</version>
+ <version>3.6.0-SNAPSHOT</version>
</parent>
<artifactId>maven-plugin-annotations</artifactId>
- <name>Maven Plugin Tools Java 5 Annotations</name>
- <description>Java 5 annotations to use in Mojos</description>
+ <name>Maven Plugin Tools Java Annotations</name>
+ <description>Java annotations to use in Mojos</description>
<dependencies>
<dependency>
diff --git a/maven-plugin-annotations/src/site/apt/index.apt.vm b/maven-plugin-annotations/src/site/apt/index.apt.vm
index 220aa5e..dbc2ce9 100644
--- a/maven-plugin-annotations/src/site/apt/index.apt.vm
+++ b/maven-plugin-annotations/src/site/apt/index.apt.vm
@@ -32,7 +32,7 @@
* Usage
- To be able to {{{../maven-plugin-tools-annotations/index.html}use Maven Plugin Tools Java 5 Annotations}},
+ To be able to {{{../maven-plugin-tools-annotations/index.html}use Maven Plugin Tools Java Annotations}},
some configuration has to be done in <<<pom.xml>>>: see
{{{../maven-plugin-plugin/examples/using-annotations.html#POM_configuration} Using Plugin Tools Java5 Annotations}}
example in {{{../maven-plugin-plugin} <<<maven-plugin-plugin>>>}} documentation.
diff --git a/maven-plugin-plugin/pom.xml b/maven-plugin-plugin/pom.xml
index e1e3a44..f69774d 100644
--- a/maven-plugin-plugin/pom.xml
+++ b/maven-plugin-plugin/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>maven-plugin-tools</artifactId>
<groupId>org.apache.maven.plugin-tools</groupId>
- <version>3.6-SNAPSHOT</version>
+ <version>3.6.0-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
@@ -37,10 +37,6 @@
plugin registry, the artifact metadata and a generic help goal.
</description>
- <prerequisites>
- <maven>2.2.1</maven>
- </prerequisites>
-
<properties>
<doxiaVersion>1.4</doxiaVersion>
<doxia-sitetoolsVersion>1.4</doxia-sitetoolsVersion>
@@ -49,6 +45,10 @@
<dependencies>
<dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-api</artifactId>
</dependency>
@@ -118,24 +118,6 @@
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-descriptor</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-registry</artifactId>
- <version>${mavenVersion}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-artifact-manager</artifactId>
- <version>${mavenVersion}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
</dependency>
@@ -214,7 +196,7 @@
<configuration>
<excludes combine.children="append">
<!-- This file should exactly match the output of this project -->
- <exclude>src/it/help-basic/expected-help.txt</exclude>
+ <exclude>src/it/help-basic**/expected-help**.txt</exclude>
</excludes>
</configuration>
</plugin>
@@ -391,6 +373,25 @@
</build>
</profile>
<profile>
+ <id>jdk7</id>
+ <activation>
+ <jdk>1.7</jdk>
+ </activation>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <configuration>
+ <mavenOpts>-Dhttps.protocols=TLSv1.2</mavenOpts>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ </profile>
+ <profile>
<id>maven-2</id>
<activation>
<file>
diff --git a/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml b/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml
index 8733f4f..09816e8 100644
--- a/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml
+++ b/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml
@@ -43,11 +43,6 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
- <version>2.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
<version>@mavenVersion@</version>
</dependency>
<dependency>
diff --git a/maven-plugin-plugin/src/it/annotation-with-inheritance-reactor/pom.xml b/maven-plugin-plugin/src/it/annotation-with-inheritance-reactor/pom.xml
index d9c511c..6ccd25b 100644
--- a/maven-plugin-plugin/src/it/annotation-with-inheritance-reactor/pom.xml
+++ b/maven-plugin-plugin/src/it/annotation-with-inheritance-reactor/pom.xml
@@ -56,12 +56,6 @@
<artifactId>junit</artifactId>
<version>3.8.2</version>
</dependency>
-
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
- <version>@mavenVersion@</version>
- </dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
diff --git a/maven-plugin-plugin/src/it/annotation-with-inheritance/pom.xml b/maven-plugin-plugin/src/it/annotation-with-inheritance/pom.xml
index fa3dacb..4921b29 100644
--- a/maven-plugin-plugin/src/it/annotation-with-inheritance/pom.xml
+++ b/maven-plugin-plugin/src/it/annotation-with-inheritance/pom.xml
@@ -47,12 +47,7 @@
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
- <artifactId>maven-artifact</artifactId>
- <version>2.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
+ <artifactId>maven-compat</artifactId>
<version>@mavenVersion@</version>
</dependency>
<dependency>
diff --git a/maven-plugin-plugin/src/it/help-basic-jdk11/expected-help.txt b/maven-plugin-plugin/src/it/help-basic-jdk11/expected-help.txt
new file mode 100644
index 0000000..6b5fe31
--- /dev/null
+++ b/maven-plugin-plugin/src/it/help-basic-jdk11/expected-help.txt
@@ -0,0 +1,25 @@
+[INFO] help-jdk11 1.0-SNAPSHOT
+ Tests generation and compilation of the help mojo.
+
+help-jdk11:test
+ Deprecated. As of 1.0, use the "quoted" goal instead.
+
+ MOJO-DESCRIPTION. Some 'quotation' marks and backslashes '\\', some important
+ javadoc
+ and an inline link to AnotherMojo.
+
+ Available parameters:
+
+ defaultParam (Default: escape\backslash)
+ This parameter uses 'quotation' marks and backslashes '\\' in its
+ description. Those characters must be escaped in Java string literals.
+
+ deprecatedParam
+ Deprecated. As of version 1.0, use the {@link #defaultParam} instead.
+
+ This parameter is deprecated.
+
+ undocumentedParam
+
+ Required: Yes
+ User property: test.undocumented
diff --git a/maven-plugin-plugin/src/it/help-basic-jdk11/invoker.properties b/maven-plugin-plugin/src/it/help-basic-jdk11/invoker.properties
new file mode 100644
index 0000000..e1086cb
--- /dev/null
+++ b/maven-plugin-plugin/src/it/help-basic-jdk11/invoker.properties
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.java.version = 11+
+invoker.maven.version = 3.0+
+invoker.goals.1 = clean install -DskipTests
+invoker.goals.2 = org.apache.maven.its.plugin:help-jdk11:1.0-SNAPSHOT:help
+invoker.goals.3 = --log-file help.log org.apache.maven.its.plugin:help-jdk11:1.0-SNAPSHOT:help
+# --log-file option is only supported by Maven 3
diff --git a/maven-plugin-plugin/src/it/help-basic-jdk11/pom.xml b/maven-plugin-plugin/src/it/help-basic-jdk11/pom.xml
new file mode 100644
index 0000000..ea2e7b4
--- /dev/null
+++ b/maven-plugin-plugin/src/it/help-basic-jdk11/pom.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<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.plugin</groupId>
+ <artifactId>help-jdk11</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>maven-plugin</packaging>
+
+ <description>
+ Tests generation and compilation of the help mojo.
+ </description>
+
+ <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>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.plugin-tools</groupId>
+ <artifactId>maven-plugin-annotations</artifactId>
+ <version>@project.version@</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.8.0</version>
+ <configuration>
+ <source>11</source>
+ <target>11</target>
+ <release>11</release>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <version>@project.version@</version>
+ <executions>
+ <execution>
+ <id>default-descriptor</id>
+ <phase>process-classes</phase>
+ </execution>
+ <execution>
+ <id>help-goal</id>
+ <goals>
+ <goal>helpmojo</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/maven-plugin-plugin/src/it/help-basic-jdk11/src/main/java/test/MyMojo.java b/maven-plugin-plugin/src/it/help-basic-jdk11/src/main/java/test/MyMojo.java
new file mode 100644
index 0000000..0be9fd3
--- /dev/null
+++ b/maven-plugin-plugin/src/it/help-basic-jdk11/src/main/java/test/MyMojo.java
@@ -0,0 +1,68 @@
+package test;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+
+/**
+ * MOJO-DESCRIPTION. Some "quotation" marks and backslashes '\\', some <strong>important</strong> javadoc<br> and an
+ * inline link to {@link test.AnotherMojo}.
+ *
+ * @deprecated As of 1.0, use the "quoted" goal instead.
+ * @since 2.1
+ */
+@Mojo( name= "test" )
+public class MyMojo
+ extends AbstractMojo
+{
+
+ /**
+ * This parameter uses "quotation" marks and backslashes '\\' in its description. Those characters <em>must</em> be
+ * escaped in Java string literals.
+ *
+ * @since 2.0
+ */
+ @Parameter( defaultValue = "escape\\backslash" )
+ private String defaultParam;
+
+ /**
+ * This parameter is deprecated.
+ *
+ * @deprecated As of version 1.0, use the {@link #defaultParam} instead.
+ */
+ @Parameter
+ private String deprecatedParam;
+
+ @Parameter( property = "test.undocumented", required = true )
+ private String undocumentedParam;
+
+ /**
+ * Readonly parameter: should not be proposed for configuration.
+ */
+ @Parameter( defaultValue = "not for configuration", readonly = true )
+ private String readonly;
+
+ public void execute()
+ {
+ }
+
+}
diff --git a/maven-plugin-plugin/src/it/help-basic-jdk11/test.properties b/maven-plugin-plugin/src/it/help-basic-jdk11/test.properties
new file mode 100644
index 0000000..16e4de3
--- /dev/null
+++ b/maven-plugin-plugin/src/it/help-basic-jdk11/test.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+detail = true
+goal = test
diff --git a/maven-plugin-plugin/src/it/help-basic-jdk11/verify.groovy b/maven-plugin-plugin/src/it/help-basic-jdk11/verify.groovy
new file mode 100644
index 0000000..22f0af9
--- /dev/null
+++ b/maven-plugin-plugin/src/it/help-basic-jdk11/verify.groovy
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+expected = new File( basedir, "expected-help.txt" ).text.trim().replace( "\r", "" );
+
+log = new File( basedir, "help.log" ).text.replace( "\r", "" );
+log = log.substring( log.indexOf( "[INFO] help-jdk11 1.0-SNAPSHOT" ) );
+log = log.substring( 0, log.indexOf( "[INFO]", 5 ) ).trim();
+
+assert log == expected;
+
+return true;
\ No newline at end of file
diff --git a/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/invoker.properties b/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/invoker.properties
new file mode 100644
index 0000000..635363d
--- /dev/null
+++ b/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/invoker.properties
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.java.version = 11+
+invoker.goals.1 = clean install -DskipTests
+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
\ No newline at end of file
diff --git a/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/pom.xml b/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/pom.xml
new file mode 100644
index 0000000..18c0ba2
--- /dev/null
+++ b/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/pom.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<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.basic-java-annotations</groupId>
+ <artifactId>maven-it-basic-java-annotations</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>maven-plugin</packaging>
+
+ <name>Maven Integration Test :: basic-java-annotations-jdk8</name>
+ <description>
+ Test plugin-plugin, which tests maven-plugin-tools-api and
+ maven-plugin-tools-java. This will generate a plugin descriptor from
+ java-based mojo sources, install the plugin, and then use it.
+ </description>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <!-- pom properties values not taken into account since invoker defines properties -->
+ <!-- that override what's defined in pom -->
+ <maven.compiler.source>11</maven.compiler.source>
+ <maven.compiler.target>11</maven.compiler.target>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.plugin-tools</groupId>
+ <artifactId>maven-plugin-annotations</artifactId>
+ <version>@project.version@</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.8.0</version>
+ <configuration>
+ <source>11</source><!-- avoid ${maven.compiler.source} since value is not as expected -->
+ <target>11</target><!-- avoid ${maven.compiler.target} since value is not as expected -->
+ <release>11</release>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <version>@project.version@</version>
+ <configuration>
+ <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
+ </configuration>
+ <executions>
+ <execution>
+ <id>mojo-descriptor</id>
+ <goals>
+ <goal>descriptor</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>help-goal</id>
+ <goals>
+ <goal>helpmojo</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/src/main/java/org/apache/maven/plugin/coreit/CoreIt0014Mojo.java b/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/src/main/java/org/apache/maven/plugin/coreit/CoreIt0014Mojo.java
new file mode 100644
index 0000000..26b9ce6
--- /dev/null
+++ b/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/src/main/java/org/apache/maven/plugin/coreit/CoreIt0014Mojo.java
@@ -0,0 +1,66 @@
+package org.apache.maven.plugin.coreit;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * Touches a test file.
+ *
+ */
+@Mojo( name = "it0014" )
+public class CoreIt0014Mojo
+ extends AbstractMojo
+{
+
+ @Parameter( property = "project.build.directory", required = true )
+ private String outputDirectory;
+
+ public void execute()
+ throws MojoExecutionException
+ {
+ getLog().info( "outputDirectory = " + outputDirectory );
+
+ File f = new File( outputDirectory );
+
+ if ( !f.exists() )
+ {
+ f.mkdirs();
+ }
+
+ File touch = new File( f, "touch.txt" );
+
+ try
+ {
+ touch.createNewFile();
+ }
+ catch ( IOException e )
+ {
+ throw new MojoExecutionException( "Error writing verification file.", e );
+ }
+ }
+
+}
diff --git a/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/src/main/java/org/apache/maven/plugin/coreit/FirstMojo.java b/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/src/main/java/org/apache/maven/plugin/coreit/FirstMojo.java
new file mode 100644
index 0000000..62247a0
--- /dev/null
+++ b/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/src/main/java/org/apache/maven/plugin/coreit/FirstMojo.java
@@ -0,0 +1,91 @@
+package org.apache.maven.plugin.coreit;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecution;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.descriptor.PluginDescriptor;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.ResolutionScope;
+import org.apache.maven.plugins.annotations.Execute;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.MavenProjectHelper;
+import org.apache.maven.settings.Settings;
+
+import java.io.File;
+
+/**
+ * Touches a test file.
+ *
+ * @since 1.2
+ * @deprecated Don't use!
+ */
+@Mojo( name = "first", requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.INTEGRATION_TEST )
+@Execute( phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura" )
+public class FirstMojo
+ extends AbstractMojo
+{
+
+ /**
+ * Project directory.
+ */
+ @Parameter( defaultValue = "${basedir}", readonly = true )
+ private File basedir;
+
+ @Parameter( property = "first.touchFile", defaultValue = "${project.build.directory}/touch.txt",
+ required = true )
+ private File touchFile;
+
+ /**
+ * @since 0.1
+ * @deprecated As of 0.2
+ */
+ @Parameter( name = "namedParam", alias = "alias" )
+ private String aliasedParam;
+
+ @Component( role = MavenProjectHelper.class, hint = "test" )
+ private Object projectHelper;
+
+ @Component
+ private MavenSession session;
+
+ @Component
+ private MavenProject project;
+
+ @Component
+ private MojoExecution mojo;
+
+ @Component
+ private PluginDescriptor plugin;
+
+ @Component
+ private Settings settings;
+
+ public void execute()
+ throws MojoExecutionException
+ {
+ }
+
+}
diff --git a/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/src/main/java/org/apache/maven/plugin/coreit/MPlugin220Mojo.java b/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/src/main/java/org/apache/maven/plugin/coreit/MPlugin220Mojo.java
new file mode 100644
index 0000000..06b6068
--- /dev/null
+++ b/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/src/main/java/org/apache/maven/plugin/coreit/MPlugin220Mojo.java
@@ -0,0 +1,47 @@
+package org.apache.maven.plugin.coreit;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * Could not use regex in @Parameter(defaultValue)
+ */
+@Mojo( name = "mplugin-220" )
+public class MPlugin220Mojo
+ extends AbstractMojo
+{
+
+ @Parameter( defaultValue = "[a-zA-Z]{2,}-\\\\d+" )
+ private String regex;
+
+ public void execute()
+ throws MojoExecutionException
+ {
+ getLog().info( "regex = " + regex );
+ }
+
+}
diff --git a/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/src/main/java/org/apache/maven/plugin/coreit/Maximal.java b/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/src/main/java/org/apache/maven/plugin/coreit/Maximal.java
new file mode 100644
index 0000000..1ca4ca1
--- /dev/null
+++ b/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/src/main/java/org/apache/maven/plugin/coreit/Maximal.java
@@ -0,0 +1,76 @@
+package org.apache.maven.plugin.coreit;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.ResolutionScope;
+import org.apache.maven.plugins.annotations.Execute;
+import org.apache.maven.plugins.annotations.InstantiationStrategy;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.project.MavenProjectHelper;
+
+/**
+ * Checks maximum annotations with non-default values.
+ *
+ * @since since-text
+ * @deprecated deprecated-text
+ */
+@Mojo( name = "maximal",
+ aggregator = true,
+ configurator = "configurator-hint",
+ requiresDependencyResolution = ResolutionScope.COMPILE,
+ requiresDependencyCollection = ResolutionScope.TEST,
+ defaultPhase = LifecyclePhase.PACKAGE,
+ executionStrategy = "always",
+ instantiationStrategy = InstantiationStrategy.SINGLETON,
+ inheritByDefault = false,
+ requiresDirectInvocation = true,
+ requiresOnline = true,
+ requiresProject = false,
+ requiresReports = true,
+ threadSafe = true )
+@Execute( phase = LifecyclePhase.COMPILE )
+public class Maximal
+ extends AbstractMojo
+{
+ /**
+ * Parameter description.
+ *
+ * @since since-text
+ * @deprecated deprecated-text
+ */
+ @Parameter( alias = "myAlias",
+ property = "aProperty",
+ defaultValue = "${anExpression}",
+ readonly = true,
+ required = true )
+ private String param;
+
+ @Component( role = MavenProjectHelper.class, hint = "test" )
+ private Object projectHelper;
+
+ public void execute()
+ {
+ }
+
+}
diff --git a/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/src/main/java/org/apache/maven/plugin/coreit/Minimal.java b/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/src/main/java/org/apache/maven/plugin/coreit/Minimal.java
new file mode 100644
index 0000000..18f3cfb
--- /dev/null
+++ b/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/src/main/java/org/apache/maven/plugin/coreit/Minimal.java
@@ -0,0 +1,43 @@
+package org.apache.maven.plugin.coreit;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.project.MavenProjectHelper;
+
+// minimum annotations => default values
+@Mojo( name = "minimal" )
+public class Minimal
+ extends AbstractMojo
+{
+ @Parameter
+ private String param;
+
+ @Component
+ private MavenProjectHelper projectHelper;
+
+ public void execute()
+ {
+ }
+
+}
diff --git a/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/src/main/java/org/apache/maven/plugin/coreit/TestInterface.java b/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/src/main/java/org/apache/maven/plugin/coreit/TestInterface.java
new file mode 100644
index 0000000..16ee6d5
--- /dev/null
+++ b/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/src/main/java/org/apache/maven/plugin/coreit/TestInterface.java
@@ -0,0 +1,30 @@
+package fr.ca;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+public interface TestInterface {
+
+ /**
+ * Java 8 required to support such default method implementation
+ */
+ public default void foo(){
+
+ }
+}
diff --git a/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/verify.groovy b/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/verify.groovy
new file mode 100644
index 0000000..294f538
--- /dev/null
+++ b/maven-plugin-plugin/src/it/java-basic-annotations-jdk11/verify.groovy
@@ -0,0 +1,231 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+File touchFile = new File( basedir, "target/touch.txt" )
+assert touchFile.isFile()
+
+File descriptorFile = new File( basedir, "target/classes/META-INF/maven/plugin.xml" );
+assert descriptorFile.isFile()
+
+def pluginDescriptor = new XmlParser().parse( descriptorFile );
+
+def mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "first" }[0]
+
+assert mojo.goal.text() == 'first'
+assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.FirstMojo'
+assert mojo.language.text() == 'java'
+assert mojo.description.text() == 'Touches a test file.'
+assert mojo.deprecated.text() == "Don't use!"
+assert mojo.requiresDependencyResolution.text() == 'test'
+assert mojo.requiresDependencyCollection.text() == ''
+assert mojo.requiresProject.text() == 'true'
+assert mojo.requiresOnline.text() == 'false'
+assert mojo.requiresDirectInvocation.text() == 'false'
+assert mojo.aggregator.text() == 'false'
+assert mojo.threadSafe.text() == 'false'
+assert mojo.phase.text() == 'integration-test'
+assert mojo.executePhase.text() == 'generate-sources'
+assert mojo.executeLifecycle.text() == 'cobertura'
+
+assert mojo.configuration.basedir[0].text() == ''
+assert mojo.configuration.basedir[0].'@implementation' == 'java.io.File'
+assert mojo.configuration.basedir[0].'@default-value' == '${basedir}'
+
+assert mojo.configuration.touchFile[0].text() == '${first.touchFile}'
+assert mojo.configuration.touchFile[0].'@implementation' == 'java.io.File'
+assert mojo.configuration.touchFile[0].'@default-value' == '${project.build.directory}/touch.txt'
+
+assert mojo.configuration.session[0].text() == ''
+assert mojo.configuration.session[0].'@implementation' == 'org.apache.maven.execution.MavenSession'
+assert mojo.configuration.session[0].'@default-value' == '${session}'
+
+assert mojo.configuration.project[0].text() == ''
+assert mojo.configuration.project[0].'@implementation' == 'org.apache.maven.project.MavenProject'
+assert mojo.configuration.project[0].'@default-value' == '${project}'
+
+assert mojo.configuration.mojo[0].text() == ''
+assert mojo.configuration.mojo[0].'@implementation' == 'org.apache.maven.plugin.MojoExecution'
+assert mojo.configuration.mojo[0].'@default-value' == '${mojoExecution}'
+
+assert mojo.configuration.plugin[0].text() == ''
+assert mojo.configuration.plugin[0].'@implementation' == 'org.apache.maven.plugin.descriptor.PluginDescriptor'
+assert mojo.configuration.plugin[0].'@default-value' == '${plugin}'
+
+assert mojo.configuration.settings[0].text() == ''
+assert mojo.configuration.settings[0].'@implementation' == 'org.apache.maven.settings.Settings'
+assert mojo.configuration.settings[0].'@default-value' == '${settings}'
+
+assert mojo.requirements.requirement.size() == 1
+
+assert mojo.requirements.requirement[0].role.text() == 'org.apache.maven.project.MavenProjectHelper'
+assert mojo.requirements.requirement[0].'role-hint'.text() == 'test'
+assert mojo.requirements.requirement[0].'field-name'.text() == 'projectHelper'
+
+assert mojo.parameters.parameter.size() == 8
+
+parameter = mojo.parameters.parameter.findAll{ it.name.text() == "namedParam" }[0]
+assert parameter.name.text() == 'namedParam'
+assert parameter.alias.text() == 'alias'
+assert parameter.type.text() == 'java.lang.String'
+assert parameter.deprecated.text() == 'As of 0.2'
+assert parameter.required.text() == 'false'
+assert parameter.editable.text() == 'true'
+assert parameter.description.text() == ''
+
+parameter = mojo.parameters.parameter.findAll{ it.name.text() == "basedir" }[0]
+assert parameter.name.text() == 'basedir'
+assert parameter.alias.isEmpty()
+assert parameter.type.text() == 'java.io.File'
+assert parameter.deprecated.isEmpty()
+assert parameter.required.text() == 'false'
+assert parameter.editable.text() == 'false'
+assert parameter.description.text() == 'Project directory.'
+
+parameter = mojo.parameters.parameter.findAll{ it.name.text() == "mojo" }[0]
+assert parameter.name.text() == 'mojo'
+assert parameter.alias.isEmpty()
+assert parameter.type.text() == 'org.apache.maven.plugin.MojoExecution'
+assert parameter.deprecated.isEmpty()
+assert parameter.required.text() == 'true'
+assert parameter.editable.text() == 'false'
+assert parameter.description.text() == ''
+
+parameter = mojo.parameters.parameter.findAll{ it.name.text() == "plugin" }[0]
+assert parameter.name.text() == 'plugin'
+assert parameter.alias.isEmpty()
+assert parameter.type.text() == 'org.apache.maven.plugin.descriptor.PluginDescriptor'
+assert parameter.deprecated.isEmpty()
+assert parameter.required.text() == 'true'
+assert parameter.editable.text() == 'false'
+assert parameter.description.text() == ''
+
+parameter = mojo.parameters.parameter.findAll{ it.name.text() == "project" }[0]
+assert parameter.name.text() == 'project'
+assert parameter.alias.isEmpty()
+assert parameter.type.text() == 'org.apache.maven.project.MavenProject'
+assert parameter.deprecated.isEmpty()
+assert parameter.required.text() == 'true'
+assert parameter.editable.text() == 'false'
+assert parameter.description.text() == ''
+
+parameter = mojo.parameters.parameter.findAll{ it.name.text() == "session" }[0]
+assert parameter.name.text() == 'session'
+assert parameter.alias.isEmpty()
+assert parameter.type.text() == 'org.apache.maven.execution.MavenSession'
+assert parameter.deprecated.isEmpty()
+assert parameter.required.text() == 'true'
+assert parameter.editable.text() == 'false'
+assert parameter.description.text() == ''
+
+parameter = mojo.parameters.parameter.findAll{ it.name.text() == "settings" }[0]
+assert parameter.name.text() == 'settings'
+assert parameter.alias.isEmpty()
+assert parameter.type.text() == 'org.apache.maven.settings.Settings'
+assert parameter.deprecated.isEmpty()
+assert parameter.required.text() == 'true'
+assert parameter.editable.text() == 'false'
+assert parameter.description.text() == ''
+
+parameter = mojo.parameters.parameter.findAll{ it.name.text() == "touchFile" }[0]
+assert parameter.name.text() == 'touchFile'
+assert parameter.alias.isEmpty()
+assert parameter.type.text() == 'java.io.File'
+assert parameter.deprecated.isEmpty()
+assert parameter.required.text() == 'true'
+assert parameter.editable.text() == 'true'
+assert parameter.description.text() == ''
+
+// check default values
+mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "minimal"}[0]
+
+assert mojo.goal.text() == 'minimal'
+assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.Minimal'
+assert mojo.language.text() == 'java'
+assert mojo.description.text() == ''
+assert mojo.deprecated.text() == ''
+assert mojo.requiresDependencyResolution.text() == ''
+assert mojo.requiresDependencyCollection.text() == ''
+assert mojo.requiresProject.text() == 'true'
+assert mojo.requiresOnline.text() == 'false'
+assert mojo.requiresDirectInvocation.text() == 'false'
+assert mojo.requiresReports.text() == 'false'
+assert mojo.aggregator.text() == 'false'
+assert mojo.threadSafe.text() == 'false'
+assert mojo.phase.text() == ''
+assert mojo.executePhase.text() == ''
+assert mojo.executeLifecycle.text() == ''
+assert mojo.executionStrategy.text() == 'once-per-session'
+assert mojo.inheritedByDefault.text() == 'true'
+assert mojo.instantiationStrategy.text() == 'per-lookup'
+
+parameter = mojo.parameters.parameter.findAll{ it.name.text() == "param" }[0]
+assert parameter.name.text() == 'param'
+assert parameter.alias.text() == ''
+assert parameter.type.text() == 'java.lang.String'
+assert parameter.deprecated.text() == ''
+assert parameter.required.text() == 'false'
+assert parameter.editable.text() == 'true'
+assert parameter.description.text() == ''
+
+def requirement = mojo.requirements.requirement.findAll{ it.'field-name'.text() == "projectHelper" }[0]
+assert requirement.role.text() == 'org.apache.maven.project.MavenProjectHelper'
+
+// check values set by every annotation
+mojo = pluginDescriptor.mojos.mojo.findAll{ it.goal.text() == "maximal"}[0]
+
+assert mojo.goal.text() == 'maximal'
+assert mojo.implementation.text() == 'org.apache.maven.plugin.coreit.Maximal'
+assert mojo.language.text() == 'java'
+assert mojo.description.text() == 'Checks maximum annotations with non-default values.'
+assert mojo.deprecated.text() == 'deprecated-text'
+assert mojo.requiresDependencyResolution.text() == 'compile'
+assert mojo.requiresDependencyCollection.text() == 'test'
+assert mojo.requiresProject.text() == 'false'
+assert mojo.requiresOnline.text() == 'true'
+assert mojo.requiresDirectInvocation.text() == 'true'
+assert mojo.requiresReports.text() == 'true'
+assert mojo.aggregator.text() == 'true'
+assert mojo.configurator.text() == 'configurator-hint'
+assert mojo.threadSafe.text() == 'true'
+assert mojo.phase.text() == 'package'
+assert mojo.executePhase.text() == 'compile'
+assert mojo.executeLifecycle.text() == ''
+assert mojo.executionStrategy.text() == 'always'
+assert mojo.inheritedByDefault.text() == 'false'
+assert mojo.instantiationStrategy.text() == 'singleton'
+
+parameter = mojo.parameters.parameter.findAll{ it.name.text() == "param" }[0]
+assert parameter.name.text() == 'param'
+assert parameter.alias.text() == 'myAlias'
+assert parameter.type.text() == 'java.lang.String'
+assert parameter.since.text() == 'since-text'
+assert parameter.deprecated.text() == 'deprecated-text'
+assert parameter.required.text() == 'true'
+assert parameter.editable.text() == 'false'
+assert parameter.description.text() == 'Parameter description.'
+
+requirement = mojo.requirements.requirement.findAll{ it.'field-name'.text() == "projectHelper" }[0]
+assert requirement.role.text() == 'org.apache.maven.project.MavenProjectHelper'
+
+// check help mojo source and class
+assert new File( basedir, "target/classes/org/apache/maven/plugin/coreit/HelpMojo.class" ).isFile()
+assert new File( basedir, "target/generated-sources/plugin/org/apache/maven/plugin/coreit/HelpMojo.java" ).isFile()
+assert !new File( basedir, "target/generated-sources/plugin/HelpMojo.java" ).isFile()
+
+return true;
diff --git a/maven-plugin-plugin/src/it/mplugin-324_javadoc/pom.xml b/maven-plugin-plugin/src/it/mplugin-324_javadoc/pom.xml
index ee646a9..8eae5c4 100644
--- a/maven-plugin-plugin/src/it/mplugin-324_javadoc/pom.xml
+++ b/maven-plugin-plugin/src/it/mplugin-324_javadoc/pom.xml
@@ -60,12 +60,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.4</version>
+ <version>3.8.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>3.0.0-M1</version>
+ <version>3.0.1</version>
<configuration>
<level>private</level>
</configuration>
diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
index 0c9a173..7fa1c55 100644
--- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
+++ b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
@@ -50,7 +50,7 @@
* Abstract class for this Plugin.
*
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- * @version $Id$
+ *
*/
public abstract class AbstractGeneratorMojo
extends AbstractMojo
@@ -303,7 +303,7 @@
}
else
{
- filteredDependencies = new LinkedHashSet<Artifact>();
+ filteredDependencies = new LinkedHashSet<>();
ArtifactFilter filter = new IncludesArtifactFilter( mojoDependencies );
diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java
index cee289c..69bf990 100644
--- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java
+++ b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java
@@ -31,14 +31,13 @@
/**
* Generate a plugin descriptor.
* <br/>
- * <b>Note:</b> Since 3.0, for Java 5 plugin annotations support,
+ * <b>Note:</b> Since 3.0, for Java plugin annotations support,
* default <a href="http://maven.apache.org/ref/current/maven-core/lifecycles.html">phase</a>
* defined by this goal is after the "compilation" of any scripts. This doesn't override
* <a href="/ref/current/maven-core/default-bindings.html#Bindings_for_maven-plugin_packaging">the default binding coded
* at generate-resources phase</a> in Maven core.
*
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- * @version $Id$
* @since 2.0
*/
@Mojo( name = "descriptor", defaultPhase = LifecyclePhase.PROCESS_CLASSES,
diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java
index af63c18..767567b 100644
--- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java
+++ b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java
@@ -35,7 +35,7 @@
* Generates a <code>HelpMojo</code> class.
*
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
+ *
* @since 2.4
*/
@Mojo( name = "helpmojo", defaultPhase = LifecyclePhase.GENERATE_SOURCES, threadSafe = true,
diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java
index 969ef08..d432333 100644
--- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java
+++ b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java
@@ -283,11 +283,7 @@
{
return builder.build( new FileReader( pluginXmlFile ) );
}
- catch ( FileNotFoundException e )
- {
- getLog().debug( "Failed to read " + pluginXmlFile + ", fall back to mojoScanner" );
- }
- catch ( PlexusConfigurationException e )
+ catch ( FileNotFoundException | PlexusConfigurationException e )
{
getLog().debug( "Failed to read " + pluginXmlFile + ", fall back to mojoScanner" );
}
@@ -317,7 +313,6 @@
try
{
- @SuppressWarnings( "unchecked" )
List<ComponentDependency> deps = GeneratorUtils.toComponentDependencies( project.getRuntimeDependencies() );
pluginDescriptor.setDependencies( deps );
@@ -528,7 +523,7 @@
tableHeader( new String[]{ goalColumnName, descriptionColumnName } );
}
- List<MojoDescriptor> mojos = new ArrayList<MojoDescriptor>();
+ List<MojoDescriptor> mojos = new ArrayList<>();
mojos.addAll( pluginDescriptor.getMojos() );
PluginUtils.sortMojos( mojos );
for ( MojoDescriptor mojo : mojos )
@@ -765,7 +760,6 @@
return jdk;
}
- @SuppressWarnings( "unchecked" )
Plugin compiler = getCompilerPlugin( project.getBuild().getPluginsAsMap() );
if ( compiler == null )
{
@@ -797,9 +791,9 @@
return "Unknown";
}
- private static Plugin getCompilerPlugin( Map<String, Object> pluginsAsMap )
+ private static Plugin getCompilerPlugin( Map<String, Plugin> pluginsAsMap )
{
- return (Plugin) pluginsAsMap.get( "org.apache.maven.plugins:maven-compiler-plugin" );
+ return pluginsAsMap.get( "org.apache.maven.plugins:maven-compiler-plugin" );
}
private static String getPluginParameter( Plugin plugin, String parameter )
diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/AddPluginArtifactMetadataMojo.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/AddPluginArtifactMetadataMojo.java
index b9d901e..3afd87e 100644
--- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/AddPluginArtifactMetadataMojo.java
+++ b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/AddPluginArtifactMetadataMojo.java
@@ -44,7 +44,7 @@
*
* @see ArtifactRepositoryMetadata
* @see GroupRepositoryMetadata
- * @version $Id$
+ *
* @since 2.0
*/
@Mojo( name = "addPluginArtifactMetadata", defaultPhase = LifecyclePhase.PACKAGE, threadSafe = true )
diff --git a/maven-plugin-plugin/src/site/apt/examples/using-annotations.apt.vm b/maven-plugin-plugin/src/site/apt/examples/using-annotations.apt.vm
index 870daca..b96130c 100644
--- a/maven-plugin-plugin/src/site/apt/examples/using-annotations.apt.vm
+++ b/maven-plugin-plugin/src/site/apt/examples/using-annotations.apt.vm
@@ -26,7 +26,7 @@
~~ NOTE: For help with the syntax of this file, see:
~~ https://maven.apache.org/doxia/references/apt-format.html
-Using Plugin Tools Java5 Annotations
+Using Plugin Tools Java Annotations
Since version 3.0 of the maven-plugin-plugin, you can use Java5 annotations to generate the
plugin descriptor file.
@@ -62,11 +62,11 @@
For more information on these annotations, see the
{{{../../maven-plugin-tools-annotations/index.html#Supported_Annotations}corresponding documentation}}.
- Notice that Plugin Tools Java 5 Annotations are named after Plugin Tools Javadoc Tags
+ Notice that Plugin Tools Java Annotations are named after Plugin Tools Javadoc Tags
with following little differences:
*-------------------------------+---------------+
-|| {{{../../maven-plugin-tools-java/index.html}Plugin Tools Javadoc Tags}} || {{{../../maven-plugin-tools-annotations/index.html}Plugin Tools Java 5 Annotation}} ||
+|| {{{../../maven-plugin-tools-java/index.html}Plugin Tools Javadoc Tags}} || {{{../../maven-plugin-tools-annotations/index.html}Plugin Tools Java Annotation}} ||
*-------------------------------+---------------+
| <<<@goal "goal-name">>> | <<<@Mojo( name = "goal-name" )>>>
*-------------------------------+---------------+
@@ -75,7 +75,7 @@
* POM configuration
- To be able to use these Java 5 annotations, you need to add some configuration to your plugin POM:
+ To be able to use these Java annotations, you need to add some configuration to your plugin POM:
* add <<<maven-plugin-annotations>>> dependency, preferably with <<<provided>>> scope,
diff --git a/maven-plugin-tools-annotations/pom.xml b/maven-plugin-tools-annotations/pom.xml
index 587c501..0e33f69 100644
--- a/maven-plugin-tools-annotations/pom.xml
+++ b/maven-plugin-tools-annotations/pom.xml
@@ -22,28 +22,20 @@
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools</artifactId>
- <version>3.6-SNAPSHOT</version>
+ <version>3.6.0-SNAPSHOT</version>
</parent>
<artifactId>maven-plugin-tools-annotations</artifactId>
<name>Maven Plugin Tool for Java with Annotations</name>
- <description>Descriptor extractor for plugins written in Java with Java 5 annotations.</description>
+ <description>Descriptor extractor for plugins written in Java with Java annotations.</description>
<dependencies>
<!-- maven -->
<dependency>
<groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-model</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-descriptor</artifactId>
+ <artifactId>maven-compat</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
diff --git a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java
index 587ddad..7b9afe7 100644
--- a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java
+++ b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java
@@ -130,10 +130,10 @@
{
// found artifact from reactors to scan sources
// we currently only scan sources from reactors
- List<MavenProject> mavenProjects = new ArrayList<MavenProject>();
+ List<MavenProject> mavenProjects = new ArrayList<>();
// if we need to scan sources from external artifacts
- Set<Artifact> externalArtifacts = new HashSet<Artifact>();
+ Set<Artifact> externalArtifacts = new HashSet<>();
for ( MojoAnnotatedClass mojoAnnotatedClass : mojoAnnotatedClasses )
{
@@ -289,7 +289,7 @@
Map<String, ParameterAnnotationContent> parameters =
getParametersParentHierarchy( entry.getValue(), new HashMap<String, ParameterAnnotationContent>(),
mojoAnnotatedClasses );
- parameters = new TreeMap<String, ParameterAnnotationContent>( parameters );
+ parameters = new TreeMap<>( parameters );
for ( Map.Entry<String, ParameterAnnotationContent> parameter : parameters.entrySet() )
{
JavaField javaField = fieldsMap.get( parameter.getKey() );
@@ -397,7 +397,7 @@
else
{
- rawParams = new TreeMap<String, JavaField>();
+ rawParams = new TreeMap<>();
}
for ( JavaField field : javaClass.getFields() )
@@ -416,7 +416,7 @@
@SuppressWarnings( "unchecked" )
protected Map<String, JavaClass> discoverClasses( final String encoding, final MavenProject project )
{
- List<File> sources = new ArrayList<File>();
+ List<File> sources = new ArrayList<>();
for ( String source : (List<String>) project.getCompileSourceRoots() )
{
@@ -441,7 +441,7 @@
builder.setEncoding( encoding );
// Build isolated Classloader with only the artifacts of the project (none of this plugin)
- List<URL> urls = new ArrayList<URL>( artifacts.size() );
+ List<URL> urls = new ArrayList<>( artifacts.size() );
for ( Artifact artifact : artifacts )
{
try
@@ -467,7 +467,7 @@
return Collections.emptyMap();
}
- Map<String, JavaClass> javaClassMap = new HashMap<String, JavaClass>( javaClasses.size() );
+ Map<String, JavaClass> javaClassMap = new HashMap<>( javaClasses.size() );
for ( JavaClass javaClass : javaClasses )
{
@@ -481,7 +481,7 @@
PluginDescriptor pluginDescriptor )
throws DuplicateParameterException, InvalidParameterException
{
- List<MojoDescriptor> mojoDescriptors = new ArrayList<MojoDescriptor>( mojoAnnotatedClasses.size() );
+ List<MojoDescriptor> mojoDescriptors = new ArrayList<>( mojoAnnotatedClasses.size() );
for ( MojoAnnotatedClass mojoAnnotatedClass : mojoAnnotatedClasses.values() )
{
// no mojo so skip it
@@ -546,8 +546,7 @@
getParametersParentHierarchy( mojoAnnotatedClass, new HashMap<String, ParameterAnnotationContent>(),
mojoAnnotatedClasses );
- for ( ParameterAnnotationContent parameterAnnotationContent : new TreeSet<ParameterAnnotationContent>(
- parameters.values() ) )
+ for ( ParameterAnnotationContent parameterAnnotationContent : new TreeSet<>( parameters.values() ) )
{
org.apache.maven.plugin.descriptor.Parameter parameter =
new org.apache.maven.plugin.descriptor.Parameter();
@@ -581,8 +580,7 @@
getComponentsParentHierarchy( mojoAnnotatedClass, new HashMap<String, ComponentAnnotationContent>(),
mojoAnnotatedClasses );
- for ( ComponentAnnotationContent componentAnnotationContent : new TreeSet<ComponentAnnotationContent>(
- components.values() ) )
+ for ( ComponentAnnotationContent componentAnnotationContent : new TreeSet<>( components.values() ) )
{
org.apache.maven.plugin.descriptor.Parameter parameter =
new org.apache.maven.plugin.descriptor.Parameter();
@@ -649,7 +647,7 @@
MojoAnnotatedClass mojoAnnotatedClass, Map<String, ParameterAnnotationContent> parameters,
Map<String, MojoAnnotatedClass> mojoAnnotatedClasses )
{
- List<ParameterAnnotationContent> parameterAnnotationContents = new ArrayList<ParameterAnnotationContent>();
+ List<ParameterAnnotationContent> parameterAnnotationContents = new ArrayList<>();
parameterAnnotationContents =
getParametersParent( mojoAnnotatedClass, parameterAnnotationContents, mojoAnnotatedClasses );
@@ -657,8 +655,7 @@
// move to parent first to build the Map
Collections.reverse( parameterAnnotationContents );
- Map<String, ParameterAnnotationContent> map =
- new HashMap<String, ParameterAnnotationContent>( parameterAnnotationContents.size() );
+ Map<String, ParameterAnnotationContent> map = new HashMap<>( parameterAnnotationContents.size() );
for ( ParameterAnnotationContent parameterAnnotationContent : parameterAnnotationContents )
{
@@ -688,7 +685,7 @@
MojoAnnotatedClass mojoAnnotatedClass, Map<String, ComponentAnnotationContent> components,
Map<String, MojoAnnotatedClass> mojoAnnotatedClasses )
{
- List<ComponentAnnotationContent> componentAnnotationContents = new ArrayList<ComponentAnnotationContent>();
+ List<ComponentAnnotationContent> componentAnnotationContents = new ArrayList<>();
componentAnnotationContents =
getComponentParent( mojoAnnotatedClass, componentAnnotationContents, mojoAnnotatedClasses );
@@ -696,8 +693,7 @@
// move to parent first to build the Map
Collections.reverse( componentAnnotationContents );
- Map<String, ComponentAnnotationContent> map =
- new HashMap<String, ComponentAnnotationContent>( componentAnnotationContents.size() );
+ Map<String, ComponentAnnotationContent> map = new HashMap<>( componentAnnotationContents.size() );
for ( ComponentAnnotationContent componentAnnotationContent : componentAnnotationContents )
{
diff --git a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/DefaultMojoAnnotationsScanner.java b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/DefaultMojoAnnotationsScanner.java
index 66c846c..2eab391 100644
--- a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/DefaultMojoAnnotationsScanner.java
+++ b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/DefaultMojoAnnotationsScanner.java
@@ -19,18 +19,6 @@
* under the License.
*/
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Pattern;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-
import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Execute;
@@ -46,13 +34,24 @@
import org.apache.maven.tools.plugin.extractor.annotations.scanner.visitors.MojoFieldVisitor;
import org.codehaus.plexus.logging.AbstractLogEnabled;
import org.codehaus.plexus.util.DirectoryScanner;
-import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.reflection.Reflector;
import org.codehaus.plexus.util.reflection.ReflectorException;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.Type;
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Pattern;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
/**
* @author Olivier Lamy
* @since 3.0
@@ -70,7 +69,7 @@
public Map<String, MojoAnnotatedClass> scan( MojoAnnotationsScannerRequest request )
throws ExtractionException
{
- Map<String, MojoAnnotatedClass> mojoAnnotatedClasses = new HashMap<String, MojoAnnotatedClass>();
+ Map<String, MojoAnnotatedClass> mojoAnnotatedClasses = new HashMap<>();
try
{
@@ -126,12 +125,10 @@
protected Map<String, MojoAnnotatedClass> scanArchive( File archiveFile, Artifact artifact, boolean excludeMojo )
throws IOException, ExtractionException
{
- Map<String, MojoAnnotatedClass> mojoAnnotatedClasses = new HashMap<String, MojoAnnotatedClass>();
-
- ZipInputStream archiveStream = new ZipInputStream( new FileInputStream( archiveFile ) );
+ Map<String, MojoAnnotatedClass> mojoAnnotatedClasses = new HashMap<>();
String zipEntryName = null;
- try
+ try ( ZipInputStream archiveStream = new ZipInputStream( new FileInputStream( archiveFile ) ) )
{
String archiveFilename = archiveFile.getAbsolutePath();
for ( ZipEntry zipEntry = archiveStream.getNextEntry(); zipEntry != null;
@@ -153,10 +150,6 @@
throw e;
}
- finally
- {
- IOUtil.close( archiveStream );
- }
return mojoAnnotatedClasses;
}
@@ -174,7 +167,7 @@
Artifact artifact, boolean excludeMojo )
throws IOException, ExtractionException
{
- Map<String, MojoAnnotatedClass> mojoAnnotatedClasses = new HashMap<String, MojoAnnotatedClass>();
+ Map<String, MojoAnnotatedClass> mojoAnnotatedClasses = new HashMap<>();
DirectoryScanner scanner = new DirectoryScanner();
scanner.setBasedir( classDirectory );
@@ -194,15 +187,11 @@
continue;
}
- InputStream is = new BufferedInputStream( new FileInputStream( new File( classDirectory, classFile ) ) );
- try
+ try ( InputStream is = //
+ new BufferedInputStream( new FileInputStream( new File( classDirectory, classFile ) ) ) )
{
analyzeClassStream( mojoAnnotatedClasses, is, artifact, excludeMojo, classDirname, classFile );
}
- finally
- {
- IOUtil.close( is );
- }
}
return mojoAnnotatedClasses;
}
diff --git a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/MojoAnnotatedClass.java b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/MojoAnnotatedClass.java
index fb3a409..ab5f5b1 100644
--- a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/MojoAnnotatedClass.java
+++ b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/MojoAnnotatedClass.java
@@ -99,7 +99,7 @@
{
if ( this.parameters == null )
{
- this.parameters = new HashMap<String, ParameterAnnotationContent>();
+ this.parameters = new HashMap<>();
}
return parameters;
}
@@ -114,7 +114,7 @@
{
if ( this.components == null )
{
- this.components = new HashMap<String, ComponentAnnotationContent>();
+ this.components = new HashMap<>();
}
return components;
}
diff --git a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/MojoAnnotationsScannerRequest.java b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/MojoAnnotationsScannerRequest.java
index b61bca3..5a27cbd 100644
--- a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/MojoAnnotationsScannerRequest.java
+++ b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/MojoAnnotationsScannerRequest.java
@@ -35,13 +35,13 @@
*/
public class MojoAnnotationsScannerRequest
{
- private List<File> classesDirectories = new ArrayList<File>();
+ private List<File> classesDirectories = new ArrayList<>();
- private Set<Artifact> dependencies = new HashSet<Artifact>();
+ private Set<Artifact> dependencies = new HashSet<>();
private List<String> includePatterns = Arrays.asList( "**/*.class" );
- private List<File> sourceDirectories = new ArrayList<File>();
+ private List<File> sourceDirectories = new ArrayList<>();
private MavenProject project;
diff --git a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoAnnotationVisitor.java b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoAnnotationVisitor.java
index b2c82ed..dd231dc 100644
--- a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoAnnotationVisitor.java
+++ b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoAnnotationVisitor.java
@@ -37,7 +37,7 @@
private String annotationClassName;
- private Map<String, Object> annotationValues = new HashMap<String, Object>();
+ private Map<String, Object> annotationValues = new HashMap<>();
MojoAnnotationVisitor( Logger logger, String annotationClassName )
{
diff --git a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoClassVisitor.java b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoClassVisitor.java
index 44c50bb..f6b2bdc 100644
--- a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoClassVisitor.java
+++ b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoClassVisitor.java
@@ -47,9 +47,9 @@
private MojoAnnotatedClass mojoAnnotatedClass;
- private Map<String, MojoAnnotationVisitor> annotationVisitorMap = new HashMap<String, MojoAnnotationVisitor>();
+ private Map<String, MojoAnnotationVisitor> annotationVisitorMap = new HashMap<>();
- private List<MojoFieldVisitor> fieldVisitors = new ArrayList<MojoFieldVisitor>();
+ private List<MojoFieldVisitor> fieldVisitors = new ArrayList<>();
public MojoClassVisitor( Logger logger )
{
diff --git a/maven-plugin-tools-annotations/src/site/apt/index.apt b/maven-plugin-tools-annotations/src/site/apt/index.apt
index 4a95bf2..29f46e7 100644
--- a/maven-plugin-tools-annotations/src/site/apt/index.apt
+++ b/maven-plugin-tools-annotations/src/site/apt/index.apt
@@ -31,7 +31,7 @@
The Maven Plugin Tool for Annotations is the <<<java-annotations>>> implementation of
{{{../maven-plugin-tools-api/index.html}maven-plugin-tools-api}}
to extract descriptors from plugins written in Java with
- {{{../maven-plugin-annotations/index.html}Maven Plugin Tools Java 5 Annotations}}.
+ {{{../maven-plugin-annotations/index.html}Maven Plugin Tools Java Annotations}}.
* Supported Annotations
@@ -124,7 +124,7 @@
* See also
- * {{{../maven-plugin-annotations/index.html}Maven Plugin Tools Java 5 Annotations}}
+ * {{{../maven-plugin-annotations/index.html}Maven Plugin Tools Java Annotations}}
* {{{/developers/mojo-api-specification.html#The_Descriptor_and_Annotations}Mojo API Specification}}
diff --git a/maven-plugin-tools-api/pom.xml b/maven-plugin-tools-api/pom.xml
index 3114234..e7e9257 100644
--- a/maven-plugin-tools-api/pom.xml
+++ b/maven-plugin-tools-api/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools</artifactId>
- <version>3.6-SNAPSHOT</version>
+ <version>3.6.0-SNAPSHOT</version>
</parent>
<artifactId>maven-plugin-tools-api</artifactId>
@@ -37,7 +37,7 @@
<!-- maven -->
<dependency>
<groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
+ <artifactId>maven-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
@@ -51,10 +51,6 @@
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-descriptor</artifactId>
- </dependency>
<!-- plexus -->
<dependency>
diff --git a/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/DefaultPluginToolsRequest.java b/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/DefaultPluginToolsRequest.java
index 9c5dd60..8f70145 100644
--- a/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/DefaultPluginToolsRequest.java
+++ b/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/DefaultPluginToolsRequest.java
@@ -144,7 +144,7 @@
{
if ( this.dependencies == null )
{
- this.dependencies = new HashSet<Artifact>();
+ this.dependencies = new HashSet<>();
}
return dependencies;
}
diff --git a/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/AbstractScriptedMojoDescriptorExtractor.java b/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/AbstractScriptedMojoDescriptorExtractor.java
index 01cbba0..8ad6b9f 100644
--- a/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/AbstractScriptedMojoDescriptorExtractor.java
+++ b/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/AbstractScriptedMojoDescriptorExtractor.java
@@ -38,7 +38,6 @@
/**
* @author jdcasey
- * @version $Id$
*/
public abstract class AbstractScriptedMojoDescriptorExtractor
extends AbstractLogEnabled
@@ -138,11 +137,11 @@
protected Map<String, Set<File>> gatherFilesByBasedir( File basedir, List<String> directories,
String scriptFileExtension, PluginToolsRequest request )
{
- Map<String, Set<File>> sourcesByBasedir = new TreeMap<String, Set<File>>();
+ Map<String, Set<File>> sourcesByBasedir = new TreeMap<>();
for ( String resourceDir : directories )
{
- Set<File> sources = new HashSet<File>();
+ Set<File> sources = new HashSet<>();
getLogger().debug( "Scanning script dir: " + resourceDir + " with extractor: " + getClass().getName() );
File dir = new File( resourceDir );
diff --git a/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/ExtractionException.java b/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/ExtractionException.java
index 783531f..e71bd1f 100644
--- a/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/ExtractionException.java
+++ b/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/ExtractionException.java
@@ -23,7 +23,6 @@
* Wrap errors when extraction exception occurred.
*
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
*/
public class ExtractionException
extends Exception
diff --git a/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/MojoDescriptorExtractor.java b/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/MojoDescriptorExtractor.java
index 9cee5c9..ec3625f 100644
--- a/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/MojoDescriptorExtractor.java
+++ b/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/MojoDescriptorExtractor.java
@@ -27,7 +27,6 @@
/**
* @author jdcasey
- * @version $Id$
*/
public interface MojoDescriptorExtractor
{
diff --git a/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScanner.java b/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScanner.java
index 93556c7..942a26b 100644
--- a/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScanner.java
+++ b/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScanner.java
@@ -128,7 +128,7 @@
if ( result == null )
{
- result = new HashSet<String>( mojoDescriptorExtractors.keySet() );
+ result = new HashSet<>( mojoDescriptorExtractors.keySet() );
}
return result;
@@ -142,7 +142,7 @@
}
else
{
- this.activeExtractors = new HashSet<String>();
+ this.activeExtractors = new HashSet<>();
for ( String extractor : extractors )
{
diff --git a/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/MojoScanner.java b/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/MojoScanner.java
index d488c5e..f510b97 100644
--- a/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/MojoScanner.java
+++ b/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/MojoScanner.java
@@ -27,7 +27,7 @@
/**
* @author jdcasey
- * @version $Id$
+ *
*/
public interface MojoScanner
{
diff --git a/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/util/PluginUtils.java b/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/util/PluginUtils.java
index d2206dc..378b5f7 100644
--- a/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/util/PluginUtils.java
+++ b/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/util/PluginUtils.java
@@ -35,7 +35,7 @@
* Convenience methods to play with Maven plugins.
*
* @author jdcasey
- * @version $Id$
+ *
*/
public final class PluginUtils
{
@@ -55,7 +55,7 @@
public static final Map<String, String> MAVEN_COMPONENTS;
static
{
- Map<String, String> mavenComponents = new HashMap<String, String>();
+ Map<String, String> mavenComponents = new HashMap<>();
mavenComponents.put( "org.apache.maven.execution.MavenSession", "${session}" );
mavenComponents.put( "org.apache.maven.project.MavenProject", "${project}" );
diff --git a/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScannerTest.java b/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScannerTest.java
index 704c2a5..7e281cc 100644
--- a/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScannerTest.java
+++ b/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScannerTest.java
@@ -59,7 +59,7 @@
protected void setUp()
throws Exception
{
- extractors = new HashMap<String, MojoDescriptorExtractor>();
+ extractors = new HashMap<>();
extractors.put( "one", new ScannerTestExtractor( "one" ) );
extractors.put( "two", new ScannerTestExtractor( "two" ) );
extractors.put( "three", new ScannerTestExtractor( "three" ) );
@@ -89,7 +89,7 @@
public void testSpecifiedExtractors()
throws Exception
{
- Set<String> activeExtractors = new HashSet<String>();
+ Set<String> activeExtractors = new HashSet<>();
activeExtractors.add( "one" );
activeExtractors.add( "" );
activeExtractors.add( null );
@@ -136,7 +136,7 @@
public void testUnknownExtractor()
throws Exception
{
- Set<String> activeExtractors = new HashSet<String>();
+ Set<String> activeExtractors = new HashSet<>();
activeExtractors.add( "four" );
PluginDescriptor pluginDescriptor = createPluginDescriptor();
@@ -175,7 +175,7 @@
*/
protected void checkResult( PluginDescriptor pluginDescriptor, Collection<String> expectedGoals )
{
- Set<String> remainingGoals = new HashSet<String>( expectedGoals );
+ Set<String> remainingGoals = new HashSet<>( expectedGoals );
@SuppressWarnings( "unchecked" )
List<MojoDescriptor> descriptors = pluginDescriptor.getMojos();
diff --git a/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/util/stubs/MojoStub.java b/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/util/stubs/MojoStub.java
index ca33e94..00abbae 100644
--- a/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/util/stubs/MojoStub.java
+++ b/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/util/stubs/MojoStub.java
@@ -30,7 +30,6 @@
* Dummy Mojo.
*
* @goal dummy
- * @version $Id$
*/
public class MojoStub
extends AbstractMojo
diff --git a/maven-plugin-tools-generators/pom.xml b/maven-plugin-tools-generators/pom.xml
index 8ca4031..286a58e 100644
--- a/maven-plugin-tools-generators/pom.xml
+++ b/maven-plugin-tools-generators/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools</artifactId>
- <version>3.6-SNAPSHOT</version>
+ <version>3.6.0-SNAPSHOT</version>
</parent>
<artifactId>maven-plugin-tools-generators</artifactId>
@@ -45,16 +45,8 @@
<!-- maven -->
<dependency>
<groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-descriptor</artifactId>
- </dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
diff --git a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/Generator.java b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/Generator.java
index 47abdf6..eea9194 100644
--- a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/Generator.java
+++ b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/Generator.java
@@ -27,7 +27,6 @@
* Generate something, for instance a plugin report, from a plugin descriptor.
*
* @author <a href="mailto:jason@maven.org">Jason van Zyl </a>
- * @version $Id$
*/
public interface Generator
{
diff --git a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java
index 08ff7b2..771b08b 100644
--- a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java
+++ b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java
@@ -57,7 +57,6 @@
* Convenience methods to play with Maven plugins.
*
* @author jdcasey
- * @version $Id$
*/
public final class GeneratorUtils
{
@@ -124,7 +123,7 @@
*/
public static List<ComponentDependency> toComponentDependencies( List<Dependency> dependencies )
{
- List<ComponentDependency> componentDeps = new LinkedList<ComponentDependency>();
+ List<ComponentDependency> componentDeps = new LinkedList<>();
for ( Dependency dependency : dependencies )
{
@@ -381,7 +380,7 @@
* A stack of {@link Counter} objects corresponding to the nesting of (un-)ordered lists. A
* <code>null</code> element denotes an unordered list.
*/
- private Stack<Counter> numbering = new Stack<Counter>();
+ private Stack<Counter> numbering = new Stack<>();
/**
* A flag whether an implicit line break is pending in the output buffer. This flag is used to postpone the
@@ -597,8 +596,8 @@
*/
public static String discoverPackageName( PluginDescriptor pluginDescriptor )
{
- Map<String, Integer> packageNames = new HashMap<String, Integer>();
- @SuppressWarnings( "unchecked" )
+ Map<String, Integer> packageNames = new HashMap<>();
+
List<MojoDescriptor> mojoDescriptors = pluginDescriptor.getMojos();
if ( mojoDescriptors == null )
{
@@ -679,7 +678,7 @@
throw new IllegalArgumentException( e );
}
- List<URL> urls = new ArrayList<URL>( classPathStrings.size() );
+ List<URL> urls = new ArrayList<>( classPathStrings.size() );
for ( String classPathString : classPathStrings )
{
try
diff --git a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java
index 3278f0f..1375cae 100644
--- a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java
+++ b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java
@@ -48,7 +48,6 @@
* Generate a <a href="/ref/current/maven-plugin-api/plugin.html">Maven Plugin Descriptor XML file</a> and
* corresponding <code>plugin-help.xml</code> help content for {@link PluginHelpGenerator}.
*
- * @version $Id$
*/
public class PluginDescriptorGenerator
implements Generator
@@ -418,9 +417,9 @@
w.startElement( "parameters" );
- Map<String, Requirement> requirements = new LinkedHashMap<String, Requirement>();
+ Map<String, Requirement> requirements = new LinkedHashMap<>();
- Set<Parameter> configuration = new LinkedHashSet<Parameter>();
+ Set<Parameter> configuration = new LinkedHashSet<>();
if ( parameters != null )
{
diff --git a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
index 23c3ed9..6cefa1a 100644
--- a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
+++ b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
@@ -36,8 +36,8 @@
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;
+import org.objectweb.asm.commons.ClassRemapper;
import org.objectweb.asm.commons.Remapper;
-import org.objectweb.asm.commons.RemappingClassAdapter;
import org.objectweb.asm.commons.SimpleRemapper;
import java.io.File;
@@ -58,14 +58,13 @@
* Generates an <code>HelpMojo</code> class from <code>help-class-source.vm</code> template.
* The generated mojo reads help content from <code>META-INF/maven/${groupId}/${artifactId}/plugin-help.xml</code>
* resource, which is generated by this {@link PluginDescriptorGenerator}.
- * <p>Notice that the help mojo source needs to be generated before compilation, but when Java 5 annotations are used,
+ * <p>Notice that the help mojo source needs to be generated before compilation, but when Java annotations are used,
* plugin descriptor content is available only after compilation (detecting annotations in .class files):
* help mojo source can be generated with empty package only (and no plugin descriptor available yet), then needs
* to be updated after compilation - through {@link #rewriteHelpMojo(PluginToolsRequest, Log)} which is called from
* plugin descriptor XML generation.</p>
*
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
* @since 2.4
*/
public class PluginHelpGenerator
@@ -115,8 +114,7 @@
String helpImplementation = getImplementation( pluginDescriptor );
- @SuppressWarnings( "unchecked" )
- List<MojoDescriptor> mojoDescriptors = pluginDescriptor.getMojos();
+ @SuppressWarnings( "unchecked" ) List<MojoDescriptor> mojoDescriptors = pluginDescriptor.getMojos();
if ( mojoDescriptors != null )
{
@@ -137,10 +135,9 @@
}
writeHelpPropertiesFile( request, destinationDirectory );
-
- useAnnotations =
- request.getProject().getArtifactMap().containsKey(
- "org.apache.maven.plugin-tools:maven-plugin-annotations" );
+
+ useAnnotations = request.getProject().getArtifactMap().containsKey(
+ "org.apache.maven.plugin-tools:maven-plugin-annotations" );
try
{
@@ -149,8 +146,8 @@
File helpClass = new File( destinationDirectory, sourcePath );
helpClass.getParentFile().mkdirs();
- String helpClassSources = getHelpClassSources( getPluginHelpPath( request.getProject() ),
- pluginDescriptor );
+ String helpClassSources =
+ getHelpClassSources( getPluginHelpPath( request.getProject() ), pluginDescriptor );
FileUtils.fileWrite( helpClass, request.getEncoding(), helpClassSources );
}
@@ -165,7 +162,7 @@
this.helpPackageName = helpPackageName;
return this;
}
-
+
public VelocityComponent getVelocityComponent()
{
return velocityComponent;
@@ -182,6 +179,7 @@
// ----------------------------------------------------------------------
private String getHelpClassSources( String pluginHelpPath, PluginDescriptor pluginDescriptor )
+ throws IOException
{
Properties properties = new Properties();
VelocityContext context = new VelocityContext( properties );
@@ -200,24 +198,18 @@
StringWriter stringWriter = new StringWriter();
- InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( "help-class-source.vm" );
- InputStreamReader isReader = null;
- try
+ // plugin-tools sources are UTF-8 (and even ASCII in this case))
+ try ( InputStream is = //
+ Thread.currentThread().getContextClassLoader().getResourceAsStream( "help-class-source.vm" ); //
+ InputStreamReader isReader = new InputStreamReader( is, "UTF-8" ) )
{
- isReader = new InputStreamReader( is, "UTF-8" ); // plugin-tools sources are UTF-8 (and even ASCII in this
- // case)
+ //isReader =
velocityComponent.getEngine().evaluate( context, stringWriter, "", isReader );
}
catch ( UnsupportedEncodingException e )
{
// not supposed to happen since UTF-8 is supposed to be supported by any JVM
}
- finally
- {
- IOUtil.close( is );
- IOUtil.close( isReader );
- }
-
return stringWriter.toString();
}
@@ -233,8 +225,9 @@
helpPackageName = GeneratorUtils.discoverPackageName( pluginDescriptor );
}
- return StringUtils.isEmpty( helpPackageName ) ? HELP_MOJO_CLASS_NAME : helpPackageName + '.'
- + HELP_MOJO_CLASS_NAME;
+ return StringUtils.isEmpty( helpPackageName )
+ ? HELP_MOJO_CLASS_NAME
+ : helpPackageName + '.' + HELP_MOJO_CLASS_NAME;
}
/**
@@ -251,8 +244,7 @@
properties.put( "helpPackageName", helpPackageName == null ? "" : helpPackageName );
properties.put( "destinationDirectory", destinationDirectory.getAbsolutePath() );
- File tmpPropertiesFile =
- new File( request.getProject().getBuild().getDirectory(), HELP_PROPERTIES_FILENAME );
+ File tmpPropertiesFile = new File( request.getProject().getBuild().getDirectory(), HELP_PROPERTIES_FILENAME );
if ( tmpPropertiesFile.exists() )
{
@@ -263,20 +255,14 @@
tmpPropertiesFile.getParentFile().mkdirs();
}
- FileOutputStream fos = null;
- try
+ try ( FileOutputStream fos = new FileOutputStream( tmpPropertiesFile ) )
{
- fos = new FileOutputStream( tmpPropertiesFile );
properties.store( fos, "maven plugin help mojo generation informations" );
}
catch ( IOException e )
{
throw new GeneratorException( e.getMessage(), e );
}
- finally
- {
- IOUtil.close( fos );
- }
}
static String getPluginHelpPath( MavenProject mavenProject )
@@ -294,8 +280,7 @@
static void rewriteHelpMojo( PluginToolsRequest request, Log log )
throws GeneratorException
{
- File tmpPropertiesFile =
- new File( request.getProject().getBuild().getDirectory(), HELP_PROPERTIES_FILENAME );
+ File tmpPropertiesFile = new File( request.getProject().getBuild().getDirectory(), HELP_PROPERTIES_FILENAME );
if ( !tmpPropertiesFile.exists() )
{
@@ -315,7 +300,7 @@
{
// writeHelpPropertiesFile() creates 2 properties: find one without the other should not be possible
log.warn( "\n\nUnexpected situation: destinationDirectory not defined in " + HELP_PROPERTIES_FILENAME
- + " during help mojo source generation but expected during XML descriptor generation." );
+ + " during help mojo source generation but expected during XML descriptor generation." );
log.warn( "Please check helpmojo goal version used in previous build phase." );
log.warn( "If you just upgraded to plugin-tools >= 3.2 you must run a clean build at least once." );
destinationDirectory = new File( "target/generated-sources/plugin" );
@@ -368,15 +353,12 @@
{
helpSourceFileNew.getParentFile().mkdirs();
}
- Reader sourceReader = null;
- PrintWriter sourceWriter = null;
- try
+ try ( Reader sourceReader = new InputStreamReader( new FileInputStream( helpSourceFile ), //
+ request.getEncoding() ); //
+ PrintWriter sourceWriter = new PrintWriter(
+ new OutputStreamWriter( new FileOutputStream( helpSourceFileNew ), //
+ request.getEncoding() ) ) )
{
- sourceReader = new InputStreamReader( new FileInputStream( helpSourceFile ), request.getEncoding() );
- sourceWriter =
- new PrintWriter( new OutputStreamWriter( new FileOutputStream( helpSourceFileNew ),
- request.getEncoding() ) );
-
sourceWriter.println( "package " + destinationPackage + ";" );
IOUtil.copy( sourceReader, sourceWriter );
}
@@ -384,11 +366,6 @@
{
throw new GeneratorException( e.getMessage(), e );
}
- finally
- {
- IOUtil.close( sourceReader );
- IOUtil.close( sourceWriter );
- }
helpSourceFileNew.setLastModified( helpSourceFile.lastModified() );
helpSourceFile.delete();
}
@@ -401,27 +378,21 @@
rewriteHelpClassFile.getParentFile().mkdirs();
}
- FileInputStream fileInputStream = null;
- ClassReader cr = null;
- try
+ ClassReader cr;
+ try ( FileInputStream fileInputStream = new FileInputStream( helpClassFile ) )
{
- fileInputStream = new FileInputStream( helpClassFile );
cr = new ClassReader( fileInputStream );
}
catch ( IOException e )
{
throw new GeneratorException( e.getMessage(), e );
}
- finally
- {
- IOUtil.close( fileInputStream );
- }
ClassWriter cw = new ClassWriter( 0 );
Remapper packageRemapper =
new SimpleRemapper( HELP_MOJO_CLASS_NAME, packageAsDirectory + '/' + HELP_MOJO_CLASS_NAME );
- ClassVisitor cv = new RemappingClassAdapter( cw, packageRemapper );
+ ClassVisitor cv = new ClassRemapper( cw, packageRemapper );
try
{
@@ -433,20 +404,14 @@
}
byte[] renamedClass = cw.toByteArray();
- FileOutputStream fos = null;
- try
+ try ( FileOutputStream fos = new FileOutputStream( rewriteHelpClassFile ) )
{
- fos = new FileOutputStream( rewriteHelpClassFile );
fos.write( renamedClass );
}
catch ( IOException e )
{
throw new GeneratorException( "Error rewriting help class: " + e.getMessage(), e );
}
- finally
- {
- IOUtil.close( fos );
- }
helpClassFile.delete();
diff --git a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java
index 5bf43b0..77447c2 100644
--- a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java
+++ b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java
@@ -24,7 +24,6 @@
import org.apache.maven.project.MavenProject;
import org.apache.maven.tools.plugin.ExtendedMojoDescriptor;
import org.apache.maven.tools.plugin.PluginToolsRequest;
-import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
import org.codehaus.plexus.util.xml.XMLWriter;
@@ -44,8 +43,6 @@
/**
* Generate xdoc documentation for each mojo.
- *
- * @version $Id$
*/
public class PluginXdocGenerator
implements Generator
@@ -109,8 +106,7 @@
{
if ( request.getPluginDescriptor().getMojos() != null )
{
- @SuppressWarnings( "unchecked" )
- List<MojoDescriptor> mojos = request.getPluginDescriptor().getMojos();
+ @SuppressWarnings( "unchecked" ) List<MojoDescriptor> mojos = request.getPluginDescriptor().getMojos();
for ( MojoDescriptor descriptor : mojos )
{
@@ -135,20 +131,14 @@
{
File outputFile = new File( destinationDirectory, getMojoFilename( mojoDescriptor, "xml" ) );
String encoding = "UTF-8";
- Writer writer = null;
- try
+ try ( Writer writer = new OutputStreamWriter( new FileOutputStream( outputFile ), encoding ) )
{
- writer = new OutputStreamWriter( new FileOutputStream( outputFile ), encoding );
XMLWriter w = new PrettyPrintXMLWriter( new PrintWriter( writer ), encoding, null );
writeBody( mojoDescriptor, w );
writer.flush();
}
- finally
- {
- IOUtil.close( writer );
- }
}
/**
@@ -405,13 +395,12 @@
*/
private void writeGoalParameterTable( MojoDescriptor mojoDescriptor, XMLWriter w )
{
- @SuppressWarnings( "unchecked" )
List<Parameter> parameterList = mojoDescriptor.getParameters();
// remove components and read-only parameters
List<Parameter> list = filterParameters( parameterList );
- if ( list != null && list.size() > 0 )
+ if ( !list.isEmpty() )
{
writeParameterSummary( mojoDescriptor, list, w );
@@ -438,7 +427,7 @@
*/
private List<Parameter> filterParameters( List<Parameter> parameterList )
{
- List<Parameter> filtered = new ArrayList<Parameter>();
+ List<Parameter> filtered = new ArrayList<>();
if ( parameterList != null )
{
@@ -543,7 +532,7 @@
addedUl = addUl( w, addedUl, parameter.getDefaultValue() );
writeDetail( getString( "pluginxdoc.mojodescriptor.parameter.default" ),
escapeXml( parameter.getDefaultValue() ), w );
-
+
addedUl = addUl( w, addedUl, parameter.getAlias() );
writeDetail( getString( "pluginxdoc.mojodescriptor.parameter.alias" ), escapeXml( parameter.getAlias() ),
w );
@@ -592,7 +581,7 @@
// no property can be extracted
return null;
}
-
+
/**
* @param param not null
* @param value could be null
@@ -725,7 +714,7 @@
w.writeMarkup( format( "pluginxdoc.mojodescriptor.parameter.property.description", property ) );
w.writeMarkup( "<br/>" );
}
-
+
if ( StringUtils.isNotEmpty( parameter.getAlias() ) )
{
w.writeMarkup( format( "pluginxdoc.mojodescriptor.parameter.alias.description",
@@ -747,7 +736,7 @@
*/
private List<Parameter> getParametersByRequired( boolean required, List<Parameter> parameterList )
{
- List<Parameter> list = new ArrayList<Parameter>();
+ List<Parameter> list = new ArrayList<>();
for ( Parameter parameter : parameterList )
{
diff --git a/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/AbstractGeneratorTestCase.java b/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/AbstractGeneratorTestCase.java
index 5619ed4..50a565b 100644
--- a/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/AbstractGeneratorTestCase.java
+++ b/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/AbstractGeneratorTestCase.java
@@ -19,30 +19,26 @@
* under the License.
*/
-import java.io.File;
-import java.lang.reflect.Constructor;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
import org.apache.maven.model.Build;
-import org.apache.maven.monitor.logging.DefaultLog;
import org.apache.maven.plugin.descriptor.MojoDescriptor;
import org.apache.maven.plugin.descriptor.Parameter;
import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.plugin.logging.SystemStreamLog;
-import org.apache.maven.plugin.testing.SilentLog;
import org.apache.maven.project.MavenProject;
import org.apache.maven.tools.plugin.DefaultPluginToolsRequest;
import org.codehaus.plexus.PlexusTestCase;
import org.codehaus.plexus.component.repository.ComponentDependency;
-import org.codehaus.plexus.logging.Logger;
import org.codehaus.plexus.util.FileUtils;
+import java.io.File;
+import java.lang.reflect.Constructor;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl </a>
- * @version $Id: AbstractGeneratorTestCase.java,v 1.1 2005/02/20 16:25:21
- * jdcasey Exp $
*/
public abstract class AbstractGeneratorTestCase
extends PlexusTestCase
diff --git a/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGeneratorTest.java b/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGeneratorTest.java
index 9a1ab71..a1c646e 100644
--- a/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGeneratorTest.java
+++ b/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGeneratorTest.java
@@ -36,8 +36,6 @@
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl </a>
- * @version $Id: PluginDescriptorGeneratorTest.java,v 1.1.1.1 2004/08/09
- * 18:43:10 jvanzyl Exp $
*/
public class PluginDescriptorGeneratorTest
extends AbstractGeneratorTestCase
@@ -70,7 +68,7 @@
assertEquals( 1, dependencies.size() );
- ComponentDependency dependency = (ComponentDependency) dependencies.get( 0 );
+ ComponentDependency dependency = dependencies.get( 0 );
assertEquals( "testGroup", dependency.getGroupId() );
assertEquals( "testArtifact", dependency.getArtifactId() );
assertEquals( "0.0.0", dependency.getVersion() );
@@ -80,18 +78,17 @@
throws IOException
{
StringWriter sWriter = new StringWriter();
- PrintWriter pWriter = new PrintWriter( sWriter );
- BufferedReader reader = new BufferedReader( ReaderFactory.newXmlReader( pluginDescriptorFile ) );
-
- String line = null;
- while ( ( line = reader.readLine() ) != null )
+ try (PrintWriter pWriter = new PrintWriter( sWriter ); //
+ BufferedReader reader = new BufferedReader( ReaderFactory.newXmlReader( pluginDescriptorFile ) ))
{
- pWriter.println( line );
+ String line = null;
+ while ( ( line = reader.readLine() ) != null )
+ {
+ pWriter.println( line );
+ }
}
- reader.close();
-
return sWriter.toString();
}
diff --git a/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/PluginHelpGeneratorTest.java b/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/PluginHelpGeneratorTest.java
index 725967b..bd5d374 100644
--- a/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/PluginHelpGeneratorTest.java
+++ b/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/PluginHelpGeneratorTest.java
@@ -23,7 +23,6 @@
/**
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
*/
public class PluginHelpGeneratorTest
extends AbstractGeneratorTestCase
diff --git a/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/PluginXdocGeneratorTest.java b/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/PluginXdocGeneratorTest.java
index ac438af..6429dc7 100644
--- a/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/PluginXdocGeneratorTest.java
+++ b/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/PluginXdocGeneratorTest.java
@@ -27,7 +27,6 @@
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl </a>
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
*/
public class PluginXdocGeneratorTest
extends AbstractGeneratorTestCase
diff --git a/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/stubs/MavenReportStub.java b/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/stubs/MavenReportStub.java
index e00d4aa..5f7ae4e 100644
--- a/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/stubs/MavenReportStub.java
+++ b/maven-plugin-tools-generators/src/test/java/org/apache/maven/tools/plugin/generator/stubs/MavenReportStub.java
@@ -30,7 +30,6 @@
* Dummy report.
*
* @goal dummyReport
- * @version $Id$
*/
public class MavenReportStub
extends AbstractMavenReport
diff --git a/maven-plugin-tools-java/pom.xml b/maven-plugin-tools-java/pom.xml
index 97cd0fc..980fb2f 100644
--- a/maven-plugin-tools-java/pom.xml
+++ b/maven-plugin-tools-java/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools</artifactId>
- <version>3.6-SNAPSHOT</version>
+ <version>3.6.0-SNAPSHOT</version>
</parent>
<artifactId>maven-plugin-tools-java</artifactId>
@@ -43,17 +43,9 @@
<!-- maven -->
<dependency>
<groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-descriptor</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-api</artifactId>
</dependency>
diff --git a/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/javadoc/JavaJavadocMojoDescriptorExtractor.java b/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/javadoc/JavaJavadocMojoDescriptorExtractor.java
index 137d90d..72b84d1 100644
--- a/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/javadoc/JavaJavadocMojoDescriptorExtractor.java
+++ b/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/javadoc/JavaJavadocMojoDescriptorExtractor.java
@@ -59,7 +59,6 @@
* <a href="http://maven.apache.org/developers/mojo-api-specification.html">
* http://maven.apache.org/developers/mojo-api-specification.html</a>
*
- * @version $Id$
* @see org.apache.maven.plugin.descriptor.MojoDescriptor
*/
@Component( role = MojoDescriptorExtractor.class, hint = "java-javadoc" )
@@ -572,7 +571,7 @@
{
Collection<JavaClass> javaClasses = discoverClasses( request );
- List<MojoDescriptor> descriptors = new ArrayList<MojoDescriptor>();
+ List<MojoDescriptor> descriptors = new ArrayList<>();
for ( JavaClass javaClass : javaClasses )
{
@@ -604,7 +603,7 @@
builder.setEncoding( request.getEncoding() );
// Build isolated Classloader with only the artifacts of the project (none of this plugin)
- List<URL> urls = new ArrayList<URL>( request.getDependencies().size() );
+ List<URL> urls = new ArrayList<>( request.getDependencies().size() );
for ( Artifact artifact : request.getDependencies() )
{
try
diff --git a/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/javadoc/JavadocMojoAnnotation.java b/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/javadoc/JavadocMojoAnnotation.java
index 0959241..79dcc70 100644
--- a/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/javadoc/JavadocMojoAnnotation.java
+++ b/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/javadoc/JavadocMojoAnnotation.java
@@ -23,7 +23,6 @@
* List of all Javadoc annotations used to describe a java Mojo.
*
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
* @since 2.4
*/
@SuppressWarnings( "checkstyle:interfaceistype" )
diff --git a/maven-plugin-tools-javadoc/pom.xml b/maven-plugin-tools-javadoc/pom.xml
deleted file mode 100644
index ecbc882..0000000
--- a/maven-plugin-tools-javadoc/pom.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<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>
-
- <parent>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools</artifactId>
- <version>3.6-SNAPSHOT</version>
- </parent>
-
- <artifactId>maven-plugin-tools-javadoc</artifactId>
-
- <name>Maven Plugin Tools Javadoc Taglets</name>
- <description>
- The Maven Plugin Tools Javadoc Taglets provides several Javadoc taglets to be used when generating Javadoc from
- java sources annotated with Mojo Javadoc Tags.
- </description>
- <inceptionYear>2008</inceptionYear>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-java</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-enforcer-plugin</artifactId>
- <executions>
- <execution>
- <id>enforce-bytecode-version</id>
- <configuration>
- <rules>
- <enforceBytecodeVersion>
- <excludes>
- <exclude>com.sun:tools</exclude>
- </excludes>
- </enforceBytecodeVersion>
- </rules>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>default-tools.jar</id>
- <activation>
- <property>
- <name>java.vendor</name>
- <value>Sun Microsystems Inc.</value>
- </property>
- <jdk>(,1.9)</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>com.sun</groupId>
- <artifactId>tools</artifactId>
- <version>1.4.2</version>
- <scope>system</scope>
- <systemPath>${java.home}/../lib/tools.jar</systemPath>
- </dependency>
- </dependencies>
- </profile>
- <profile>
- <id>jdk1.7</id>
- <activation>
- <property>
- <name>java.vendor</name>
- <value>Oracle Corporation</value>
- </property>
- <jdk>(,1.9)</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>com.sun</groupId>
- <artifactId>tools</artifactId>
- <version>1.4.2</version>
- <scope>system</scope>
- <systemPath>${java.home}/../lib/tools.jar</systemPath>
- </dependency>
- </dependencies>
- </profile>
- <profile>
- <id>run-its</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-invoker-plugin</artifactId>
- <version>${mavenInvokerPluginVersion}</version>
- <configuration>
- <debug>true</debug>
- <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
- <preBuildHookScript>setup.bsh</preBuildHookScript>
- <postBuildHookScript>verify.bsh</postBuildHookScript>
- <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
- <settingsFile>src/it/settings.xml</settingsFile>
- <addTestClassPath>true</addTestClassPath>
- <goals>
- <goal>clean</goal>
- <goal>javadoc:javadoc</goal>
- </goals>
- </configuration>
- <executions>
- <execution>
- <id>integration-test</id>
- <goals>
- <goal>install</goal>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
diff --git a/maven-plugin-tools-javadoc/src/it/basic/pom.xml b/maven-plugin-tools-javadoc/src/it/basic/pom.xml
deleted file mode 100644
index 0e1d7cd..0000000
--- a/maven-plugin-tools-javadoc/src/it/basic/pom.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<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.tools.plugin.javadoc</groupId>
- <artifactId>test</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>jar</packaging>
-
- <inceptionYear>2008</inceptionYear>
- <name>Test Mojo Tags</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-api</artifactId>
- <version>2.0</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>3.0.0-M1</version>
- <configuration>
- <outputDirectory>${basedir}/target/site/apidocs</outputDirectory>
-
- <debug>true</debug>
- <show>private</show>
- <encoding>ISO-8859-1</encoding>
- <docencoding>ISO-8859-1</docencoding>
- <charset>ISO-8859-1</charset>
-
- <taglets>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet</tagletClass>
- </taglet>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet</tagletClass>
- </taglet>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet</tagletClass>
- </taglet>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet</tagletClass>
- </taglet>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet</tagletClass>
- </taglet>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet</tagletClass>
- </taglet>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet</tagletClass>
- </taglet>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet</tagletClass>
- </taglet>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet</tagletClass>
- </taglet>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet</tagletClass>
- </taglet>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoReadOnlyFieldTaglet</tagletClass>
- </taglet>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiredFieldTaglet</tagletClass>
- </taglet>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyResolutionTypeTaglet</tagletClass>
- </taglet>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyCollectionTypeTaglet</tagletClass>
- </taglet>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet</tagletClass>
- </taglet>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet</tagletClass>
- </taglet>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet</tagletClass>
- </taglet>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet</tagletClass>
- </taglet>
- <taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoThreadSafeTypeTaglet</tagletClass>
- </taglet>
- </taglets>
-
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>@project.version@</version>
- </tagletArtifact>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/maven-plugin-tools-javadoc/src/it/basic/src/main/java/org/apache/maven/plugin/my/MyMojo.java b/maven-plugin-tools-javadoc/src/it/basic/src/main/java/org/apache/maven/plugin/my/MyMojo.java
deleted file mode 100644
index 2507fc1..0000000
--- a/maven-plugin-tools-javadoc/src/it/basic/src/main/java/org/apache/maven/plugin/my/MyMojo.java
+++ /dev/null
@@ -1,116 +0,0 @@
-package org.apache.maven.plugin.my;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.io.IOException;
-
-/**
- * Goal which touches a timestamp file.
- *
- * @aggregator
- * @configurator roleHint
- * @execute phase="validate" lifecycle="default"
- * @executionStrategy always
- * @goal touch
- * @inheritByDefault true
- * @instantiationStrategy per-lookup
- * @phase phaseName
- * @requiresDependencyResolution compile
- * @requiresDirectInvocation
- * @requiresOnline
- * @requiresProject
- * @requiresReports
- */
-public class MyMojo
- extends AbstractMojo
-{
- /**
- * Location of the file.
- *
- * @parameter expression="${project.build.directory}"
- * @required
- */
- private File outputDirectory;
-
- /**
- * Dummy parameter.
- *
- * @parameter expression="${project.build.directory}" default-value="value" alias="myAlias"
- * @required
- * @readonly
- */
- private String dummy;
-
- /**
- * Dummy component.
- *
- * @component role="org.apacha.maven.MyComponent" roleHint="default"
- * @required
- * @readonly
- */
- private String component;
-
- /** {@inheritDoc} */
- public void execute()
- throws MojoExecutionException
- {
- File f = outputDirectory;
-
- if ( !f.exists() )
- {
- f.mkdirs();
- }
-
- File touch = new File( f, "touch.txt" );
-
- Writer w = null;
- try
- {
- w = new OutputStreamWriter( new FileOutputStream( touch ), "UTF-8" );
-
- w.write( "touch.txt" );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Error creating file " + touch, e );
- }
- finally
- {
- if ( w != null )
- {
- try
- {
- w.close();
- }
- catch ( IOException e )
- {
- // ignore
- }
- }
- }
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/it/basic/verify.bsh b/maven-plugin-tools-javadoc/src/it/basic/verify.bsh
deleted file mode 100644
index 005d442..0000000
--- a/maven-plugin-tools-javadoc/src/it/basic/verify.bsh
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.*;
-import java.util.*;
-import java.util.regex.*;
-
-import org.apache.maven.tools.plugin.javadoc.*;
-
-import org.codehaus.plexus.util.*;
-
-setAccessibility( true );
-
-File docsDir = new File( basedir, "target/site/apidocs" );
-System.out.println( "Checking for existence of: " + docsDir );
-if ( !docsDir.exists() )
-{
- throw new FileNotFoundException( docsDir + " was not created" );
-}
-
-File docFile = new File( docsDir, "org/apache/maven/plugin/my/MyMojo.html" );
-System.out.println( "Checking for existence of: " + docFile );
-if ( !docFile.isFile() )
-{
- throw new FileNotFoundException( docFile + " was not created" );
-}
-
-String html = FileUtils.fileRead( docFile, "ISO-8859-1").replaceAll( "(\r\n)|(\r)|(\n)", "" );
-
-System.out.println( "Checking for documentation of mojo type" );
-String mojoType = "<dl><dt><b>" + MojoAggregatorTypeTaglet.HEADER + "</b></dt><dd></dd><dt><b>"
- + MojoConfiguratorTypeTaglet.HEADER + ":</b></dt><dd>roleHint</dd><dt><b>" + MojoExecuteTypeTaglet.HEADER
- + ":</b></dt><dd><dl><dt><b>phase:</b></dt><dd>validate</dd>"
- + "<dt><b>lifecycle:</b></dt><dd>default</dd></dl></dd><dt><b>" + MojoExecutionStrategyTypeTaglet.HEADER
- + ":</b></dt><dd>always</dd>" + "<dt><b>" + MojoGoalTypeTaglet.HEADER + ":</b></dt><dd>touch</dd>"
- + "<dt><b>" + MojoInheritByDefaultTypeTaglet.HEADER + ":</b></dt><dd>true</dd><dt><b>"
- + MojoInstantiationStrategyTypeTaglet.HEADER + ":</b></dt><dd>per-lookup</dd><dt><b>"
- + MojoPhaseTypeTaglet.HEADER + ":</b></dt><dd>phaseName</dd><dt><b>"
- + MojoRequiresDependencyResolutionTypeTaglet.HEADER + ":</b></dt><dd>compile</dd><dt><b>"
- + MojoRequiresDirectInvocationTypeTaglet.HEADER + ":</b></dt><dd>false</dd><dt><b>"
- + MojoRequiresOnLineTypeTaglet.HEADER + ":</b></dt><dd>true</dd><dt><b>"
- + MojoRequiresProjectTypeTaglet.HEADER + ":</b></dt><dd>true</dd><dt><b>"
- + MojoRequiresReportsTypeTaglet.HEADER + ":</b></dt><dd>false</dd></dl>";
-if ( html.toLowerCase( Locale.ENGLISH ).indexOf( ( mojoType ).toLowerCase( Locale.ENGLISH ) ) < 0 )
-{
- throw new IllegalStateException( "Mojo type doc wrong" );
-}
-
-System.out.println( "Checking for documentation of mojo fields" );
-// order has changed between JDK7 and JDK8
-String mojoField = Pattern.quote("<dl><dt><b>" + MojoParameterFieldTaglet.HEADER + ":</b></dt><dd><dl>" )
- + "(" + Pattern.quote( "<dt><b>expression:</b></dt><dd>${project.build.directory}</dd>" )
- + "|" + Pattern.quote( "<dt><b>default-value:</b></dt><dd>value</dd>" )
- + "|" + Pattern.quote( "<dt><b>alias:</b></dt><dd>myAlias</dd>" )
- + "){3}" + Pattern.quote("</dl></dd><dt><b>" + MojoReadOnlyFieldTaglet.HEADER + "</b></dt><dd>" )
- + Pattern.quote( "</dd><dt><b>" + MojoRequiredFieldTaglet.HEADER + "</b></dt><dd></dd></dl>");
-if ( !Pattern.compile( mojoField, Pattern.CASE_INSENSITIVE ).matcher( html ).find() )
-{
- System.out.println( mojoField );
- throw new IllegalStateException( "Mojo field doc wrong!!!" );
-}
-
-mojoField = "<dl><dt><b>" + MojoComponentFieldTaglet.HEADER + ":</b></dt><dd><dl><dt><b>role:</b>"
- + "</dt><dd>org.apacha.maven.MyComponent</dd><dt><b>roleHint:</b></dt><dd>default</dd></dl></dd>"
- + "<dt><b>" + MojoReadOnlyFieldTaglet.HEADER + "</b></dt><dd></dd><dt><b>" + MojoRequiredFieldTaglet.HEADER
- + "</b></dt><dd>" + "</dd></dl>";
-if ( html.toLowerCase( Locale.ENGLISH ).indexOf( ( mojoField ).toLowerCase( Locale.ENGLISH ) ) < 0 )
-{
- throw new IllegalStateException( "Mojo field doc wrong" );
-}
-
-return true;
diff --git a/maven-plugin-tools-javadoc/src/it/settings.xml b/maven-plugin-tools-javadoc/src/it/settings.xml
deleted file mode 100644
index c8f77f0..0000000
--- a/maven-plugin-tools-javadoc/src/it/settings.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<settings>
- <profiles>
- <profile>
- <id>it-repo</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <repositories>
- <repository>
- <id>local.central</id>
- <url>@localRepositoryUrl@</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>local.central</id>
- <url>@localRepositoryUrl@</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
- </profile>
- </profiles>
-</settings>
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoFieldTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoFieldTaglet.java
deleted file mode 100644
index df21ac8..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoFieldTaglet.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * Abstract <code>Taglet</code> for annotations specified at the Mojo parameter level.
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public abstract class AbstractMojoFieldTaglet
- extends AbstractMojoTaglet
-{
- /**
- * @return <code>false</code> since this annotation can <b>NOT</b> be used in constructor documentation.
- * @see com.sun.tools.doclets.Taglet#inConstructor()
- */
- public final boolean inConstructor()
- {
- return false;
- }
-
- /**
- * @return <code>true</code> since this annotation can <b>NOT</b> be used in field documentation.
- * @see com.sun.tools.doclets.Taglet#inField()
- */
- public final boolean inField()
- {
- return true;
- }
-
- /**
- * @return <code>false</code> since this annotation can <b>NOT</b> be used in method documentation.
- * @see com.sun.tools.doclets.Taglet#inMethod()
- */
- public final boolean inMethod()
- {
- return false;
- }
-
- /**
- * @return <code>false</code> since this annotation can <b>NOT</b> be used in overview documentation.
- * @see com.sun.tools.doclets.Taglet#inOverview()
- */
- public final boolean inOverview()
- {
- return false;
- }
-
- /**
- * @return <code>false</code> since this annotation can <b>NOT</b> be used in package documentation.
- * @see com.sun.tools.doclets.Taglet#inPackage()
- */
- public final boolean inPackage()
- {
- return false;
- }
-
- /**
- * @return <code>false</code> since this annotation can be used in type documentation.
- * @see com.sun.tools.doclets.Taglet#inType()
- */
- public final boolean inType()
- {
- return false;
- }
-
- /**
- * @return <code>false</code> since this annotation can <b>NOT</b> be used in inline tag.
- * @see com.sun.tools.doclets.Taglet#isInlineTag()
- */
- public final boolean isInlineTag()
- {
- return false;
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTaglet.java
deleted file mode 100644
index 1f6eadc..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTaglet.java
+++ /dev/null
@@ -1,426 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import javax.swing.text.AttributeSet;
-import javax.swing.text.MutableAttributeSet;
-import javax.swing.text.SimpleAttributeSet;
-
-import com.sun.javadoc.Tag;
-import com.sun.tools.doclets.Taglet;
-
-/**
- * Abstract <code>Taglet</code> for <a href="http://maven.codehaus.org/"/>Maven</a> Mojo annotations.
- * <br/>
- * A Mojo annotation is defined like the following:
- * <pre>
- * @annotation <annotationValue> <parameterName="parameterValue">
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public abstract class AbstractMojoTaglet
- implements Taglet
-{
- /** {@inheritDoc} */
- public String toString( Tag tag )
- {
- if ( tag == null )
- {
- return null;
- }
-
- String tagValue = getTagValue( tag );
- MutableAttributeSet tagAttributes = getTagAttributes( tag );
-
- StringBuilder sb = new StringBuilder();
-
- appendTag( sb, tag, tagAttributes, tagValue );
-
- return sb.toString();
- }
-
- /** {@inheritDoc} */
- public String toString( Tag[] tags )
- {
- if ( tags.length == 0 )
- {
- return null;
- }
-
- StringBuilder sb = new StringBuilder();
- for ( int i = 0; i < tags.length; i++ )
- {
- String tagValue = getTagValue( tags[i] );
- MutableAttributeSet tagAttributes = getTagAttributes( tags[i] );
-
- appendTag( sb, tags[i], tagAttributes, tagValue );
- }
-
- return sb.toString();
- }
-
- /**
- * @return the header, i.e. the message, to display
- */
- public abstract String getHeader();
-
- /**
- * @return the given annotation value, or <code>null</code> if the given Mojo annotation/tag does't allow
- * annotation value.
- * <br/>
- * <b>Note</b>: the value could be a pattern value, i.e.: <code>*</code> for every values, <code>a|b|c</code>
- * for <code>a OR b OR c</code>.
- */
- public abstract String getAllowedValue();
-
- /**
- * @return an array of the allowed parameter names for the given Mojo annotation/tag, or <code>null</code>
- * if the annotation/tag doesn't allow parameter.
- */
- public abstract String[] getAllowedParameterNames();
-
- /**
- * @return <code>true</code> if taglet has annotation value, <code>false</code> otherwise.
- * @see #getAllowedValue()
- */
- public boolean hasAnnotationValue()
- {
- return getAllowedValue() != null;
- }
-
- /**
- * @return <code>true</code> if taglet has parameters, <code>false</code> otherwise.
- * @see #getAllowedParameterNames()
- */
- public boolean hasAnnotationParameters()
- {
- return getAllowedParameterNames() != null;
- }
-
- /**
- * @param tag not null.
- * @return a not null String or <code>null</code> if no annotation value was found.
- */
- private String getTagValue( Tag tag )
- {
- if ( tag == null )
- {
- throw new IllegalArgumentException( "tag should be not null" );
- }
-
- String text = tag.text();
- if ( isEmpty( text ) )
- {
- // using pattern: @annotation
- return null;
- }
-
- String tagValue = null;
- StringTokenizer token = new StringTokenizer( text, " " );
- while ( token.hasMoreTokens() )
- {
- String nextToken = token.nextToken();
-
- if ( nextToken.indexOf( '=' ) == -1 )
- {
- // using pattern: @annotation <annotationValue>
- tagValue = nextToken;
- }
- }
-
- return tagValue;
- }
-
- /**
- * @param tag not null.
- * @return a not null MutableAttributeSet.
- */
- private MutableAttributeSet getTagAttributes( Tag tag )
- {
- if ( tag == null )
- {
- throw new IllegalArgumentException( "tag should be not null" );
- }
-
- String text = tag.text();
-
- StringTokenizer token = new StringTokenizer( text, " " );
- MutableAttributeSet tagAttributes = new SimpleAttributeSet();
- while ( token.hasMoreTokens() )
- {
- String nextToken = token.nextToken();
-
- if ( nextToken.indexOf( '=' ) == -1 )
- {
- // using pattern: @annotation <annotationValue>
- continue;
- }
-
- StringTokenizer token2 = new StringTokenizer( nextToken, "=" );
- if ( token2.countTokens() != 2 )
- {
- System.err.println( "The annotation '" + tag.name() + "' has no name/value pairs parameter: "
- + tag.name() + " " + text + " (" + tag.position().file() + ":" + tag.position().line() + ":"
- + tag.position().column() + ")" );
- tagAttributes.addAttribute( token2.nextToken(), "" );
- continue;
- }
-
- String name = token2.nextToken();
- String value = token2.nextToken().replaceAll( "\"", "" );
-
- if ( getAllowedParameterNames() != null && !Arrays.asList( getAllowedParameterNames() ).contains( name ) )
- {
- System.err.println( "The annotation '" + tag.name() + "' has wrong parameter name: " + tag.name() + " "
- + text + " (" + tag.position().file() + ":" + tag.position().line() + ":" + tag.position().column()
- + ")" );
- }
-
- tagAttributes.addAttribute( name, value );
- }
-
- return tagAttributes;
- }
-
- /**
- * Append a tag
- *
- * @param sb not null
- * @param tag not null
- * @param tagAttributes not null
- * @param tagValue not null
- */
- private void appendTag( StringBuilder sb, Tag tag, MutableAttributeSet tagAttributes, String tagValue )
- {
- if ( !hasAnnotationParameters() )
- {
- if ( tagAttributes.getAttributeCount() > 0 )
- {
- System.err.println( "The annotation '@" + getName() + "' should have no attribute ("
- + tag.position().file() + ":" + tag.position().line() + ":" + tag.position().column() + ")" );
- }
-
- if ( hasAnnotationValue() )
- {
- sb.append( "<DT><B>" ).append( getHeader() ).append( ":</B></DT>" );
- if ( isEveryValues( getAllowedValue() ) )
- {
- if ( isNotEmpty( tagValue ) )
- {
- sb.append( "<DD>" ).append( tagValue ).append( "</DD>" );
- }
- else
- {
- System.err.println( "The annotation '@" + getName() + "' is specified to have a value but "
- + "no value is defined (" + tag.position().file() + ":" + tag.position().line() + ":"
- + tag.position().column() + ")" );
- sb.append( "<DD>" ).append( "NOT DEFINED" ).append( "</DD>" );
- }
- }
- else
- {
- List<String> l = getOnlyValues( getAllowedValue() );
- if ( isNotEmpty( tagValue ) )
- {
- if ( l.contains( tagValue ) )
- {
- sb.append( "<DD>" ).append( tagValue ).append( "</DD>" );
- }
- else
- {
- System.err.println( "The annotation '@" + getName() + "' is specified to be a value of "
- + l + " (" + tag.position().file() + ":" + tag.position().line() + ":"
- + tag.position().column() + ")" );
- sb.append( "<DD>" ).append( tagValue ).append( "</DD>" );
- }
- }
- else
- {
- sb.append( "<DD>" ).append( l.get( 0 ) ).append( "</DD>" );
- }
- }
- }
- else
- {
- if ( isNotEmpty( tagValue ) )
- {
- System.err.println( "The annotation '@" + getName() + "' should have no value ("
- + tag.position().file() + ":" + tag.position().line() + ":" + tag.position().column() + ")" );
- }
- sb.append( "<DT><B>" ).append( getHeader() ).append( "</B></DT>" );
- sb.append( "<DD></DD>" );
- }
- }
- else
- {
- if ( hasAnnotationValue() )
- {
- sb.append( "<DT><B>" ).append( getHeader() ).append( ":</B></DT>" );
- if ( isEveryValues( getAllowedValue() ) )
- {
- if ( isNotEmpty( tagValue ) )
- {
- sb.append( "<DD>" ).append( tagValue );
- }
- else
- {
- System.err.println( "The annotation '@" + getName() + "' is specified to have a value but "
- + "no value is defined (" + tag.position().file() + ":" + tag.position().line() + ":"
- + tag.position().column() + ")" );
- sb.append( "<DD>" ).append( "NOT DEFINED" );
- }
- }
- else
- {
- List<String> l = getOnlyValues( getAllowedValue() );
- if ( isNotEmpty( tagValue ) )
- {
- if ( l.contains( tagValue ) )
- {
- sb.append( "<DD>" ).append( tagValue );
- }
- else
- {
- System.err.println( "The annotation '@" + getName() + "' is specified to be a value in "
- + l + " (" + tag.position().file() + ":" + tag.position().line() + ":"
- + tag.position().column() + ")" );
- sb.append( "<DD>" ).append( tagValue );
- }
- }
- else
- {
- sb.append( "<DD>" ).append( l.get( 0 ) );
- }
- }
- }
- else
- {
- if ( isNotEmpty( tagValue ) )
- {
- System.err.println( "The annotation '@" + getName() + "' should have no value ("
- + tag.position().file() + ":" + tag.position().line() + ":" + tag.position().column() + ")" );
- }
- sb.append( "<DT><B>" ).append( getHeader() ).append( ":</B></DT>" );
- sb.append( "<DD>" );
- }
-
- appendAnnotationParameters( sb, tagAttributes );
- sb.append( "</DD>" );
- }
- }
-
- /**
- * Append the annotation parameters as a definition list.
- *
- * @param sb not null
- * @param att not null
- */
- private static void appendAnnotationParameters( StringBuilder sb, MutableAttributeSet att )
- {
- sb.append( "<DL>" );
-
- Enumeration<?> names = att.getAttributeNames();
- while ( names.hasMoreElements() )
- {
- Object key = names.nextElement();
- Object value = att.getAttribute( key );
-
- if ( value instanceof AttributeSet )
- {
- // ignored
- }
- else
- {
- sb.append( "<DT><B>" ).append( key ).append( ":</B></DT>" );
- sb.append( "<DD>" ).append( value ).append( "</DD>" );
- }
- }
-
- sb.append( "</DL>" );
- }
-
- /**
- * @param text not null
- * @return <code>true</code> if text contains <code>*</code>, <code>false</code> otherwise.
- */
- private static boolean isEveryValues( String text )
- {
- return text.trim().equals( "*" );
- }
-
- /**
- * Splits the provided text into a array, using pipe as the separator.
- *
- * @param text not null
- * @return a list of parsed Strings or <code>Collections.EMPTY_LIST</code>.
- * By convention, the default value is the first element.
- */
- private static List<String> getOnlyValues( String text )
- {
- if ( text.indexOf( '|' ) == -1 )
- {
- return Collections.emptyList();
- }
-
- List<String> l = new ArrayList<String>();
- StringTokenizer token = new StringTokenizer( text, "|" );
- while ( token.hasMoreTokens() )
- {
- l.add( token.nextToken() );
- }
-
- return l;
- }
-
- /**
- * <p>Checks if a String is non <code>null</code> and is
- * not empty (<code>length > 0</code>).</p>
- *
- * @param str the String to check
- * @return true if the String is non-null, and not length zero
- */
- private static boolean isNotEmpty( String str )
- {
- return ( str != null && str.length() > 0 );
- }
-
- /**
- * <p>Checks if a (trimmed) String is <code>null</code> or empty.</p>
- *
- * @param str the String to check
- * @return <code>true</code> if the String is <code>null</code>, or
- * length zero once trimmed
- */
- private static boolean isEmpty( String str )
- {
- return ( str == null || str.trim().length() == 0 );
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTypeTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTypeTaglet.java
deleted file mode 100644
index 97e78f9..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTypeTaglet.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * Abstract <code>Taglet</code> for annotations specified at the Mojo class level.
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public abstract class AbstractMojoTypeTaglet
- extends AbstractMojoTaglet
-{
- /**
- * @return <code>false</code> since this annotation can <b>NOT</b> be used in constructor documentation.
- * @see com.sun.tools.doclets.Taglet#inConstructor()
- */
- public final boolean inConstructor()
- {
- return false;
- }
-
- /**
- * @return <code>false</code> since this annotation can <b>NOT</b> be used in field documentation.
- * @see com.sun.tools.doclets.Taglet#inField()
- */
- public final boolean inField()
- {
- return false;
- }
-
- /**
- * @return <code>false</code> since this annotation can <b>NOT</b> be used in method documentation.
- * @see com.sun.tools.doclets.Taglet#inMethod()
- */
- public final boolean inMethod()
- {
- return false;
- }
-
- /**
- * @return <code>false</code> since this annotation can <b>NOT</b> be used in overview documentation.
- * @see com.sun.tools.doclets.Taglet#inOverview()
- */
- public final boolean inOverview()
- {
- return false;
- }
-
- /**
- * @return <code>false</code> since this annotation can <b>NOT</b> be used in package documentation.
- * @see com.sun.tools.doclets.Taglet#inPackage()
- */
- public final boolean inPackage()
- {
- return false;
- }
-
- /**
- * @return <code>true</code> since this annotation can be used in type documentation.
- * @see com.sun.tools.doclets.Taglet#inType()
- */
- public final boolean inType()
- {
- return true;
- }
-
- /**
- * @return <code>false</code> since this annotation can <b>NOT</b> be used in inline tag.
- * @see com.sun.tools.doclets.Taglet#isInlineTag()
- */
- public final boolean isInlineTag()
- {
- return false;
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoAggregatorTypeTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoAggregatorTypeTaglet.java
deleted file mode 100644
index 170bbc8..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoAggregatorTypeTaglet.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Map;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import com.sun.tools.doclets.Taglet;
-
-/**
- * The <tt>@aggregator</tt> tag is used to aggregate the Maven project and its child modules and
- * has no parameter.
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * /**
- *  * Dummy Mojo.
- *  *
- *  * @aggregator
- *  * ...
- *  */
- * public class MyMojo extends AbstractMojo{}
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet'
- * </pre>
- * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -tag 'aggregator:t:Aggregates the Maven project and its child modules.'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public class MojoAggregatorTypeTaglet
- extends AbstractMojoTypeTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.AGGREGATOR;
-
- /** The Javadoc text which will be added to the generated page */
- protected static final String HEADER = "Aggregates the Maven project and its child modules.";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>null</code> since <code>@aggregator</code> has no value.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return null;
- }
-
- /**
- * @return <code>null</code> since <code>@aggregator</code> has no parameter.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
- */
- public String[] getAllowedParameterNames()
- {
- return null;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see MojoAggregatorTypeTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoAggregatorTypeTaglet tag = new MojoAggregatorTypeTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoComponentFieldTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoComponentFieldTaglet.java
deleted file mode 100644
index e3fd730..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoComponentFieldTaglet.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Map;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import com.sun.tools.doclets.Taglet;
-
-/**
- * The <tt>@parameter</tt> tag is used to populate Plexus component and has annotation parameters.
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * public class MyMojo extends AbstractMojo
- * {
- * /**
- *  * Dummy parameter.
- *  *
- *  * @component <role="..."> <roleHint="...">
- *  * ...
- *  */
- * private Object parameterName;
- * }
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public class MojoComponentFieldTaglet
- extends AbstractMojoFieldTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.COMPONENT;
-
- private static final String[] COMPONENTS_NAME = {
- JavadocMojoAnnotation.COMPONENT_ROLE,
- JavadocMojoAnnotation.COMPONENT_ROLEHINT };
-
- /** The Javadoc text which will be added to the generated page. */
- protected static final String HEADER = "Is a Plexus component defined by";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>null</code> since <code>@component</code> has no value.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return null;
- }
-
- /**
- * @return <code>MojoComponentFieldTaglet#COMPONENTS_NAME</code> since <code>@component</code> has parameters.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
- */
- public String[] getAllowedParameterNames()
- {
- return COMPONENTS_NAME;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see MojoComponentFieldTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoComponentFieldTaglet tag = new MojoComponentFieldTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoConfiguratorTypeTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoConfiguratorTypeTaglet.java
deleted file mode 100644
index c68c289..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoConfiguratorTypeTaglet.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Map;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import com.sun.tools.doclets.Taglet;
-
-/**
- * The <tt>@configurator</tt> tag is used to inject parameter values into the Mojo and has annotation parameter.
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * /**
- *  * Dummy Mojo.
- *  *
- *  * @configurator <roleHint>
- *  * ...
- *  */
- * public class MyMojo extends AbstractMojo{}
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet'
- * </pre>
- * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -tag 'configurator:t:Is configured to the role hint:'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public class MojoConfiguratorTypeTaglet
- extends AbstractMojoTypeTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.CONFIGURATOR;
-
- /** The Javadoc text which will be added to the generated page. */
- protected static final String HEADER = "Is configured to the role hint";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>"*"</code> since <code>@configurator</code> has a value.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return "*";
- }
-
- /**
- * @return <code>null</code> since <code>@configurator</code> has no parameter.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
- */
- public String[] getAllowedParameterNames()
- {
- return null;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see MojoConfiguratorTypeTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoConfiguratorTypeTaglet tag = new MojoConfiguratorTypeTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecuteTypeTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecuteTypeTaglet.java
deleted file mode 100644
index 8c53dc8..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecuteTypeTaglet.java
+++ /dev/null
@@ -1,123 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Map;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import com.sun.tools.doclets.Taglet;
-
-/**
- * The <tt>@execute</tt> tag is used to reference the invocation way of the Mojo and has parameters.
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * /**
- *  * Dummy Mojo.
- *  *
- *  * @execute phase="..." lifecycle="..."
- *  * <OR>
- *  * @execute phase="..."
- *  * <OR>
- *  * @execute goal="..."
- *  * ...
- *  */
- * public class MyMojo extends AbstractMojo{}
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public class MojoExecuteTypeTaglet
- extends AbstractMojoTypeTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.EXECUTE;
-
- private static final String[] PARAMETERS_NAME = {
- JavadocMojoAnnotation.EXECUTE_PHASE,
- JavadocMojoAnnotation.EXECUTE_LIFECYCLE,
- JavadocMojoAnnotation.EXECUTE_GOAL };
-
- /** The Javadoc text which will be added to the generated page. */
- protected static final String HEADER = "Is defined to be executed in";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>null</code> since <code>@execute</code> has no value.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return null;
- }
-
- /**
- * @return <code>MojoExecuteTypeTaglet#PARAMETERS_NAME</code> since <code>@execute</code> has parameters.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
- * @see #PARAMETERS_NAME
- */
- public String[] getAllowedParameterNames()
- {
- return PARAMETERS_NAME;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see MojoExecuteTypeTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoExecuteTypeTaglet tag = new MojoExecuteTypeTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecutionStrategyTypeTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecutionStrategyTypeTaglet.java
deleted file mode 100644
index 088ef7e..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecutionStrategyTypeTaglet.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Map;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import com.sun.tools.doclets.Taglet;
-
-/**
- * The <tt>@executionStrategy</tt> tag is used to specify the instantiation strategy and has has parameter.
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * /**
- *  * Dummy Mojo.
- *  *
- *  * @executionStrategy <always>
- *  * ...
- *  */
- * public class MyMojo extends AbstractMojo{}
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet'
- * </pre>
- * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -tag 'executionStrategy:t:Is executed with the strategy:'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public class MojoExecutionStrategyTypeTaglet
- extends AbstractMojoTypeTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.EXECUTION_STATEGY;
-
- /** The Javadoc text which will be added to the generated page. */
- protected static final String HEADER = "Is executed with the strategy";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>"*"</code> since <code>@executionStrategy</code> has a value.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return "*";
- }
-
- /**
- * @return <code>null</code> since <code>@executionStrategy</code> has no parameter.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
- */
- public String[] getAllowedParameterNames()
- {
- return null;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see MojoExecutionStrategyTypeTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoExecutionStrategyTypeTaglet tag = new MojoExecutionStrategyTypeTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoGoalTypeTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoGoalTypeTaglet.java
deleted file mode 100644
index 6704932..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoGoalTypeTaglet.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Map;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import com.sun.tools.doclets.Taglet;
-
-/**
- * The <tt>@goal</tt> tag is used to reference the goal name of the Mojo and has annotation parameter.
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * /**
- *  * Dummy Mojo.
- *  *
- *  * @goal <goalName>
- *  * ...
- *  */
- * public class MyMojo extends AbstractMojo{}
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet'
- * </pre>
- * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -tag 'goal:t:Is defined by the goal name:'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public class MojoGoalTypeTaglet
- extends AbstractMojoTypeTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.GOAL;
-
- /** The Javadoc text which will be added to the generated page. */
- protected static final String HEADER = "Is defined by the goal name";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>"*"</code> since <code>@goal</code> has a value.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return "*";
- }
-
- /**
- * @return <code>null</code> since <code>@goal</code> has no parameter.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
- */
- public String[] getAllowedParameterNames()
- {
- return null;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see MojoGoalTypeTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoGoalTypeTaglet tag = new MojoGoalTypeTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInheritByDefaultTypeTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInheritByDefaultTypeTaglet.java
deleted file mode 100644
index e4041c1..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInheritByDefaultTypeTaglet.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Map;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import com.sun.tools.doclets.Taglet;
-
-/**
- * The <tt>@inheritByDefault</tt> tag is used to run this Mojo inside of a project
- * and has annotation parameter.
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * /**
- *  * Dummy Mojo.
- *  *
- *  * @inheritByDefault <true|false>
- *  * ...
- *  */
- * public class MyMojo extends AbstractMojo{}
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet'
- * </pre>
- * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -tag 'inheritByDefault:t:Is this Mojo inherited'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public class MojoInheritByDefaultTypeTaglet
- extends AbstractMojoTypeTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.INHERIT_BY_DEFAULT;
-
- /** The Javadoc text which will be added to the generated page. */
- protected static final String HEADER = "Is this Mojo inherited";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>"true|false"</code> since <code>@inheritByDefault</code> has specified values.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return "true|false";
- }
-
- /**
- * @return <code>null</code> since <code>@inheritByDefault</code> has no parameter.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
- */
- public String[] getAllowedParameterNames()
- {
- return null;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see MojoInheritByDefaultTypeTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoInheritByDefaultTypeTaglet tag = new MojoInheritByDefaultTypeTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInstantiationStrategyTypeTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInstantiationStrategyTypeTaglet.java
deleted file mode 100644
index 678ecbe..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInstantiationStrategyTypeTaglet.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Map;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import com.sun.tools.doclets.Taglet;
-
-/**
- * The <tt>@instantiationStrategy</tt> tag is used to specify the instantiation strategy and has has parameter.
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * /**
- *  * Dummy Mojo.
- *  *
- *  * @instantiationStrategy <per-lookup>
- *  * ...
- *  */
- * public class MyMojo extends AbstractMojo{}
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet'
- * </pre>
- * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -tag 'instantiationStrategy:t:Is instantiated with the strategy:'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public class MojoInstantiationStrategyTypeTaglet
- extends AbstractMojoTypeTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.INSTANTIATION_STRATEGY;
-
- /** The Javadoc text which will be added to the generated page. */
- protected static final String HEADER = "Is instantiated with the strategy";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>"*"</code> since <code>@instantiationStrategy</code> has value.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return "*";
- }
-
- /**
- * @return <code>null</code> since <code>@instantiationStrategy</code> has no parameter.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
- */
- public String[] getAllowedParameterNames()
- {
- return null;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see MojoInstantiationStrategyTypeTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoInstantiationStrategyTypeTaglet tag = new MojoInstantiationStrategyTypeTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoParameterFieldTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoParameterFieldTaglet.java
deleted file mode 100644
index 67b8bcc..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoParameterFieldTaglet.java
+++ /dev/null
@@ -1,127 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Map;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import com.sun.tools.doclets.Taglet;
-
-// CHECKSTYLE_OFF: LineLength
-/**
- * The <tt>@parameter</tt> tag is used to define a Mojo parameter and has annotation parameter.
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * public class MyMojo extends AbstractMojo
- * {
- * /**
- *  * Dummy parameter.
- *  *
- *  * @parameter <name="..."> <alias="..."> <default-value="..."> <expression="...">
- *  * <implementation="..."> <property="...">
- *  * ...
- *  */
- * private Object parameterName;
- * }
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-//CHECKSTYLE_ON: LineLength
-public class MojoParameterFieldTaglet
- extends AbstractMojoFieldTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.PARAMETER;
-
- private static final String[] PARAMETERS_NAME = {
- JavadocMojoAnnotation.PARAMETER_NAME,
- JavadocMojoAnnotation.PARAMETER_ALIAS,
- JavadocMojoAnnotation.PARAMETER_DEFAULT_VALUE,
- JavadocMojoAnnotation.PARAMETER_EXPRESSION,
- JavadocMojoAnnotation.PARAMETER_IMPLEMENTATION,
- JavadocMojoAnnotation.PARAMETER_PROPERTY };
-
- /** The Javadoc text which will be added to the generated page. */
- protected static final String HEADER = "Is defined by";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>null</code> since <code>@parameter</code> has no value.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return null;
- }
-
- /**
- * @return <code>MojoParameterFieldTaglet#PARAMETERS_NAME</code> since <code>@parameter</code> has parameters.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
- */
- public String[] getAllowedParameterNames()
- {
- return PARAMETERS_NAME;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see MojoParameterFieldTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoParameterFieldTaglet tag = new MojoParameterFieldTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoPhaseTypeTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoPhaseTypeTaglet.java
deleted file mode 100644
index 70def11..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoPhaseTypeTaglet.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Map;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import com.sun.tools.doclets.Taglet;
-
-/**
- * The <tt>@phase</tt> tag is used to reference the binded phase name of the Mojo and has has parameter.
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * /**
- *  * Dummy Mojo.
- *  *
- *  * @phase <phaseName>
- *  * ...
- *  */
- * public class MyMojo extends AbstractMojo{}
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet'
- * </pre>
- * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -tag 'phase:t:Is bound to the specified phase of the standard build lifecycle:'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public class MojoPhaseTypeTaglet
- extends AbstractMojoTypeTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.PHASE;
-
- /** The Javadoc text which will be added to the generated page. */
- protected static final String HEADER = "Is bound to the specified phase of the standard build lifecycle";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>"*"</code> since <code>@phase</code> has value.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return "*";
- }
-
- /**
- * @return <code>null</code> since <code>@phase</code> has no parameter.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
- */
- public String[] getAllowedParameterNames()
- {
- return null;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see MojoPhaseTypeTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoPhaseTypeTaglet tag = new MojoPhaseTypeTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoReadOnlyFieldTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoReadOnlyFieldTaglet.java
deleted file mode 100644
index 49fd8fb..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoReadOnlyFieldTaglet.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Map;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import com.sun.tools.doclets.Taglet;
-
-/**
- * The <tt>@readonly</tt> tag is used to specify that this parameter cannot be configured directly by the
- * user and has no parameter.
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * public class MyMojo extends AbstractMojo
- * {
- * /**
- *  * Dummy parameter.
- *  *
- *  * @readonly
- *  * ...
- *  */
- * private Object parameterName;
- * }
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoReadOnlyFieldTaglet'
- * </pre>
- * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -tag 'readonly:f:Is readonly.'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public class MojoReadOnlyFieldTaglet
- extends AbstractMojoFieldTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.READONLY;
-
- /** The Javadoc text which will be added to the generated page. */
- protected static final String HEADER = "Is readonly.";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>null</code> since <code>@readonly</code> has no value.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return null;
- }
-
- /**
- * @return <code>null</code> since <code>@readonly</code> has no parameter.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
- */
- public String[] getAllowedParameterNames()
- {
- return null;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see MojoReadOnlyFieldTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoReadOnlyFieldTaglet tag = new MojoReadOnlyFieldTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiredFieldTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiredFieldTaglet.java
deleted file mode 100644
index bc46d88..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiredFieldTaglet.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Map;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import com.sun.tools.doclets.Taglet;
-
-/**
- * The <tt>@required</tt> tag is used to specify that this parameter is required for the Mojo
- * and has no parameter.
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * public class MyMojo extends AbstractMojo
- * {
- * /**
- *  * Dummy parameter.
- *  *
- *  * @required
- *  * ...
- *  */
- * private Object parameterName;
- * }
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoRequiredFieldTaglet'
- * </pre>
- * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -tag 'required:f:Is required.'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public class MojoRequiredFieldTaglet
- extends AbstractMojoFieldTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.REQUIRED;
-
- /** The Javadoc text which will be added to the generated page. */
- protected static final String HEADER = "Is required.";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>null</code> since <code>@required</code> has no value.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return null;
- }
-
- /**
- * @return <code>null</code> since <code>@required</code> has no parameter.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
- */
- public String[] getAllowedParameterNames()
- {
- return null;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see MojoRequiredFieldTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoRequiredFieldTaglet tag = new MojoRequiredFieldTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresDependencyCollectionTypeTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresDependencyCollectionTypeTaglet.java
deleted file mode 100644
index 1ff1f8c..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresDependencyCollectionTypeTaglet.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import com.sun.tools.doclets.Taglet;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import java.util.Map;
-
-//CHECKSTYLE_OFF: LineLength
-/**
- * The <tt>@requiresDependencyCollection</tt> tag is used to specify the required dependencies in the specified scope
- * and has parameter.
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * /**
- *  * Dummy Mojo.
- *  *
- *  * @requiresDependencyCollection <requiredScope>
- *  * ...
- *  */
- * public class MyMojo extends AbstractMojo{}
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyCollectionTypeTaglet'
- * </pre>
- * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -tag 'requiresDependencyCollection:t:Requires the collection of the dependencies in this specified scope:'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author Kristian Rosenvold
- * @version $Id$
- */
-//CHECKSTYLE_ON: LineLength
-public class MojoRequiresDependencyCollectionTypeTaglet
- extends AbstractMojoTypeTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.REQUIRES_DEPENDENCY_COLLECTION;
-
- /** The Javadoc text which will be added to the generated page. */
- protected static final String HEADER = "Collects the dependencies in this specified scope";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>"*"</code> since <code>@requiresDependencyCollection</code> has value.
- * @see AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return "*";
- }
-
- /**
- * @return <code>null</code> since <code>@requiresDependencyCollection</code> has no parameter.
- * @see AbstractMojoTaglet#getAllowedParameterNames()
- */
- public String[] getAllowedParameterNames()
- {
- return null;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyCollectionTypeTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoRequiresDependencyCollectionTypeTaglet tag = new MojoRequiresDependencyCollectionTypeTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
\ No newline at end of file
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresDependencyResolutionTypeTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresDependencyResolutionTypeTaglet.java
deleted file mode 100644
index bd82524..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresDependencyResolutionTypeTaglet.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Map;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import com.sun.tools.doclets.Taglet;
-
-/**
- * The <tt>@requiresDependencyResolution</tt> tag is used to specify the required dependencies in the specified scope
- * and has parameter.
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * /**
- *  * Dummy Mojo.
- *  *
- *  * @requiresDependencyResolution <requiredScope>
- *  * ...
- *  */
- * public class MyMojo extends AbstractMojo{}
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyResolutionTypeTaglet'
- * </pre>
- * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -tag 'requiresDependencyResolution:t:Requires the dependencies in this specified scope:'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public class MojoRequiresDependencyResolutionTypeTaglet
- extends AbstractMojoTypeTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.REQUIRES_DEPENDENCY_RESOLUTION;
-
- /** The Javadoc text which will be added to the generated page. */
- protected static final String HEADER = "Requires the dependencies in this specified scope";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>"*"</code> since <code>@requiresDependencyResolution</code> has value.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return "*";
- }
-
- /**
- * @return <code>null</code> since <code>@requiresDependencyResolution</code> has no parameter.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
- */
- public String[] getAllowedParameterNames()
- {
- return null;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see MojoRequiresDependencyResolutionTypeTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoRequiresDependencyResolutionTypeTaglet tag = new MojoRequiresDependencyResolutionTypeTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresDirectInvocationTypeTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresDirectInvocationTypeTaglet.java
deleted file mode 100644
index 5d9322b..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresDirectInvocationTypeTaglet.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Map;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import com.sun.tools.doclets.Taglet;
-
-/**
- * The <tt>@requiresDirectInvocation</tt> tag is used to allow this Mojo to be direct invoked by the user.
- * and has parameter.
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * /**
- *  * Dummy Mojo.
- *  *
- *  * @requiresDirectInvocation <true|false>
- *  * ...
- *  */
- * public class MyMojo extends AbstractMojo{}
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet'
- * </pre>
- * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -tag 'requiresDirectInvocation:t:Requires a direct invocation by the user'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public class MojoRequiresDirectInvocationTypeTaglet
- extends AbstractMojoTypeTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.REQUIRES_DIRECT_INVOCATION;
-
- /** The Javadoc text which will be added to the generated page. */
- protected static final String HEADER = "Requires a direct invocation by the user";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>"false|true"</code> since <code>@requiresDirectInvocation</code> has value.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return "false|true";
- }
-
- /**
- * @return <code>null</code> since <code>@requiresDirectInvocation</code> has no parameter.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
- */
- public String[] getAllowedParameterNames()
- {
- return null;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see MojoRequiresDirectInvocationTypeTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoRequiresDirectInvocationTypeTaglet tag = new MojoRequiresDirectInvocationTypeTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresOnLineTypeTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresOnLineTypeTaglet.java
deleted file mode 100644
index 7a9520f..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresOnLineTypeTaglet.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Map;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import com.sun.tools.doclets.Taglet;
-
-/**
- * The <tt>@requiresOnline</tt> tag is used to specify that this Mojo should be online
- * and has parameter.
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * /**
- *  * Dummy Mojo.
- *  *
- *  * @requiresOnline <true|false>
- *  * ...
- *  */
- * public class MyMojo extends AbstractMojo{}
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet'
- * </pre>
- * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -tag 'requiresOnline:t:Requires to be online to run'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public class MojoRequiresOnLineTypeTaglet
- extends AbstractMojoTypeTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.REQUIRES_ONLINE;
-
- /** The Javadoc text which will be added to the generated page. */
- protected static final String HEADER = "Requires to be online to run";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>true|false</code> since <code>@requiresOnline</code> has value.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return "true|false";
- }
-
- /**
- * @return <code>null</code> since <code>@requiresOnline</code> has no parameter.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
- */
- public String[] getAllowedParameterNames()
- {
- return null;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see MojoRequiresOnLineTypeTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoRequiresOnLineTypeTaglet tag = new MojoRequiresOnLineTypeTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresProjectTypeTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresProjectTypeTaglet.java
deleted file mode 100644
index 715091a..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresProjectTypeTaglet.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Map;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import com.sun.tools.doclets.Taglet;
-
-/**
- * The <tt>@requiresProject</tt> tag is used to run this Mojo inside of a project
- * and has parameter.
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * /**
- *  * Dummy Mojo.
- *  *
- *  * @requiresProject <true|false>
- *  * ...
- *  */
- * public class MyMojo extends AbstractMojo{}
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet'
- * </pre>
- * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -tag 'requiresProject:t:Requires a Maven project to run'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public class MojoRequiresProjectTypeTaglet
- extends AbstractMojoTypeTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.REQUIRES_PROJECT;
-
- /** The Javadoc text which will be added to the generated page. */
- protected static final String HEADER = "Requires a Maven project to run";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>true|false</code> since <code>@requiresProject</code> has value.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return "true|false";
- }
-
- /**
- * @return <code>null</code> since <code>@requiresProject</code> has no parameter.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
- */
- public String[] getAllowedParameterNames()
- {
- return null;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see MojoRequiresProjectTypeTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoRequiresProjectTypeTaglet tag = new MojoRequiresProjectTypeTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresReportsTypeTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresReportsTypeTaglet.java
deleted file mode 100644
index b5ed8d9..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresReportsTypeTaglet.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Map;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import com.sun.tools.doclets.Taglet;
-
-/**
- * The <tt>@requiresReports</tt> tag is used to run this Mojo inside reports
- * and has parameter.
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * /**
- *  * Dummy Mojo.
- *  *
- *  * @requiresReports <true|false>
- *  * ...
- *  */
- * public class MyMojo extends AbstractMojo{}
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet'
- * </pre>
- * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -tag 'requiresReports:t:Requires Maven reports to run'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id$
- */
-public class MojoRequiresReportsTypeTaglet
- extends AbstractMojoTypeTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.REQUIRES_REPORTS;
-
- /** The Javadoc text which will be added to the generated page. */
- protected static final String HEADER = "Requires Maven reports to run";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>false|true</code> since <code>@requiresReports</code> has value.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return "false|true";
- }
-
- /**
- * @return <code>null</code> since <code>@requiresReports</code> has no parameter.
- * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
- */
- public String[] getAllowedParameterNames()
- {
- return null;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see MojoRequiresReportsTypeTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoRequiresReportsTypeTaglet tag = new MojoRequiresReportsTypeTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
diff --git a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoThreadSafeTypeTaglet.java b/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoThreadSafeTypeTaglet.java
deleted file mode 100644
index 7406d91..0000000
--- a/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoThreadSafeTypeTaglet.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package org.apache.maven.tools.plugin.javadoc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import com.sun.tools.doclets.Taglet;
-
-import org.apache.maven.tools.plugin.extractor.javadoc.JavadocMojoAnnotation;
-
-import java.util.Map;
-
-/**
- * The <tt>@threadSafe</tt> tag is used to indicate that a mojo is thread-safe and can be run in parallel
- * <br/>
- * The following is a sample declaration:
- * <pre>
- * /**
- *  * Dummy Mojo.
- *  *
- *  * @threadSafe <true|false>
- *  * ...
- *  */
- * public class MyMojo extends AbstractMojo{}
- * </pre>
- * To use it, calling the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoThreadSafeTypeTaglet'
- * </pre>
- * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
- * <pre>
- * javadoc ... -tag 'threadSafe:t:Indicates the mojo is thread-safe'
- * </pre>
- *
- * @see <a href="package-summary.html#package_description">package-summary.html</a>
- *
- * @author Kristian Rosenvold
- * @version $Id$
- */
-public class MojoThreadSafeTypeTaglet
- extends AbstractMojoTypeTaglet
-{
- /** The Javadoc annotation */
- private static final String NAME = JavadocMojoAnnotation.THREAD_SAFE;
-
- /** The Javadoc text which will be added to the generated page. */
- protected static final String HEADER = "Mojo is thread safe";
-
- /**
- * @return By default, return the string defined in {@linkplain #HEADER}.
- * @see AbstractMojoTaglet#getHeader()
- * @see #HEADER
- */
- public String getHeader()
- {
- return HEADER;
- }
-
- /**
- * @return <code>true|false</code> since <code>@requiresProject</code> has value.
- * @see AbstractMojoTaglet#getAllowedValue()
- */
- public String getAllowedValue()
- {
- return "true|false";
- }
-
- /**
- * @return <code>null</code> since <code>@requiresProject</code> has no parameter.
- * @see AbstractMojoTaglet#getAllowedParameterNames()
- */
- public String[] getAllowedParameterNames()
- {
- return null;
- }
-
- /**
- * @return By default, return the name of this taglet.
- * @see com.sun.tools.doclets.Taglet#getName()
- * @see MojoThreadSafeTypeTaglet#NAME
- */
- public String getName()
- {
- return NAME;
- }
-
- /**
- * Register this Taglet.
- *
- * @param tagletMap the map to register this tag to.
- */
- public static void register( Map<String, Taglet> tagletMap )
- {
- MojoThreadSafeTypeTaglet tag = new MojoThreadSafeTypeTaglet();
- Taglet t = tagletMap.get( tag.getName() );
- if ( t != null )
- {
- tagletMap.remove( tag.getName() );
- }
- tagletMap.put( tag.getName(), tag );
- }
-}
\ No newline at end of file
diff --git a/maven-plugin-tools-javadoc/src/main/javadoc/org/apache/maven/tools/plugin/javadoc/package.html b/maven-plugin-tools-javadoc/src/main/javadoc/org/apache/maven/tools/plugin/javadoc/package.html
deleted file mode 100644
index 27b28e9..0000000
--- a/maven-plugin-tools-javadoc/src/main/javadoc/org/apache/maven/tools/plugin/javadoc/package.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<body>
- <style type="text/css">
- table.bodyTable th {
- color: white;
- background-color: #bbb;
- text-align: left;
- font-weight: bold;
- }
-
- table.bodyTable th, table.bodyTable td {
- font-size: 11px;
- }
-
- table.bodyTable tr.a {
- background-color: #ddd;
- }
-
- table.bodyTable tr.b {
- background-color: #eee;
- }
- </style>
-
- <h1>Mojo Javadoc Tags used by Maven Plugins</h1>
- <p>Here is a reference of the Javadoc annotations that can be used to 'decorate' the Java sources
- to allow Mojo to generate descriptors.</p>
-
- <h2>Annotations specified at the class level</h2>
- <table class="bodyTable">
- <!-- Annotations listed by specific, autodetect and Javadoc, all alphabetical -->
- <tr class="b">
- <th>Descriptor Element</th>
- <th>Annotation</th>
- <th>Required?</th>
- <th>Notes</th>
- </tr>
- <tr class="a">
- <td>aggregator</td>
- <td>@aggregator</td>
- <td>No</td>
- <td>Flags this Mojo to run it in a multi module way, i.e. aggregate the build with the set of
- projects listed as modules.</td>
- </tr>
- <tr class="b">
- <td>configurator</td>
- <td>@configurator <roleHint></td>
- <td>No</td>
- <td>The configurator type to use when injecting parameter values into this Mojo. The value is
- normally deduced from the Mojo's implementation language, but can be specified to allow a
- custom ComponentConfigurator implementation to be used. <i>NOTE: This will only be used in
- very special cases, using a highly controlled vocabulary of possible values. (Elements
- like this are why it's a good idea to use the descriptor tools.)</i>
- </td>
- </tr>
- <tr class="a">
- <td>execute</td>
- <td>
- <ul>
- <li>@execute phase="<phaseName>"
- lifecycle="<lifecycleId>"</li>
- <li>@execute phase="<phaseName>"</li>
-
- <li>@execute goal="<goalName>"</li>
- </ul>
- </td>
- <td>No</td>
- <td>When this goal is invoked, it will first invoke a parallel lifecycle, ending at the given
- phase. If a goal is provided instead of a phase, that goal will be executed in isolation.
- The execution of either will not affect the current project, but instead make available the
- <code>${executedProject}</code> expression if required. An alternate lifecycle can also be
- provided: for more information see the documentation on the
- <a href="../guides/introduction/introduction-to-the-lifecycle.html">build lifecycle</a>.</td>
- </tr>
- <tr class="b">
- <td>executionStrategy</td>
- <td>@executionStrategy <strategy></td>
- <td>No</td>
- <td>Specify the execution strategy. <i>NOTE: Currently supports <b>once-per-session</b>,
- <b>always</b>.</i>
- </td>
- </tr>
- <tr class="a">
- <td>goal</td>
- <td>@goal <goalName></td>
- <td>Yes</td>
- <td>The name for the Mojo that users will reference from the command line to execute the Mojo
- directly, or inside a POM in order to provide Mojo-specific configuration.</td>
- </tr>
- <tr class="b">
- <td>inheritByDefault</td>
- <td>@inheritByDefault <true|false></td>
- <td>No. Default: <code>true</code></td>
- <td>Specify that the Mojo is inherited.</td>
- </tr>
- <tr class="a">
- <td>instantiationStrategy </td>
- <td>@instantiationStrategy <per-lookup></td>
- <td>No. Default: <code>per-lookup</code></td>
- <td>Specify the instantiation strategy.</td>
- </tr>
- <tr class="b">
- <td>phase</td>
- <td>@phase <phaseName></td>
- <td>No</td>
- <td>Binds this Mojo to a particular phase of the standard build lifecycle, if specified.
- <i>NOTE: This is only required if this Mojo is to participate in the standard build
- process.</i>
- </td>
- </tr>
- <tr class="a">
- <td>requiresDependencyResolution</td>
- <td>@requiresDependencyResolution <requiredScope></td>
- <td>No</td>
- <td>Flags this Mojo as requiring the dependencies in the specified scope (or an implied scope)
- to be resolved before it can execute. <i>NOTE: Currently supports <b>compile</b> ,
- <b>runtime</b> , and <b>test</b> scopes. </i>
- </td>
- </tr>
- <tr class="b">
- <td>requiresDirectInvocation</td>
- <td>@requiresDirectInvocation <true|false></td>
- <td>No. Default: <code>false</code></td>
- <td>Flags this Mojo to be invoke directly.</td>
- </tr>
- <tr class="a">
- <td>requiresOnline</td>
- <td>@requiresOnline <true|false></td>
- <td>No. Default: <code>true</code></td>
- <td>Flags this Mojo to be run in online mode.</td>
- </tr>
- <tr class="b">
- <td>requiresProject</td>
- <td>@requiresProject <true|false></td>
- <td>No. Default: <code>true</code></td>
- <td>Flags this Mojo to run inside of a project.</td>
- </tr>
- <tr class="a">
- <td>requiresReports</td>
- <td>@requiresReports <true|false></td>
- <td>No. Default: <code>false</code></td>
- <td>Flags this Mojo to require reports.</td>
- </tr>
-
- <!-- Autodetect -->
- <tr class="b">
- <td>description</td>
- <td>none (detected)</td>
- <td>No</td>
- <td>The description of this Mojo's functionality. <i>Using the toolset, this will be the
- class-level Javadoc description provided. NOTE: While this is not a required part of the
- Mojo specification, it SHOULD be provided to enable future tool support for browsing, etc.
- and for clarity.</i>
- </td>
- </tr>
- <tr class="a">
- <td>implementation</td>
- <td>none (detected)</td>
- <td>Yes</td>
- <td>The Mojo's fully-qualified class name (or script path in the case of non-Java Mojos).</td>
- </tr>
- <tr class="b">
- <td>language</td>
- <td>none (detected)</td>
- <td>No. Default: <code>java</code></td>
- <td>The implementation language for this Mojo (Java, beanshell, etc.).</td>
- </tr>
-
- <!-- Javadoc -->
- <tr class="a">
- <td>deprecated</td>
- <td>@deprecated <deprecated-text></td>
- <td>No</td>
- <td>Specify the version when the Mojo was deprecated to the API. Similar to Javadoc deprecated.
- This will trigger a warning when a user tries to configure a parameter
- marked as deprecated.</td>
- </tr>
- <tr class="b">
- <td>since</td>
- <td>@since <since-text></td>
- <td>No</td>
- <td>Specify the version when the Mojo was added to the API. Similar to Javadoc since.</td>
- </tr>
- </table>
-
- <h2>Annotations specified at the field level</h2>
- <table class="bodyTable">
- <!-- Annotations listed by specific, autodetect and Javadoc, all alphabetical -->
- <tr class="b">
- <th>Descriptor Element</th>
- <th>Annotation</th>
- <th>Required?</th>
- <th>Notes</th>
- </tr>
- <tr class="a">
- <td>alias</td>
- <td>@parameter alias="myAlias"</td>
- <td>No</td>
- <td>Specifies an alias which can be used to configure this parameter from the POM. This is
- primarily useful to improve user-friendliness, where Mojo field names are not intuitive to
- the user or are otherwise not conducive to configuration via the POM.</td>
- </tr>
- <tr class="b">
- <td>configuration</td>
- <td>@component role="..." roleHint="..."</td>
- <td>No</td>
- <td> Populates the field with an instance of a Plexus component. This is like declaring a
- <i>requirement</i> in a Plexus component. The default requirement will have a role equal
- to the declared type of the field, and will use the default role hint. You can customise
- either of these by providing a <code>role</code> and/or <code>roleHint</code> parameter.
- <i>e.g.</i>
- <code>@component role="org.apache.maven.artifact.ArtifactHandler"
- roleHint="ear"</code><b>Note:</b> This is identical to the deprecated
- form of parameter: <code>@parameter
- expression="${component.yourpackage.YourComponentClass}"</code>. </td>
- </tr>
- <tr class="a">
- <td>configuration</td>
- <td>@parameter expression="${someExpression}"
- default-value="value"</td>
- <td>No</td>
- <td>Specifies the expression used to calculate the value to be injected into this parameter of
- the Mojo at buildtime. This is commonly used to refer to specific elements in the POM, such
- as ${project.build.resources}, which refers to the List of resources meant to accompany the
- classes in the resulting jar file. The default value is used when the expression evaluates
- to <code>null</code> . <i>NOTE: If not specified, an expression of ${<name>}
- is assumed, which can only be satisfied from POM configuration or System properties. The
- use of '${' and '}' is required to delimit actual expressions which may be evaluated.</i>
- </td>
- </tr>
- <tr class="b">
- <td>editable</td>
- <td>@readonly</td>
- <td>No</td>
- <td>Specifies that this parameter cannot be configured directly by the user (as in the case of
- POM-specified configuration). This is useful when you want to force the user to use common
- POM elements rather than plugin configurations, as in the case where you want to use the
- artifact's final name as a parameter. In this case, you want the user to modify
- <build><finalName/></build> rather than specifying
- a value for finalName directly in the plugin configuration section. It is also useful to
- ensure that - for example - a List-typed parameter which expects items of type Artifact
- doesn't get a List full of Strings. <i>NOTE: Specification of this annotation flags the
- parameter as non-editable; there is no true/false value.</i>
- </td>
- </tr>
- <tr class="a">
- <td>required</td>
- <td>@required</td>
- <td>No</td>
- <td>Whether this parameter is required for the Mojo to function. This is used to validate the
- configuration for a Mojo before it is injected, and before the Mojo is executed from some
- half-state. <i>NOTE: Specification of this annotation flags the parameter as required; there
- is no true/false value.</i>
- </td>
- </tr>
-
- <!-- Autodetect -->
- <tr class="b">
- <td>description</td>
- <td>none (detected)</td>
- <td>No</td>
- <td>The description of this parameter's use inside the Mojo. <i>Using the toolset, this is
- detected as the Javadoc description for the field. NOTE: While this is not a required part
- of the parameter specification, it SHOULD be provided to enable future tool support for
- browsing, etc. and for clarity.</i>
- </td>
- </tr>
- <tr class="a">
- <td>name</td>
- <td>none (detected)</td>
- <td>Yes</td>
- <td>The name of the parameter, to be used in configuring this parameter from the Mojo's
- declared defaults (discussed below) or from the POM. <i>Using the toolset, this is detected
- as the Java field name.</i>
- </td>
- </tr>
- <tr class="b">
- <td>type</td>
- <td>none (detected)</td>
- <td>Yes</td>
- <td>The Java type for this parameter. This is used to validate the result of any expressions
- used to calculate the value which should be injected into the Mojo for this parameter.
- <i>Using the toolset, this is detected as the class of the Java field corresponding to
- this parameter.</i>
- </td>
- </tr>
-
- <!-- Javadoc -->
- <tr class="a">
- <td>deprecated</td>
- <td>@deprecated <deprecated-text></td>
- <td>No</td>
- <td>Specify the version when the Mojo was deprecated to the API. Similar to Javadoc deprecated.
- This will trigger a warning when a user tries to configure a parameter
- marked as deprecated.</td>
- </tr>
- <tr class="b">
- <td>since</td>
- <td>@since <since-text></td>
- <td>No</td>
- <td>Specify the version when the Mojo was added to the API. Similar to Javadoc since.</td>
- </tr>
- </table>
-
- <h2>Resources</h2>
- <ul>
- <li><a href="http://maven.apache.org/developers/mojo-api-specification.html#The_Descriptor_and_Annotations">Mojo API Specification</a></li>
- </ul>
-</body>
diff --git a/maven-plugin-tools-javadoc/src/site/apt/index.apt b/maven-plugin-tools-javadoc/src/site/apt/index.apt
deleted file mode 100644
index a4e26a9..0000000
--- a/maven-plugin-tools-javadoc/src/site/apt/index.apt
+++ /dev/null
@@ -1,39 +0,0 @@
- ------
- Introduction
- ------
- Vincent Siveton
- ------
- 2012-05-12
- ------
-
-~~ Licensed to the Apache Software Foundation (ASF) under one
-~~ or more contributor license agreements. See the NOTICE file
-~~ distributed with this work for additional information
-~~ regarding copyright ownership. The ASF licenses this file
-~~ to you under the Apache License, Version 2.0 (the
-~~ "License"); you may not use this file except in compliance
-~~ with the License. You may obtain a copy of the License at
-~~
-~~ http://www.apache.org/licenses/LICENSE-2.0
-~~
-~~ Unless required by applicable law or agreed to in writing,
-~~ software distributed under the License is distributed on an
-~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-~~ KIND, either express or implied. See the License for the
-~~ specific language governing permissions and limitations
-~~ under the License.
-
-~~ NOTE: For help with the syntax of this file, see:
-~~ http://maven.apache.org/doxia/references/apt-format.html
-
-Maven Plugin Tools Javadoc
-
- The Maven Plugin Tools Javadoc module is a collection of several
- {{{http://java.sun.com/j2se/1.4.2/docs/tooldocs/javadoc/taglet/overview.html}javadoc taglets}}
- to enhance javadoc generated from sources annotated with {{{../maven-plugin-tools-java}Mojo Javadoc Tags}}.
- For more information about the standard Javadoc tool, please refer to
- {{{http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html}Reference Guide}}.
-
-* Usage
-
- Instructions on how to use this project can be found on the {{{./usage.html}usage page}}.
diff --git a/maven-plugin-tools-javadoc/src/site/apt/screenshots.apt b/maven-plugin-tools-javadoc/src/site/apt/screenshots.apt
deleted file mode 100644
index 4e9af9f..0000000
--- a/maven-plugin-tools-javadoc/src/site/apt/screenshots.apt
+++ /dev/null
@@ -1,33 +0,0 @@
- ------
- Screenshots From Javadoc
- ------
- Vincent Siveton
- ------
- 2008-02-01
- ------
-
-~~ Licensed to the Apache Software Foundation (ASF) under one
-~~ or more contributor license agreements. See the NOTICE file
-~~ distributed with this work for additional information
-~~ regarding copyright ownership. The ASF licenses this file
-~~ to you under the Apache License, Version 2.0 (the
-~~ "License"); you may not use this file except in compliance
-~~ with the License. You may obtain a copy of the License at
-~~
-~~ http://www.apache.org/licenses/LICENSE-2.0
-~~
-~~ Unless required by applicable law or agreed to in writing,
-~~ software distributed under the License is distributed on an
-~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-~~ KIND, either express or implied. See the License for the
-~~ specific language governing permissions and limitations
-~~ under the License.
-
-~~ NOTE: For help with the syntax of this file, see:
-~~ http://maven.apache.org/doxia/references/apt-format.html
-
-Screenshots From Javadoc
-
- The following screenshots have been taken from a Javadoc report.
-
-[images/javadoc.png] Examples
diff --git a/maven-plugin-tools-javadoc/src/site/apt/usage.apt.vm b/maven-plugin-tools-javadoc/src/site/apt/usage.apt.vm
deleted file mode 100644
index 3798bff..0000000
--- a/maven-plugin-tools-javadoc/src/site/apt/usage.apt.vm
+++ /dev/null
@@ -1,112 +0,0 @@
- ------
- Usage
- ------
- Vincent Siveton
- ------
- 2008-02-01
- ------
-
-~~ Licensed to the Apache Software Foundation (ASF) under one
-~~ or more contributor license agreements. See the NOTICE file
-~~ distributed with this work for additional information
-~~ regarding copyright ownership. The ASF licenses this file
-~~ to you under the Apache License, Version 2.0 (the
-~~ "License"); you may not use this file except in compliance
-~~ with the License. You may obtain a copy of the License at
-~~
-~~ http://www.apache.org/licenses/LICENSE-2.0
-~~
-~~ Unless required by applicable law or agreed to in writing,
-~~ software distributed under the License is distributed on an
-~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-~~ KIND, either express or implied. See the License for the
-~~ specific language governing permissions and limitations
-~~ under the License.
-
-~~ NOTE: For help with the syntax of this file, see:
-~~ http://maven.apache.org/doxia/references/apt-format.html
-
-
-Usage
-
- The taglets can be used directly in the {{{/plugins/maven-javadoc-plugin/}Maven Javadoc Plugin}}.
-
-+-----+
-<project>
- ...
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.6</version>
- <configuration>
-
- <!-- To allow Javadoc Tool to generate annotation for Mojo fields -->
- <show>private</show>
-
- <tagletArtifacts>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>${project.version}</version>
- </tagletArtifact>
- </tagletArtifacts>
- ...
- </configuration>
- </plugin>
- </plugins>
- ...
- </reporting>
- ...
-</project>
-+-----+
-
- <<Note>>: Several taglets are similar to simple Javadoc
- {{{http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/javadoc.html#tag}-tag}} options, i.e.:
-
-*--------------------------------------------+---------------------------------+
-|| Taglet Class || Javadoc -tag option
-*--------------------------------------------+---------------------------------+
-| MojoAggregatorTypeTaglet | -tag 'aggregator:t:Aggregates the Maven project and its child modules.'
-*--------------------------------------------+---------------------------------+
-| MojoComponentFieldTaglet | none
-*--------------------------------------------+---------------------------------+
-| MojoConfiguratorTypeTaglet | -tag 'configurator:t:Is configured to the role hint:'
-*--------------------------------------------+---------------------------------+
-| MojoExecuteTypeTaglet | none
-*--------------------------------------------+---------------------------------+
-| MojoExecutionStrategyTypeTaglet | -tag 'executionStrategy:t:Is executed with the strategy:'
-*--------------------------------------------+---------------------------------+
-| MojoGoalTypeTaglet | -tag 'goal:t:This Mojo is defined by the goal name:'
-*--------------------------------------------+---------------------------------+
-| MojoInheritByDefaultTypeTaglet | -tag 'inheritByDefault:t:Is this Mojo inherited'
-*--------------------------------------------+---------------------------------+
-| MojoInstantiationStrategyTypeTaglet | -tag 'instantiationStrategy:t:Is instantiated with the strategy:'
-*--------------------------------------------+---------------------------------+
-| MojoParameterFieldTaglet | none
-*--------------------------------------------+---------------------------------+
-| MojoPhaseTypeTaglet | -tag 'phase:t:Is binded to the specified phase of the standard build lifecycle:'
-*--------------------------------------------+---------------------------------+
-| MojoReadOnlyFieldTaglet | -tag 'readonly:f:Is readonly.'
-*--------------------------------------------+---------------------------------+
-| MojoRequiredFieldTaglet | -tag 'required:f:Is required.'
-*--------------------------------------------+---------------------------------+
-| MojoRequiresDependencyResolutionTypeTaglet | -tag 'requiresDependencyResolution:t:Requires the dependencies in this specified scope:'
-*--------------------------------------------+---------------------------------+
-| MojoRequiresDirectInvocationTypeTaglet | -tag 'requiresDirectInvocation:t:Requires a direct invocation by the user'
-*--------------------------------------------+---------------------------------+
-| MojoRequiresOnLineTypeTaglet | -tag 'requiresProject:t:Requires to be online to run'
-*--------------------------------------------+---------------------------------+
-| MojoRequiresProjectTypeTaglet | -tag 'requiresProject:t:Requires a Maven project to run'
-*--------------------------------------------+---------------------------------+
-| MojoRequiresReportsTypeTaglet | -tag 'requiresReports:t:Requires Maven reports to run'
-*--------------------------------------------+---------------------------------+
-
-* Resources
-
- * {{{./apidocs/index.html}API}}
-
- * {{{/developers/mojo-api-specification.html#The_Descriptor_and_Annotations}Mojo API Specification}}
-
- []
diff --git a/maven-plugin-tools-javadoc/src/site/resources/images/javadoc.png b/maven-plugin-tools-javadoc/src/site/resources/images/javadoc.png
deleted file mode 100644
index d381f3a..0000000
--- a/maven-plugin-tools-javadoc/src/site/resources/images/javadoc.png
+++ /dev/null
Binary files differ
diff --git a/maven-plugin-tools-javadoc/src/site/site.xml b/maven-plugin-tools-javadoc/src/site/site.xml
deleted file mode 100644
index 4e8d736..0000000
--- a/maven-plugin-tools-javadoc/src/site/site.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<project xmlns="http://maven.apache.org/DECORATION/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
- <body>
- <menu name="Overview">
- <item name="Introduction" href="index.html"/>
- <item name="Usage" href="usage.html"/>
- <item name="Screenshots From Javadoc" href="screenshots.html"/>
- <item name="JavaDocs" href="apidocs/index.html"/>
- <item name="Source Xref" href="xref/index.html"/>
- <!--item name="FAQ" href="faq.html"/-->
- </menu>
- </body>
-</project>
diff --git a/maven-script/maven-plugin-tools-ant/pom.xml b/maven-script/maven-plugin-tools-ant/pom.xml
index 2b02e90..490e99d 100644
--- a/maven-script/maven-plugin-tools-ant/pom.xml
+++ b/maven-script/maven-plugin-tools-ant/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-script</artifactId>
- <version>3.6-SNAPSHOT</version>
+ <version>3.6.0-SNAPSHOT</version>
</parent>
<artifactId>maven-plugin-tools-ant</artifactId>
@@ -36,14 +36,6 @@
<dependencies>
<!-- maven -->
<dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-descriptor</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-api</artifactId>
</dependency>
diff --git a/maven-script/maven-plugin-tools-ant/src/main/java/org/apache/maven/tools/plugin/extractor/ant/AntMojoDescriptorExtractor.java b/maven-script/maven-plugin-tools-ant/src/main/java/org/apache/maven/tools/plugin/extractor/ant/AntMojoDescriptorExtractor.java
index 225b025..d0a1e68 100644
--- a/maven-script/maven-plugin-tools-ant/src/main/java/org/apache/maven/tools/plugin/extractor/ant/AntMojoDescriptorExtractor.java
+++ b/maven-script/maven-plugin-tools-ant/src/main/java/org/apache/maven/tools/plugin/extractor/ant/AntMojoDescriptorExtractor.java
@@ -44,7 +44,6 @@
/**
* Extracts Mojo descriptors from <a href="http://ant.apache.org">Ant</a> sources.
*
- * @version $Id$
*/
@Component( role = MojoDescriptorExtractor.class, hint = "ant" )
public class AntMojoDescriptorExtractor
@@ -63,7 +62,7 @@
PluginToolsRequest request )
throws ExtractionException, InvalidPluginDescriptorException
{
- List<MojoDescriptor> descriptors = new ArrayList<MojoDescriptor>();
+ List<MojoDescriptor> descriptors = new ArrayList<>();
PluginMetadataParser parser = new PluginMetadataParser();
@@ -175,7 +174,7 @@
@SuppressWarnings( "unchecked" )
List<ComponentRequirement> requirements = descriptor.getRequirements();
- Map<String, ComponentRequirement> reqMap = new HashMap<String, ComponentRequirement>();
+ Map<String, ComponentRequirement> reqMap = new HashMap<>();
if ( requirements != null )
{
diff --git a/maven-script/maven-plugin-tools-beanshell/pom.xml b/maven-script/maven-plugin-tools-beanshell/pom.xml
index a3adb9e..bf3ae2c 100644
--- a/maven-script/maven-plugin-tools-beanshell/pom.xml
+++ b/maven-script/maven-plugin-tools-beanshell/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-script</artifactId>
- <version>3.6-SNAPSHOT</version>
+ <version>3.6.0-SNAPSHOT</version>
</parent>
<artifactId>maven-plugin-tools-beanshell</artifactId>
@@ -39,10 +39,6 @@
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-descriptor</artifactId>
- </dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
diff --git a/maven-script/maven-plugin-tools-beanshell/src/main/java/org/apache/maven/tools/plugin/extractor/beanshell/BeanshellMojoDescriptorExtractor.java b/maven-script/maven-plugin-tools-beanshell/src/main/java/org/apache/maven/tools/plugin/extractor/beanshell/BeanshellMojoDescriptorExtractor.java
index 8b43c43..5b5f638 100644
--- a/maven-script/maven-plugin-tools-beanshell/src/main/java/org/apache/maven/tools/plugin/extractor/beanshell/BeanshellMojoDescriptorExtractor.java
+++ b/maven-script/maven-plugin-tools-beanshell/src/main/java/org/apache/maven/tools/plugin/extractor/beanshell/BeanshellMojoDescriptorExtractor.java
@@ -40,7 +40,6 @@
/**
* Extracts Mojo descriptors from <a href="http://www.beanshell.org/">BeanShell</a> sources.
*
- * @version $Id$
*/
@Component( role = MojoDescriptorExtractor.class, hint = "bsh" )
public class BeanshellMojoDescriptorExtractor
@@ -62,7 +61,7 @@
PluginToolsRequest request )
throws ExtractionException, InvalidPluginDescriptorException
{
- List<MojoDescriptor> descriptors = new ArrayList<MojoDescriptor>();
+ List<MojoDescriptor> descriptors = new ArrayList<>();
for ( Map.Entry<String, Set<File>> entry : scriptFilesKeyedByBasedir.entrySet() )
{
diff --git a/maven-script/maven-plugin-tools-model/pom.xml b/maven-script/maven-plugin-tools-model/pom.xml
index 649deb9..a07d7d1 100644
--- a/maven-script/maven-plugin-tools-model/pom.xml
+++ b/maven-script/maven-plugin-tools-model/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-script</artifactId>
- <version>3.6-SNAPSHOT</version>
+ <version>3.6.0-SNAPSHOT</version>
</parent>
<artifactId>maven-plugin-tools-model</artifactId>
@@ -37,9 +37,8 @@
<!-- maven -->
<dependency>
<groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-descriptor</artifactId>
+ <artifactId>maven-plugin-api</artifactId>
</dependency>
-
<!-- plexus -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
diff --git a/maven-script/maven-plugin-tools-model/src/main/java/org/apache/maven/tools/plugin/extractor/model/PluginMetadataParseException.java b/maven-script/maven-plugin-tools-model/src/main/java/org/apache/maven/tools/plugin/extractor/model/PluginMetadataParseException.java
index 9419c7c..f078039 100644
--- a/maven-script/maven-plugin-tools-model/src/main/java/org/apache/maven/tools/plugin/extractor/model/PluginMetadataParseException.java
+++ b/maven-script/maven-plugin-tools-model/src/main/java/org/apache/maven/tools/plugin/extractor/model/PluginMetadataParseException.java
@@ -24,7 +24,6 @@
/**
* Exception when plugin metadata parsing occurred.
*
- * @version $Id$
*/
public class PluginMetadataParseException
extends Exception
diff --git a/maven-script/maven-plugin-tools-model/src/main/java/org/apache/maven/tools/plugin/extractor/model/PluginMetadataParser.java b/maven-script/maven-plugin-tools-model/src/main/java/org/apache/maven/tools/plugin/extractor/model/PluginMetadataParser.java
index 1a830e9..e0596f4 100644
--- a/maven-script/maven-plugin-tools-model/src/main/java/org/apache/maven/tools/plugin/extractor/model/PluginMetadataParser.java
+++ b/maven-script/maven-plugin-tools-model/src/main/java/org/apache/maven/tools/plugin/extractor/model/PluginMetadataParser.java
@@ -19,6 +19,15 @@
* under the License.
*/
+import org.apache.maven.plugin.descriptor.DuplicateParameterException;
+import org.apache.maven.plugin.descriptor.MojoDescriptor;
+import org.apache.maven.plugin.descriptor.Parameter;
+import org.apache.maven.tools.plugin.extractor.model.io.xpp3.PluginMetadataXpp3Reader;
+import org.codehaus.plexus.component.repository.ComponentRequirement;
+import org.codehaus.plexus.util.ReaderFactory;
+import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+
import java.io.File;
import java.io.IOException;
import java.io.Reader;
@@ -26,25 +35,15 @@
import java.util.List;
import java.util.Set;
-import org.apache.maven.plugin.descriptor.DuplicateParameterException;
-import org.apache.maven.plugin.descriptor.MojoDescriptor;
-import org.apache.maven.plugin.descriptor.Parameter;
-import org.apache.maven.tools.plugin.extractor.model.io.xpp3.PluginMetadataXpp3Reader;
-import org.codehaus.plexus.component.repository.ComponentRequirement;
-import org.codehaus.plexus.util.IOUtil;
-import org.codehaus.plexus.util.ReaderFactory;
-import org.codehaus.plexus.util.StringUtils;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-
/**
* Parser for plugin metadata.
- *
- * @version $Id$
*/
public class PluginMetadataParser
{
- /** Default implementation path which will be replaced in
- * AbstractScriptedMojoDescriptorExtractor#extractMojoDescriptorsFromMetadata(Map, PluginDescriptor) */
+ /**
+ * Default implementation path which will be replaced in
+ * AbstractScriptedMojoDescriptorExtractor#extractMojoDescriptorsFromMetadata(Map, PluginDescriptor)
+ */
public static final String IMPL_BASE_PLACEHOLDER = "<REPLACE-WITH-MOJO-PATH>";
/**
@@ -55,13 +54,10 @@
public Set<MojoDescriptor> parseMojoDescriptors( File metadataFile )
throws PluginMetadataParseException
{
- Set<MojoDescriptor> descriptors = new HashSet<MojoDescriptor>();
+ Set<MojoDescriptor> descriptors = new HashSet<>();
- Reader reader = null;
-
- try
+ try ( Reader reader = ReaderFactory.newXmlReader( metadataFile ) )
{
- reader = ReaderFactory.newXmlReader( metadataFile );
PluginMetadataXpp3Reader metadataReader = new PluginMetadataXpp3Reader();
@@ -69,38 +65,27 @@
List<Mojo> mojos = pluginMetadata.getMojos();
- if ( mojos != null && !mojos.isEmpty() )
+ if ( mojos != null )
{
- for ( Mojo mojo :mojos )
+ for ( Mojo mojo : mojos )
{
MojoDescriptor descriptor = asDescriptor( metadataFile, mojo );
descriptors.add( descriptor );
}
}
-
- reader.close();
- reader = null;
}
- catch ( IOException e )
+ catch ( IOException | XmlPullParserException e )
{
throw new PluginMetadataParseException( metadataFile, "Cannot parse plugin metadata from file.", e );
}
- catch ( XmlPullParserException e )
- {
- throw new PluginMetadataParseException( metadataFile, "Cannot parse plugin metadata from file.", e );
- }
- finally
- {
- IOUtil.close( reader );
- }
return descriptors;
}
/**
* @param metadataFile not null
- * @param mojo not null
+ * @param mojo not null
* @return a mojo descriptor instance
* @throws PluginMetadataParseException if any
*/
@@ -180,8 +165,8 @@
catch ( DuplicateParameterException e )
{
throw new PluginMetadataParseException( metadataFile,
- "Duplicate parameters detected for mojo: "
- + mojo.getGoal(), e );
+ "Duplicate parameters detected for mojo: " + mojo.getGoal(),
+ e );
}
}
}
diff --git a/maven-script/maven-script-ant/pom.xml b/maven-script/maven-script-ant/pom.xml
index a8e673e..5c135fa 100644
--- a/maven-script/maven-script-ant/pom.xml
+++ b/maven-script/maven-script-ant/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-script</artifactId>
- <version>3.6-SNAPSHOT</version>
+ <version>3.6.0-SNAPSHOT</version>
</parent>
<artifactId>maven-script-ant</artifactId>
@@ -52,14 +52,6 @@
<version>1.0-alpha-2.1</version>
</dependency>
<dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-descriptor</artifactId>
- </dependency>
- <dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
</dependency>
diff --git a/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntMojoWrapper.java b/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntMojoWrapper.java
index 9d02206..62223ad 100644
--- a/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntMojoWrapper.java
+++ b/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntMojoWrapper.java
@@ -77,7 +77,7 @@
private Logger logger;
- private transient List<String> unconstructedParts = new ArrayList<String>();
+ private transient List<String> unconstructedParts = new ArrayList<>();
public AntMojoWrapper( AntScriptInvoker scriptInvoker )
{
@@ -92,7 +92,7 @@
antProject = scriptInvoker.getProject();
}
- Map<String, Object> allConfig = new HashMap<String, Object>();
+ Map<String, Object> allConfig = new HashMap<>();
if ( pluginContext != null && !pluginContext.isEmpty() )
{
allConfig.putAll( pluginContext );
@@ -300,7 +300,7 @@
public Path getPathFromArtifacts( Collection<Artifact> artifacts, Project antProject )
throws DependencyResolutionRequiredException
{
- List<String> list = new ArrayList<String>( artifacts.size() );
+ List<String> list = new ArrayList<>( artifacts.size() );
for ( Artifact a : artifacts )
{
diff --git a/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntPropertyHelper.java b/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntPropertyHelper.java
index 6722371..ee6c701 100644
--- a/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntPropertyHelper.java
+++ b/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntPropertyHelper.java
@@ -113,7 +113,7 @@
if ( name.startsWith( DEPENDENCY_PREFIX ) )
{
- val = (String) artifactMap.get( name );
+ val = artifactMap.get( name );
}
if ( val == null )
@@ -159,7 +159,7 @@
{
if ( name.startsWith( DEPENDENCY_PREFIX ) )
{
- val = (String) artifactMap.get( name );
+ val = artifactMap.get( name );
}
else if ( name.startsWith( "project." ) )
{
diff --git a/maven-script/maven-script-beanshell/pom.xml b/maven-script/maven-script-beanshell/pom.xml
index c0c87b8..4c38646 100644
--- a/maven-script/maven-script-beanshell/pom.xml
+++ b/maven-script/maven-script-beanshell/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-script</artifactId>
- <version>3.6-SNAPSHOT</version>
+ <version>3.6.0-SNAPSHOT</version>
</parent>
<artifactId>maven-script-beanshell</artifactId>
diff --git a/maven-script/maven-script-beanshell/src/main/java/org/apache/maven/script/beanshell/BeanshellMojoAdapter.java b/maven-script/maven-script-beanshell/src/main/java/org/apache/maven/script/beanshell/BeanshellMojoAdapter.java
index c716f9e..405458a 100644
--- a/maven-script/maven-script-beanshell/src/main/java/org/apache/maven/script/beanshell/BeanshellMojoAdapter.java
+++ b/maven-script/maven-script-beanshell/src/main/java/org/apache/maven/script/beanshell/BeanshellMojoAdapter.java
@@ -31,7 +31,6 @@
* Mojo adapter for a Beanshell Mojo.
*
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
- * @version $Id$
*/
public class BeanshellMojoAdapter
extends AbstractMojo
diff --git a/maven-script/pom.xml b/maven-script/pom.xml
index b2b5f90..25a8acc 100644
--- a/maven-script/pom.xml
+++ b/maven-script/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools</artifactId>
- <version>3.6-SNAPSHOT</version>
+ <version>3.6.0-SNAPSHOT</version>
</parent>
<artifactId>maven-script</artifactId>
diff --git a/pom.xml b/pom.xml
index 06455ff..7a557e4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,13 +23,13 @@
<parent>
<artifactId>maven-parent</artifactId>
<groupId>org.apache.maven</groupId>
- <version>31</version>
+ <version>33</version>
<relativePath>../pom/maven/pom.xml</relativePath>
</parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools</artifactId>
- <version>3.6-SNAPSHOT</version>
+ <version>3.6.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Maven Plugin Tools</name>
@@ -63,7 +63,7 @@
<module>maven-plugin-tools-api</module>
<module>maven-plugin-tools-java</module>
<module>maven-plugin-tools-annotations</module>
- <module>maven-plugin-tools-javadoc</module>
+ <!--module>maven-plugin-tools-javadoc</module-->
<module>maven-plugin-annotations</module>
<module>maven-script</module>
<module>maven-plugin-plugin</module><!-- keep at end since ITs require every extractors -->
@@ -91,13 +91,14 @@
</distributionManagement>
<properties>
- <surefire.version>2.21.0</surefire.version>
+ <surefire.version>2.22.0</surefire.version>
+ <javaVersion>7</javaVersion>
<pluginTestingHarnessVersion>1.2</pluginTestingHarnessVersion>
- <mavenVersion>2.2.1</mavenVersion>
+ <mavenVersion>3.0</mavenVersion>
<antVersion>1.7.1</antVersion>
<mavenInvokerPluginVersion>3.0.1</mavenInvokerPluginVersion>
<maven.site.path>plugin-tools-archives/plugin-tools-LATEST</maven.site.path>
- <asmVersion>5.0.2</asmVersion>
+ <asmVersion>7.0-beta</asmVersion>
</properties>
<dependencyManagement>
@@ -145,21 +146,16 @@
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
- <version>${mavenVersion}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-descriptor</artifactId>
- <version>${mavenVersion}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${mavenVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${mavenVersion}</version>
</dependency>
@@ -291,6 +287,21 @@
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>enforce-bytecode-version</id>
+ <configuration>
+ <rules>
+ <enforceBytecodeVersion>
+ <excludes>
+ <!-- ASM supports Java 1.5+, see https://asm.ow2.io/faq.html#Q14 -->
+ <exclude>org.ow2.asm:*</exclude>
+ </excludes>
+ </enforceBytecodeVersion>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
@@ -398,41 +409,5 @@
</plugins>
</reporting>
</profile>
- <profile>
- <activation>
- <jdk>[1.9,)</jdk>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-enforcer-plugin</artifactId>
- <executions>
- <execution>
- <id>enforce-bytecode-version</id>
- <configuration>
- <rules>
- <enforceBytecodeVersion>
- <ignoreClasses>
- <ignoreClass>module-info</ignoreClass>
- </ignoreClasses>
- </enforceBytecodeVersion>
- </rules>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>extra-enforcer-rules</artifactId>
- <version>1.0-beta-5</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
- <properties>
- <asmVersion>6.1.1</asmVersion>
- </properties>
- </profile>
</profiles>
</project>
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index d6200a5..af0d296 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -86,11 +86,11 @@
</tr>
<tr>
<td> <a href="./maven-plugin-tools-annotations/index.html">maven-plugin-tools-annotations</a></td>
- <td>Extractor for plugins written in Java with Java 5 annotations.</td>
+ <td>Extractor for plugins written in Java with Java annotations.</td>
</tr>
<tr>
<td> <a href="./maven-plugin-annotations/index.html">maven-plugin-annotations</a></td>
- <td>Provides the Java 5 annotations to use in Mojos.</td>
+ <td>Provides the Java annotations to use in Mojos.</td>
</tr>
<tr>
<td><a href="./maven-script/index.html">maven-script</a></td>