svn commit: r1817039 - in /maven/plugins/trunk/maven-javadoc-plugin/src: it/projects/MJAVADOC-498_aggr_modulepath/ it/projects/MJAVADOC-498_aggr_modulepath/bar/ it/projects/MJAVADOC-498_aggr_modulepath/bar/src/ it/projects/MJAVADOC-498_aggr_modulepath/...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1817039 - in /maven/plugins/trunk/maven-javadoc-plugin/src: it/projects/MJAVADOC-498_aggr_modulepath/ it/projects/MJAVADOC-498_aggr_modulepath/bar/ it/projects/MJAVADOC-498_aggr_modulepath/bar/src/ it/projects/MJAVADOC-498_aggr_modulepath/...

Robert Scholte-8
Author: rfscholte
Date: Sun Dec  3 16:02:59 2017
New Revision: 1817039

URL: http://svn.apache.org/viewvc?rev=1817039&view=rev
Log:
[MJAVADOC-498] "module not found" when Java 9 module-info present
Support aggrated javadoc

Added:
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/pom.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/src/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/src/main/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/src/main/java/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/src/main/java/com/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/src/main/java/com/bar/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/src/main/java/com/bar/OtherClass.java
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/src/main/java/module-info.java
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/pom.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/src/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/src/main/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/src/main/java/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/src/main/java/com/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/src/main/java/com/baz/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/src/main/java/com/baz/LonelyClass.java
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/src/main/java/module-info.java
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/pom.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/src/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/src/main/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/src/main/java/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/src/main/java/com/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/src/main/java/com/foo/
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/src/main/java/com/foo/MyClass.java
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/src/main/java/module-info.java
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/invoker.properties
    maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/pom.xml
