3

My project has several modules and it is written in Java 8, I am using jdk 11 to build. When I try to generate JavaDocs by using mvn javadoc:aggregate I fail with this error:

> Failed to execute goal
> org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:aggregate
> (default-cli) on project xyz: An error has occurred in Javadoc
> report generation: Unable to write 'options' temporary file for
> command execution

I have in my pom.xml added plugin in section configured like below:

 <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-javadoc-plugin</artifactId>
      <version>3.2.0</version>
      <configuration>
        <docencoding>UTF-8</docencoding>
        <splitindex>true</splitindex>
        <javadocExecutable>${JAVA_HOME}/bin/javadoc</javadocExecutable>
        <bootclasspath></bootclasspath>
        <reportOutputDirectory>${project.reporting.outputDirectory}/../../javadocs</reportOutputDirectory>
        <groups>
          <group>
            <title>web</title>
            <packages>com.xyz.a.b.*</packages>
          </group>
          <group>
            <title>logic</title>
            <packages>com.xyz.a.c.*</packages>
          </group>
          <group>
            <title>rest</title>
            <packages>com.xyz.a.d.*</packages>
          </group>
        </groups>
      </configuration>
      <executions>
        <execution>
          <id>javadoc</id>
          <goals>
            <goal>javadoc-no-fork</goal>
            <goal>jar</goal>
          </goals>
          <phase>process-resources</phase>
        </execution>
        <execution>
          <id>aggregate</id>
          <goals>
            <goal>aggregate</goal>
          </goals>
          <phase>site</phase>
          <configuration>
          </configuration>
        </execution>
      </executions>
    </plugin>
  </plugins>

and additional, in the same pom.xml

  <reporting>
<plugins>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>3.2.0</version>
    <reportSets>
      <reportSet>
        <id>aggregate</id>
        <configuration>
          <doclint>none</doclint>
        </configuration>
        <inherited>false</inherited>
        <reports>
          <report>aggregate</report>
        </reports>
      </reportSet>
      <reportSet>
        <id>default</id>
        <reports>
          <report>javadoc</report>
        </reports>
      </reportSet>
    </reportSets>
  </plugin>
</plugins>

There is no problem with permissions to directory ${project.reporting.outputDirectory}/../../javadocs as I checked that. Could you please help me to solve this problem? Have you any idea what I can check to detect the problem cause?

rbednarska
  • 129
  • 1
  • 2
  • 13

0 Answers0