You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Alex Orlov <oo...@mail.ru.INVALID> on 2021/06/04 03:41:50 UTC

Maven-javadoc-plugin for JPMS modules when module name is different from artifactId

Hi all,
 
I have a sample  project with two jpms modules. It is a maven project with one parent and two child modules.
A parent pom:
...
<modules>
    <module>foo.api</module>
    <module>foo.impl</module>
</modules>
...
API module pom:
...
<groupId>com.foo</groupId>
<artifactId>foo.api</artifactId>
...
API module-info:
module com.foo.api {
    requires org.slf4j;
    exports com.foo.api;
}
These are my settings for maven-javadoc-plugin (in parent pom):
   <reporting>
         <excludeDefaults>true</excludeDefaults>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.3.0</version>
                <reportSets>
                  <reportSet>
                    <reports>
                      <report>javadoc-no-fork</report>
                      <report>test-javadoc-no-fork</report>
                    </reports>
                  </reportSet>
                </reportSets>
                <configuration>
                    <doclint>none</doclint>
                    <dependencySourceIncludes>
                       <dependencySourceInclude>com.foo:${project.artifactId}</dependencySourceInclude>
                    </dependencySourceIncludes>
                    <doctitle>Title - ${project.version}</doctitle>
                    <includeDependencySources>false</includeDependencySources>
                    <windowtitle>Title</windowtitle>
                    <additionalJOptions>
                        <additionalJOption>--no-module-directories</additionalJOption>
                    </additionalJOptions>
                </configuration>
              </plugin>
        </plugins>
    </reporting>
And when I run  mvn javadoc:javadoc I get:
Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:javadoc (default-cli) on project foo.api: An error has occurred in Javadoc report generation: 
Exit code: 1 - error: module not found: com.foo.api
Could anyone say how to fix it?
 
The question is also on SO -  https://stackoverflow.com/questions/67820612/javadoc-for-jpms-modules-when-module-name-is-different-from-artifactid
 
Best regards,

Re[2]: Maven-javadoc-plugin for JPMS modules when module name is different from artifactId

Posted by Alex Orlov <oo...@mail.ru.INVALID>.
Yes,  'mvn compile javadoc:javadoc' helped. Thank you very much.
 
 
--
Best regards, Alex Orlov
 
  
>Воскресенье, 6 июня 2021, 1:20 +03:00 от Robert Scholte <rf...@apache.org>:
> 
>In case of modules, javadoc requires a compiles module descriptor, so try 'mvn compile javadoc:javadoc'
>
>Robert
>On 4-6-2021 05:42:11, Alex Orlov < ooo_saturn7@mail.ru.invalid > wrote:
>
>Hi all,
>
>I have a sample project with two jpms modules. It is a maven project with one parent and two child modules.
>A parent pom:
>...
>
>foo.api
>foo.impl
>
>...
>API module pom:
>...
>com.foo
>foo.api
>...
>API module-info:
>module com.foo.api {
>requires org.slf4j;
>exports com.foo.api;
>}
>These are my settings for maven-javadoc-plugin (in parent pom):
>
>true
>
>
>org.apache.maven.plugins
>maven-javadoc-plugin
>3.3.0
>
>
>
>javadoc-no-fork
>test-javadoc-no-fork
>
>
>
>
>none
>
>com.foo:${project.artifactId}
>
>Title - ${project.version}
>false
>Title
>
>--no-module-directories
>
>
>
>
>
>And when I run mvn javadoc:javadoc I get:
>Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:javadoc (default-cli) on project foo.api: An error has occurred in Javadoc report generation:
>Exit code: 1 - error: module not found: com.foo.api
>Could anyone say how to fix it?
>
>The question is also on SO -  https://stackoverflow.com/questions/67820612/javadoc-for-jpms-modules-when-module-name-is-different-from-artifactid
>
>Best regards,
 

Re: Maven-javadoc-plugin for JPMS modules when module name is different from artifactId

Posted by Robert Scholte <rf...@apache.org>.
In case of modules, javadoc requires a compiles module descriptor, so try 'mvn compile javadoc:javadoc'

Robert
On 4-6-2021 05:42:11, Alex Orlov <oo...@mail.ru.invalid> wrote:

Hi all,

I have a sample project with two jpms modules. It is a maven project with one parent and two child modules.
A parent pom:
...

foo.api
foo.impl

...
API module pom:
...
com.foo
foo.api
...
API module-info:
module com.foo.api {
requires org.slf4j;
exports com.foo.api;
}
These are my settings for maven-javadoc-plugin (in parent pom):

true


org.apache.maven.plugins
maven-javadoc-plugin
3.3.0



javadoc-no-fork
test-javadoc-no-fork




none

com.foo:${project.artifactId}

Title - ${project.version}
false
Title

--no-module-directories





And when I run mvn javadoc:javadoc I get:
Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:javadoc (default-cli) on project foo.api: An error has occurred in Javadoc report generation:
Exit code: 1 - error: module not found: com.foo.api
Could anyone say how to fix it?

The question is also on SO - https://stackoverflow.com/questions/67820612/javadoc-for-jpms-modules-when-module-name-is-different-from-artifactid

Best regards,