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 2021/08/24 20:42:54 UTC

[maven-javadoc-plugin] branch master updated: [MJAVADOC-677] Using "requires static transitive" makes javadoc goal fail

This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 87dbfb2  [MJAVADOC-677] Using "requires static transitive" makes javadoc goal fail
87dbfb2 is described below

commit 87dbfb209e5b75ead8443d70a0c748d02a4f729b
Author: rfscholte <rf...@apache.org>
AuthorDate: Tue Aug 24 22:42:41 2021 +0200

    [MJAVADOC-677] Using "requires static transitive" makes javadoc goal fail
---
 pom.xml                                            |  2 +-
 .../app/pom.xml                                    | 40 +++++++++++++
 .../src/main/java/com/example/app/Application.java | 27 +++++++++
 .../app/src/main/java/module-info.java             | 22 +++++++
 .../awkward/pom.xml                                | 32 +++++++++++
 .../src/main/java/com/example/awkward/Awkward.java | 22 +++++++
 .../awkward/src/main/java/module-info.java         | 22 +++++++
 .../invoker.properties                             | 17 ++++++
 .../lib/pom.xml                                    | 42 ++++++++++++++
 .../src/main/java/com/example/lib/AwkwardLib.java  | 29 ++++++++++
 .../lib/src/main/java/com/example/lib/Lib.java     | 27 +++++++++
 .../lib/src/main/java/module-info.java             | 25 ++++++++
 .../MJAVADOC-677_require-static-transitive/pom.xml | 67 ++++++++++++++++++++++
 13 files changed, 373 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index e1a5c8e..fb5d46a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,7 +72,7 @@ under the License.
     <doxia-sitetoolsVersion>1.9.2</doxia-sitetoolsVersion>
     <wagonVersion>2.4</wagonVersion>
     <sonatypeAetherVersion>1.13.1</sonatypeAetherVersion>
-    <plexus-java.version>1.0.7</plexus-java.version>
+    <plexus-java.version>1.1.0</plexus-java.version>
     <jetty.version>9.4.43.v20210629</jetty.version>
     <!-- for ITs -->
     <sitePluginVersion>3.3</sitePluginVersion>