Modified:
    maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
    maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/AggregatorJavadocReportTest.java
    maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/FixJavadocMojoTest.java
    maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/JavadocJarTest.java
    maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
    maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/TestJavadocReportTest.java

Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/pom.xml?rev=1817039&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/pom.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/pom.xml Sun Dec  3 16:02:59 2017
@@ -0,0 +1,41 @@
+<?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>mjavadoc489</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>bar</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.plugins.javadoc.it</groupId>
+      <artifactId>foo</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+
+</project>
\ No newline at end of file

Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/src/main/java/com/bar/OtherClass.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/src/main/java/com/bar/OtherClass.java?rev=1817039&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/src/main/java/com/bar/OtherClass.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/src/main/java/com/bar/OtherClass.java Sun Dec  3 16:02:59 2017
@@ -0,0 +1,25 @@
+package com.bar;
+
+/*
+ * 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 OtherClass
+{
+    private com.foo.MyClass myClass;
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/src/main/java/module-info.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/src/main/java/module-info.java?rev=1817039&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/src/main/java/module-info.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/bar/src/main/java/module-info.java Sun Dec  3 16:02:59 2017
@@ -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.bar
+{
+  requires com.foo;
+  
+  // workaround javadoc bug;
+  exports com.bar;
+}
\ No newline at end of file

Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/pom.xml?rev=1817039&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/pom.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/pom.xml Sun Dec  3 16:02:59 2017
@@ -0,0 +1,61 @@
+<?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>mjavadoc489</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>baz</artifactId>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>javadoc-aggregate</id>
+            <phase>package</phase>
+            <goals>
+              <goal>javadoc-no-fork</goal>
+            </goals>
+            <configuration>
+              <includeDependencySources>true</includeDependencySources>
+              <includeTransitiveDependencySources>true</includeTransitiveDependencySources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.plugins.javadoc.it</groupId>
+      <artifactId>bar</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+
+</project>
\ No newline at end of file

Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/src/main/java/com/baz/LonelyClass.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/src/main/java/com/baz/LonelyClass.java?rev=1817039&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/src/main/java/com/baz/LonelyClass.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/src/main/java/com/baz/LonelyClass.java Sun Dec  3 16:02:59 2017
@@ -0,0 +1,25 @@
+package com.baz;
+
+/*
+ * 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 LonelyClass
+{
+    
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/src/main/java/module-info.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/src/main/java/module-info.java?rev=1817039&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/src/main/java/module-info.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/baz/src/main/java/module-info.java Sun Dec  3 16:02:59 2017
@@ -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.baz
+{
+  requires com.bar;
+  
+  // workaround javadoc bug;
+  exports com.baz;
+}
\ No newline at end of file

Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/pom.xml?rev=1817039&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/pom.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/pom.xml Sun Dec  3 16:02:59 2017
@@ -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">
+
+  <parent>
+    <groupId>org.apache.maven.plugins.javadoc.it</groupId>
+    <artifactId>mjavadoc489</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>foo</artifactId>
+
+</project>
\ No newline at end of file

Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/src/main/java/com/foo/MyClass.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/src/main/java/com/foo/MyClass.java?rev=1817039&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/src/main/java/com/foo/MyClass.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/src/main/java/com/foo/MyClass.java Sun Dec  3 16:02:59 2017
@@ -0,0 +1,25 @@
+package com.foo;
+
+/*
+ * 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 MyClass
+{
+
+}

Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/src/main/java/module-info.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/src/main/java/module-info.java?rev=1817039&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/src/main/java/module-info.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/foo/src/main/java/module-info.java Sun Dec  3 16:02:59 2017
@@ -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.foo
+{
+  exports com.foo;
+}
\ No newline at end of file

Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/invoker.properties?rev=1817039&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/invoker.properties (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/invoker.properties Sun Dec  3 16:02:59 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.java.version = 9+

Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/pom.xml?rev=1817039&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/pom.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/projects/MJAVADOC-498_aggr_modulepath/pom.xml Sun Dec  3 16:02:59 2017
@@ -0,0 +1,68 @@
+<?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/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.javadoc.it</groupId>
+  <artifactId>mjavadoc489</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <url>https://issues.apache.org/jira/browse/MJAVADOC-489</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <modules>
+    <module>foo</module>
+    <module>bar</module>
+    <module>baz</module>
+  </modules>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>3.7.0</version>
+        <configuration>
+          <release>9</release>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>@project.version@</version>
+        <executions>
+          <execution>
+            <id>attach-javadocs</id>
+            <phase>package</phase>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java?rev=1817039&r1=1817038&r2=1817039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java Sun Dec  3 16:02:59 2017
@@ -38,6 +38,8 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.net.URLClassLoader;
+import java.nio.file.Files;
+import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Calendar;
@@ -1899,7 +1901,6 @@ public abstract class AbstractJavadocMoj
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
-        getLog().debug( "verify removed parameter" );
         verifyRemovedParameter( "aggregator" );
         verifyRemovedParameter( "proxyHost" );
         verifyRemovedParameter( "proxyPort" );
@@ -2062,7 +2063,7 @@ public abstract class AbstractJavadocMoj
         // Wrap Javadoc options
         // ----------------------------------------------------------------------
 
-        addJavadocOptions( arguments, sourcePaths );
+        addJavadocOptions( javadocOutputDirectory, arguments, sourcePaths );
 
         // ----------------------------------------------------------------------
         // Wrap Standard doclet Options
@@ -2232,8 +2233,8 @@ public abstract class AbstractJavadocMoj
         if ( StringUtils.isEmpty( sourcepath ) )
         {
             
-            Collection<String> sourcePaths =
-                new ArrayList<>( JavadocUtil.pruneDirs( project, getProjectSourceRoots( project ) ) );
+            Set<String> sourcePaths =
+                new LinkedHashSet<>( JavadocUtil.pruneDirs( project, getProjectSourceRoots( project ) ) );
 
             if ( project.getExecutionProject() != null )
             {
@@ -4638,12 +4639,15 @@ public abstract class AbstractJavadocMoj
      * The <a href="package-summary.html#Standard_Javadoc_Options">package documentation</a> details the
      * Standard Javadoc Options wrapped by this Plugin.
      *
+     * @param javadocOutputDirectory not null
      * @param arguments   not null
      * @param sourcePaths not null
      * @throws MavenReportException if any
      * @see <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#javadocoptions">http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#javadocoptions</a>
      */
