Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mvn release:perform fails in java 8 - added javadoc plugin

I'm having trouble running release:perform with Java 8 and maven 3.0.5. I get an error when the Javadoc is generated. I have added the javadoc plugin:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <executions>
        <execution>
            <id>attach-javadocs</id>
            <goals>
                <goal>jar</goal>
            </goals>
            <configuration>
               <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
        </execution>
    </executions>
</plugin>

The strange thing is that it works fine when I run 'mvn javadoc:javadoc' or 'mvn javadoc:jar'. Does anyone have a fix for this?

I'm getting this error after everything is generated:

Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.3:jar (attach-javadocs) on project sdm: MavenReportException: Error while generating Javadoc:
[INFO] [ERROR] C:\dir...\JavaClass.java:50: error: self-closing element not allowed
[INFO] [ERROR] * <p/>
[INFO] [ERROR] ^
[INFO] [ERROR]
[INFO] [ERROR] Command line was: "C:\Program Files\Java\jdk1.8.0_60\jre\..\bin\javadoc.exe" @options @packages
[INFO] [ERROR]
[INFO] [ERROR] Refer to the generated Javadoc files in 'C:\dir.....\' dir.
like image 978
user16655 Avatar asked Dec 18 '15 11:12

user16655


1 Answers

Try disabling doc linting completely for java 8:

<profile>
    <id>disable-javadoc-doclint</id>
    <activation>
        <jdk>[1.8,)</jdk>
    </activation>
    <properties>
        <additionalparam>-Xdoclint:none</additionalparam>
    </properties>
</profile>

Found it here: https://issues.shibboleth.net/jira/browse/JPAR-73

like image 91
Klinham Avatar answered Sep 22 '22 02:09

Klinham