MrThaler opened a new issue, #1314: URL: https://github.com/apache/maven-javadoc-plugin/issues/1314
### Affected version 3.12.0 ### Bug description When creating a Test Javadoc report in a Multi-Module-Project, Runtime dependencies in modules are not properly considered when creating the classpath for test classes. # Steps to Reproduce You need just two POMs and one Java class. Main Project **pom.xml**: ```xml <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>some.group.id</groupId> <artifactId>multi-module-parent</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <modules> <module>module</module> </modules> <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>3.12.0</version> <configuration> <show>package</show> </configuration> </plugin> </plugins> </reporting> </project> ``` Module in **module/pom.xml**: ```xml <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>some.group.id</groupId> <artifactId>multi-module-parent</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>module</artifactId> <dependencies> <dependency> <groupId>net.minidev</groupId> <artifactId>json-smart</artifactId> <version>2.6.0</version> <scope>runtime</scope> </dependency> </dependencies> </project> ``` Test class in **src/main/java/example/Example.java**: ```java package example; import net.minidev.json.JSONArray; public class Example { void test() { System.out.println(JSONArray.class); } } ``` # Expected Behavior The report should be created normally. # Actual Behavior The report fails with an error: > [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.12.1:site (default-site) on project multi-module-parent: Error generating maven-javadoc-plugin:3.12.0:test-aggregate report: > [ERROR] Exit code: 1 > [ERROR] C:\devel\Eclipse\eclipse-2025-12-conti-20251216-1\barcamp\bar\module\src\test\java\example\Example.java:3: error: package net.minidev.json does not exist > [ERROR] import net.minidev.json.JSONArray; # Suspected Reason According to the [Maven Documentation](https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html), the "Runtime" scope means that "Maven includes a dependency with this scope in the runtime and test classpaths, but not the compile classpath". This seems to work fine if it's a a single module, but java-javadoc-plugin gets its wires crossed when determining the classpath for the actual report. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