-    private void addJavadocOptions( List<String> arguments, Map<String, Collection<String>> allSourcePaths )
+    private void addJavadocOptions( File javadocOutputDirectory,
+                                    List<String> arguments,
+                                    Map<String, Collection<String>> allSourcePaths )
         throws MavenReportException
     {
         Collection<String> sourcePaths = collect( allSourcePaths.values() );
@@ -4677,10 +4681,11 @@ public abstract class AbstractJavadocMoj
         List<String> roots = getProjectSourceRoots( getProject() );
         
         File mainDescriptor = findMainDescriptor( roots );
-        
+
+        final LocationManager locationManager = new LocationManager();
+
         if ( mainDescriptor != null && !isTest() )
         {
-            LocationManager locationManager = new LocationManager();
             ResolvePathsRequest<File> request =
                 ResolvePathsRequest.withFiles( getPathElements() ).setMainModuleDescriptor( mainDescriptor );
             try
@@ -4690,9 +4695,15 @@ public abstract class AbstractJavadocMoj
                 String classpath = StringUtils.join( result.getClasspathElements().iterator(), File.pathSeparator );
                 addArgIfNotEmpty( arguments, "--class-path", JavadocUtil.quotedPathArgument( classpath ) );
 
+                Set<File> modulePathElements = new HashSet<>( result.getModulepathElements().keySet() )  ;
+                if ( allSourcePaths.size() > 1 )
+                {
+                    // Probably required due to bug in javadoc (Java 9+)  
+                    modulePathElements.addAll( getProjectBuildOutputDirs( getProject() ) );
+                }
+                
                 String modulepath =
-                    StringUtils.join( result.getModulepathElements().keySet().iterator(), File.pathSeparator );
-                getLog().info( "modulepath: " + modulepath );
+                    StringUtils.join( modulePathElements.iterator(), File.pathSeparator );
                 addArgIfNotEmpty( arguments, "--module-path", JavadocUtil.quotedPathArgument( modulepath ) );
             }
             catch ( IOException e )
@@ -4706,6 +4717,59 @@ public abstract class AbstractJavadocMoj
             addArgIfNotEmpty( arguments, "-classpath", JavadocUtil.quotedPathArgument( classpath ) );
         }
 
+        Collection<String> reactorKeys = new HashSet<>( session.getProjects().size() );
+        for ( MavenProject reactorProject : session.getProjects() )
+        {
+            reactorKeys.add( ArtifactUtils.versionlessKey( reactorProject.getGroupId(),
+                                                           reactorProject.getArtifactId() ) );
+        }
+        
+        Path moduleSourceDir = null;
+        if ( allSourcePaths.size() > 1 )
+        {
+            for ( Map.Entry<String, Collection<String>> projectSourcepaths : allSourcePaths.entrySet() )
+            {
+                if ( reactorKeys.contains( projectSourcepaths.getKey() ) )
+                {
+                    File moduleDescriptor = findMainDescriptor( projectSourcepaths.getValue() );
+                    if ( moduleDescriptor != null )
+                    {
+                        moduleSourceDir = javadocOutputDirectory.toPath().resolve( "src" );
+                        try
+                        {
+                            moduleSourceDir = Files.createDirectories( moduleSourceDir );
+                            ResolvePathsRequest<File> request =
+                                ResolvePathsRequest.withFiles( Collections.<File>emptyList() )
+                                                   .setMainModuleDescriptor( moduleDescriptor );
+                            
+                            String moduleName =
+                                locationManager.resolvePaths( request ).getMainModuleDescriptor().name();
+                            
+                            addArgIfNotEmpty( arguments, "--patch-module", moduleName + '='
+                                + JavadocUtil.quotedPathArgument( getSourcePath( projectSourcepaths.getValue() ) ) );
+                            
+                            Files.createDirectory( moduleSourceDir.resolve( moduleName ) );
+                        }
+                        catch ( IOException e )
+                        {
+                            throw new MavenReportException( e.getMessage() );
+                        }
+                    }
+                    else
+                    {
+                        // todo
+                        getLog().error( "no module descriptor for " + projectSourcepaths.getKey() );
+                    }
+                }
+                else
+                {
+                    // todo
+                    getLog().error( "no reactor project: " + projectSourcepaths.getKey() );
+
+                }
+            }
+        }
+        
         if ( StringUtils.isNotEmpty( doclet ) )
         {
             addArgIfNotEmpty( arguments, "-doclet", JavadocUtil.quotedArgument( doclet ) );
@@ -4743,7 +4807,17 @@ public abstract class AbstractJavadocMoj
             sourcepath = StringUtils.join( sourcePaths.iterator(), File.pathSeparator );
         }
         
