[英]JavaDoc can't add custom stylesheet from src/main/resources
While executing mvn javadoc:javadoc
i get this error: 在执行
mvn javadoc:javadoc
此错误:
An error has occurred in JavaDocs report generation: Option <stylesheet/> supports only "maven" or "java" value. -> [Help 1]"
But i read here http://maven.apache.org/plugins/maven-javadoc-plugin/examples/stylesheet-configuration.html that <stylesheetfile/> could be a resource in your project directory, ie src/main/java, src/main/resources or src/main/javadoc
但我在这里阅读了http://maven.apache.org/plugins/maven-javadoc-plugin/examples/stylesheet-configuration.html,<stylesheetfile
<stylesheetfile/> could be a resource in your project directory, ie src/main/java, src/main/resources or src/main/javadoc
so why i can not have in my pom: 所以为什么我不能在pom中使用:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<stylesheet>src/main/resources/example.css</stylesheet>
</configuration>
</plugin>
? ?
If you like to configure a file which should be used you have to use the following configuration: 如果要配置应使用的文件,则必须使用以下配置:
<project>
...
<reporting> (or <build>)
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<stylesheetfile>${basedir}/path/to/your/stylesheetfile.css</stylesheetfile>
...
</configuration>
</plugin>
</plugins>
...
</reporting> (or </build>)
...
</project>
我的错字不是<stylesheet>
而是应该使用<stylesheetfile>
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.