I am building a Maven project with the maven-javadoc-plugin attached.
After updating to maven-javadoc-plugin 3.5.0, this error appears while running the jar
goal:
Execution build-javadoc-jar of goal org.apache.maven.plugins:maven-javadoc-plugin:3.5.0:jar failed:
Unable to derive module descriptor for /.../rewrite-gradle-7.38.0.jar
PluginSpec.class found in top-level directory (unnamed package not allowed in module)
I don't control that 3th party dependency. And I don't use JPMS.
Is there a way to tell the javadoc tool to ignore module naming?
Source code that reproduces the problem:
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>reproducer</groupId>
<artifactId>reproducer</artifactId>
<version>0.1</version>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>org.acme.reproducer</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.5.0</version><!-- Regression from 3.2.0 which did not have the problem-->
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-recipe-bom</artifactId>
<version>1.17.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.openrewrite</groupId>
<artifactId>rewrite-gradle</artifactId>
</dependency>
</dependencies>
</project>