-        addArgIfNotEmpty( arguments, "-sourcepath", JavadocUtil.quotedPathArgument( getSourcePath( sourcePaths ) ) );
+        if ( moduleSourceDir != null )
+        {
+            addArgIfNotEmpty( arguments, "--module-source-path",
+                              JavadocUtil.quotedPathArgument( moduleSourceDir.toString() ) );
+        }
+        else
+        {
+            addArgIfNotEmpty( arguments, "-sourcepath",
+                              JavadocUtil.quotedPathArgument( getSourcePath( sourcePaths ) ) );
+        }
+
 
         if ( StringUtils.isNotEmpty( sourcepath ) && isJavaDocVersionAtLeast( SINCE_JAVADOC_1_5 ) )
         {
@@ -4764,7 +4838,7 @@ public abstract class AbstractJavadocMoj
         }
     }
 
-    private File findMainDescriptor( List<String> roots )
+    private File findMainDescriptor( Collection<String> roots )
     {
         for ( String root : roots )
         {

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/AggregatorJavadocReportTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/AggregatorJavadocReportTest.java?rev=1817039&r1=1817038&r2=1817039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/AggregatorJavadocReportTest.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/AggregatorJavadocReportTest.java Sun Dec  3 16:02:59 2017
@@ -30,6 +30,7 @@ import org.apache.maven.model.Plugin;
 import org.apache.maven.plugin.MojoExecution;
 import org.apache.maven.plugin.testing.AbstractMojoTestCase;
 import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.util.FileUtils;
 import org.sonatype.aether.impl.internal.SimpleLocalRepositoryManager;
 import org.sonatype.aether.util.DefaultRepositorySystemSession;
@@ -68,7 +69,11 @@ public class AggregatorJavadocReportTest
         MojoExecution mojoExec = new MojoExecution( new Plugin(), "aggregate", null );
         setVariableValueToObject( mojo, "mojo", mojoExec );
         
-        MavenSession session = newMavenSession( new MavenProjectStub() );
+        MavenProject currentProject = new MavenProjectStub();
+        currentProject.setGroupId( "GROUPID" );
+        currentProject.setArtifactId( "ARTIFACTID" );
+        
+        MavenSession session = newMavenSession( currentProject );
         DefaultRepositorySystemSession repoSysSession = (DefaultRepositorySystemSession) session.getRepositorySession();
         repoSysSession.setLocalRepositoryManager( new SimpleLocalRepositoryManager( localRepo ) );
         setVariableValueToObject( mojo, "session", session );

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/FixJavadocMojoTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/FixJavadocMojoTest.java?rev=1817039&r1=1817038&r2=1817039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/FixJavadocMojoTest.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/FixJavadocMojoTest.java Sun Dec  3 16:02:59 2017
@@ -150,7 +150,7 @@ public class FixJavadocMojoTest
     {
         // Should be an assumption, but not supported by TestCase
         // Java 5 not supported by Java9 anymore
-        if ( JavadocVersion.parse( SystemUtils.JAVA_VERSION ).compareTo( JavadocVersion.parse( "9" ) ) >= 0 )
+        if ( JavadocVersion.parse( SystemUtils.JAVA_SPECIFICATION_VERSION ).compareTo( JavadocVersion.parse( "9" ) ) >= 0 )
         {
             return;
         }

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/JavadocJarTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/JavadocJarTest.java?rev=1817039&r1=1817038&r2=1817039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/JavadocJarTest.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/JavadocJarTest.java Sun Dec  3 16:02:59 2017
@@ -32,9 +32,11 @@ import java.util.zip.ZipFile;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.plugin.MojoExecution;
 import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
 import org.apache.maven.plugins.javadoc.AbstractJavadocMojo;
 import org.apache.maven.plugins.javadoc.JavadocJar;
 import org.apache.maven.plugins.javadoc.JavadocVersion;
+import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.util.FileUtils;
 
 /**
@@ -53,6 +55,12 @@ public class JavadocJarTest
 
         setVariableValueToObject( mojo, "mojo", mojoExec );
         
+        MavenProject currentProject = new MavenProjectStub();
+        currentProject.setGroupId( "GROUPID" );
+        currentProject.setArtifactId( "ARTIFACTID" );
+        
+        setVariableValueToObject( mojo, "session", newMavenSession( currentProject ) );
+        
         return mojo;
     }
 

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java?rev=1817039&r1=1817038&r2=1817039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java Sun Dec  3 16:02:59 2017
@@ -38,9 +38,9 @@ import org.apache.maven.plugin.LegacySup
 import org.apache.maven.plugin.MojoExecution;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.testing.AbstractMojoTestCase;
-import org.apache.maven.plugins.javadoc.JavadocReport;
-import org.apache.maven.plugins.javadoc.JavadocVersion;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
 import org.apache.maven.plugins.javadoc.ProxyServer.AuthAsyncProxyServlet;
+import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.ProjectBuildingRequest;
 import org.apache.maven.repository.internal.MavenRepositorySystemSession;
 import org.apache.maven.settings.Proxy;
@@ -93,6 +93,12 @@ public class JavadocReportTest
 
         setVariableValueToObject( mojo, "mojo", mojoExec );
 
+        MavenProject currentProject = new MavenProjectStub();
+        currentProject.setGroupId( "GROUPID" );
+        currentProject.setArtifactId( "ARTIFACTID" );
+        
+        setVariableValueToObject( mojo, "session", newMavenSession( currentProject ) );
+        
         return mojo;
     }
 
@@ -299,7 +305,7 @@ public class JavadocReportTest
     {
         // Should be an assumption, but not supported by TestCase
         // Seems like a bug in Javadoc 9
-        if ( JavadocVersion.parse( SystemUtils.JAVA_VERSION ).compareTo( JavadocVersion.parse( "9" ) ) == 0 )
+        if ( JavadocVersion.parse( SystemUtils.JAVA_SPECIFICATION_VERSION ).compareTo( JavadocVersion.parse( "9" ) ) == 0 )
         {
             return;
         }
@@ -562,7 +568,7 @@ public class JavadocReportTest
     {
         // Should be an assumption, but not supported by TestCase
         // Java 5 not supported by Java9 anymore
-        if ( JavadocVersion.parse( SystemUtils.JAVA_VERSION ).compareTo( JavadocVersion.parse( "9" ) ) >= 0 )
+        if ( JavadocVersion.parse( SystemUtils.JAVA_SPECIFICATION_VERSION ).compareTo( JavadocVersion.parse( "9" ) ) >= 0 )
         {
             return;
         }

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/TestJavadocReportTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/TestJavadocReportTest.java?rev=1817039&r1=1817038&r2=1817039&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/TestJavadocReportTest.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugins/javadoc/TestJavadocReportTest.java Sun Dec  3 16:02:59 2017
@@ -24,7 +24,8 @@ import java.io.File;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.plugin.MojoExecution;
 import org.apache.maven.plugin.testing.AbstractMojoTestCase;
-import org.apache.maven.plugins.javadoc.TestJavadocReport;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.util.FileUtils;
 
 /**
@@ -49,7 +50,13 @@ public class TestJavadocReportTest
         MojoExecution mojoExec = new MojoExecution( new Plugin(), "test-javadoc", null );
 
         setVariableValueToObject( mojo, "mojo", mojoExec );
+
+        MavenProject currentProject = new MavenProjectStub();
+        currentProject.setGroupId( "GROUPID" );
+        currentProject.setArtifactId( "ARTIFACTID" );
         
+        setVariableValueToObject( mojo, "session", newMavenSession( currentProject ) );
+
         mojo.execute();
 
         File generatedFile =