You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2017/08/30 17:14:24 UTC

svn commit: r1806713 - in /maven/plugin-tools/trunk: maven-plugin-plugin/src/it/mplugin-324_javadoc/ maven-plugin-plugin/src/it/mplugin-324_javadoc/src/ maven-plugin-plugin/src/it/mplugin-324_javadoc/src/main/ maven-plugin-plugin/src/it/mplugin-324_jav...

Author: rfscholte
Date: Wed Aug 30 17:14:24 2017
New Revision: 1806713

URL: http://svn.apache.org/viewvc?rev=1806713&view=rev
Log:
[MPLUGIN-324] javadoc generated by helpmojo goal of maven-plugin-plugin produces build failures

Added:
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/invoker.properties
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/pom.xml
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/src/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/src/main/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/src/main/java/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/src/main/java/test/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/src/main/java/test/MyMojo.java
Modified:
    maven/plugin-tools/trunk/maven-plugin-tools-generators/src/main/resources/help-class-source.vm

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/invoker.properties?rev=1806713&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/invoker.properties (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/invoker.properties Wed Aug 30 17:14:24 2017
@@ -0,0 +1,18 @@
+# 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.goals = process-classes javadoc:javadoc

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/pom.xml?rev=1806713&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/pom.xml (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/pom.xml Wed Aug 30 17:14:24 2017
@@ -0,0 +1,95 @@
+<?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.plugins.plugin.its</groupId>
+  <artifactId>mplugin3224</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>maven-plugin</packaging>
+
+  <description>
+    Generation javadoc for private methods should be valid
+  </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>2.4</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-javadoc-plugin</artifactId>
+          <version>3.0.0-M1</version>
+          <configuration>
+            <level>private</level>
+          </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>

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/src/main/java/test/MyMojo.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/src/main/java/test/MyMojo.java?rev=1806713&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/src/main/java/test/MyMojo.java (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/mplugin-324_javadoc/src/main/java/test/MyMojo.java Wed Aug 30 17:14:24 2017
@@ -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 org.apache.maven.plugin.AbstractMojo}.
+ * 
+ * @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()
+    {
+    }
+
+}

Modified: maven/plugin-tools/trunk/maven-plugin-tools-generators/src/main/resources/help-class-source.vm
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-generators/src/main/resources/help-class-source.vm?rev=1806713&r1=1806712&r2=1806713&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-generators/src/main/resources/help-class-source.vm (original)
+++ maven/plugin-tools/trunk/maven-plugin-tools-generators/src/main/resources/help-class-source.vm Wed Aug 30 17:14:24 2017
@@ -398,7 +398,7 @@ public class HelpMojo
      * @param indentSize The size of each indentation, must not be negative.
      * @param lineLength The length of the line, must not be negative.
      * @return The sequence of display lines, never <code>null</code>.
-     * @throws NegativeArraySizeException if <code>indent < 0</code>
+     * @throws NegativeArraySizeException if <code>indent &lt; 0</code>
      */
     private static List<String> toLines( String text, int indent, int indentSize, int lineLength )
     {