diff --git a/src/it/projects/MJAVADOC-677_require-static-transitive/app/pom.xml b/src/it/projects/MJAVADOC-677_require-static-transitive/app/pom.xml
new file mode 100644
index 0000000..887dad5
--- /dev/null
+++ b/src/it/projects/MJAVADOC-677_require-static-transitive/app/pom.xml
@@ -0,0 +1,40 @@
+<?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.plugins.javadoc.it</groupId>
+        <artifactId>mjavadoc677</artifactId>
+        <version>0.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>app</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.maven.plugins.javadoc.it</groupId>
+            <artifactId>lib</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file
diff --git a/src/it/projects/MJAVADOC-677_require-static-transitive/app/src/main/java/com/example/app/Application.java b/src/it/projects/MJAVADOC-677_require-static-transitive/app/src/main/java/com/example/app/Application.java
new file mode 100644
index 0000000..da02295
--- /dev/null
+++ b/src/it/projects/MJAVADOC-677_require-static-transitive/app/src/main/java/com/example/app/Application.java
@@ -0,0 +1,27 @@
+package com.example.app;
+
+/*
+ * 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.example.lib.Lib;
+
+public class Application
+{
+      private Lib<Object> stringLib;
+}
\ No newline at end of file
diff --git a/src/it/projects/MJAVADOC-677_require-static-transitive/app/src/main/java/module-info.java b/src/it/projects/MJAVADOC-677_require-static-transitive/app/src/main/java/module-info.java
new file mode 100644
index 0000000..b75f4cf
--- /dev/null
+++ b/src/it/projects/MJAVADOC-677_require-static-transitive/app/src/main/java/module-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+module com.example.app
+{
+    requires com.example.lib;
+}
\ No newline at end of file
diff --git a/src/it/projects/MJAVADOC-677_require-static-transitive/awkward/pom.xml b/src/it/projects/MJAVADOC-677_require-static-transitive/awkward/pom.xml
new file mode 100644
index 0000000..d84aadc
--- /dev/null
+++ b/src/it/projects/MJAVADOC-677_require-static-transitive/awkward/pom.xml
@@ -0,0 +1,32 @@
+<?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.plugins.javadoc.it</groupId>
+        <artifactId>mjavadoc677</artifactId>
+        <version>0.1.0-SNAPSHOT</version>
+    </parent>
+    <artifactId>awkward</artifactId>
+
+</project>
\ No newline at end of file
diff --git a/src/it/projects/MJAVADOC-677_require-static-transitive/awkward/src/main/java/com/example/awkward/Awkward.java b/src/it/projects/MJAVADOC-677_require-static-transitive/awkward/src/main/java/com/example/awkward/Awkward.java
new file mode 100644
index 0000000..ad5d81b
--- /dev/null
+++ b/src/it/projects/MJAVADOC-677_require-static-transitive/awkward/src/main/java/com/example/awkward/Awkward.java
@@ -0,0 +1,22 @@
+package com.example.awkward;
+/*
+ * 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 class Awkward
+{
+}
\ No newline at end of file
diff --git a/src/it/projects/MJAVADOC-677_require-static-transitive/awkward/src/main/java/module-info.java b/src/it/projects/MJAVADOC-677_require-static-transitive/awkward/src/main/java/module-info.java
new file mode 100644
index 0000000..0b750db
--- /dev/null
+++ b/src/it/projects/MJAVADOC-677_require-static-transitive/awkward/src/main/java/module-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+module com.example.awkward
+{
+    exports com.example.awkward;
+}
diff --git a/src/it/projects/MJAVADOC-677_require-static-transitive/invoker.properties b/src/it/projects/MJAVADOC-677_require-static-transitive/invoker.properties
new file mode 100644
index 0000000..7f54403
--- /dev/null
+++ b/src/it/projects/MJAVADOC-677_require-static-transitive/invoker.properties
@@ -0,0 +1,17 @@
+# 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 = 9+
diff --git a/src/it/projects/MJAVADOC-677_require-static-transitive/lib/pom.xml b/src/it/projects/MJAVADOC-677_require-static-transitive/lib/pom.xml
new file mode 100644
index 0000000..cb2af9f
--- /dev/null
+++ b/src/it/projects/MJAVADOC-677_require-static-transitive/lib/pom.xml
@@ -0,0 +1,42 @@
+<?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.plugins.javadoc.it</groupId>
+        <artifactId>mjavadoc677</artifactId>
+        <version>0.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>lib</artifactId>
+
+    <dependencies>
+        <dependency>
+          <groupId>org.apache.maven.plugins.javadoc.it</groupId>
+          <artifactId>awkward</artifactId>
+          <version>0.1.0-SNAPSHOT</version>
+          <!-- if awkward module was only static, it should be optional -->
+          <!-- <optional>true</optional> -->
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file
diff --git a/src/it/projects/MJAVADOC-677_require-static-transitive/lib/src/main/java/com/example/lib/AwkwardLib.java b/src/it/projects/MJAVADOC-677_require-static-transitive/lib/src/main/java/com/example/lib/AwkwardLib.java
new file mode 100644
index 0000000..9a3b5ac
--- /dev/null
+++ b/src/it/projects/MJAVADOC-677_require-static-transitive/lib/src/main/java/com/example/lib/AwkwardLib.java
@@ -0,0 +1,29 @@
+package com.example.lib;
+
+/*
+ * 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.example.awkward.Awkward;
+
+public class AwkwardLib implements Lib<Awkward>
+{
+    public void apply( Awkward awkward )
+    {
+    }
+}
\ No newline at end of file
diff --git a/src/it/projects/MJAVADOC-677_require-static-transitive/lib/src/main/java/com/example/lib/Lib.java b/src/it/projects/MJAVADOC-677_require-static-transitive/lib/src/main/java/com/example/lib/Lib.java
new file mode 100644
index 0000000..122194f
--- /dev/null
+++ b/src/it/projects/MJAVADOC-677_require-static-transitive/lib/src/main/java/com/example/lib/Lib.java
@@ -0,0 +1,27 @@
+package com.example.lib;
+
+/*
+ * 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.example.awkward.Awkward;
+
+public interface Lib<T>
+{
+    void apply(T t);
+}
\ No newline at end of file
diff --git a/src/it/projects/MJAVADOC-677_require-static-transitive/lib/src/main/java/module-info.java b/src/it/projects/MJAVADOC-677_require-static-transitive/lib/src/main/java/module-info.java
new file mode 100644
index 0000000..d5fdc03
--- /dev/null
+++ b/src/it/projects/MJAVADOC-677_require-static-transitive/lib/src/main/java/module-info.java
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ */
+module com.example.lib
+{
+    exports com.example.lib;
+
+    // static transitive is an unusual but valid combination
+    requires static transitive com.example.awkward;
+}
diff --git a/src/it/projects/MJAVADOC-677_require-static-transitive/pom.xml b/src/it/projects/MJAVADOC-677_require-static-transitive/pom.xml
new file mode 100644
index 0000000..95f823b
--- /dev/null
+++ b/src/it/projects/MJAVADOC-677_require-static-transitive/pom.xml
@@ -0,0 +1,67 @@
+<?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.javadoc.it</groupId>
+    <artifactId>mjavadoc677</artifactId>
+    <version>0.1.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <url>https://issues.apache.org/jira/browse/MJAVADOC-677</url>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <modules>
+        <module>awkward</module>
+        <module>lib</module>
+        <module>app</module>
+    </modules>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.8.1</version>
+                <configuration>
+                    <release>11</release>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <version>@project.version@</version>
+                <executions>
+                    <execution>
+                        <id>attach-javadoc</id>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file