Oracle javadoc链接无法与适用于java 11的maven javadoc插件一起使用

z9smfwbn  于 2022-12-11  发布在  Maven
关注(0)|答案(1)|浏览(157)

使用带有config的maven插件生成的javadoc

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>3.4.1</version>
    <configuration>
        <source>11</source>
        <show>private</show>
        <nohelp>false</nohelp>
        <destDir>javadocs</destDir>
        <attach>true</attach>
        <includeDependencySources>false</includeDependencySources>
        <additionalJOption>--no-module-directories</additionalJOption>
    </configuration>
</plugin>

但是对于jdk 11 javadoc,它重定向到https://docs.oracle.com/en/java/javase/11/docs/api/java/lang/String.html?is-external=true
理想情况下,它应该重定向到https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true

ijnw1ujt

ijnw1ujt1#

javaApiLinks修复了它

<configuration>
    <javaApiLinks>
        <property>
            <name>api_11</name>
            <value>https://docs.oracle.com/en/java/javase/11/docs/api/java.base/</value>
        </property>
    </javaApiLinks>
</configuration>

相关问题