如何为波斯字符的某些代码生成javadoc?

时间:2017-06-14 07:13:54

标签: maven intellij-idea javadoc maven-javadoc-plugin

我的项目中有些字段是硬编码的。当我将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>

1 个答案:

答案 0 :(得分:1)

最后我找到了解决方案:应该为javadoc插件配置添加编码。

    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <configuration>
        <encoding>UTF-8</encoding>
    </configuration>