我的项目中有些字段是硬编码的。当我将maven javadoc插件添加到我的pom文件中时," maven clean install"它给出了错误:
unmappable character for encoding Cp1252
[ERROR] *?????º???? ?ª????????????????
javadoc有没有办法给出错误?
注意:我已将此添加到插件中:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<charset>UTF-8</charset>
<docencoding>UTF-8</docencoding>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
答案 0 :(得分:1)
最后我找到了解决方案:应该为javadoc插件配置添加编码。
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
</configuration>