好吧,我百思不得其解, 我得到使用行家編譯編碼拼圖
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<properties>
這裏是下面的編譯錯誤
.../Currency.java:[16,60] unmappable character for encoding ASCII
我已經在Maven的conf設置設置編碼編譯輸出
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting directory /export/jenkins_slave/workspace/Agent-Transfer/repo/foo-bar- api/target
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 10 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 59 source files to /export/jenkins_slave/workspace/Agent- Transfer/repo/foo-bar-api/target/classes
[JENKINS] Archiving /export/jenkins_slave/workspace/Agent-Transfer/repo/foo-bar- api/pom.xml to /export/ciserver/.hudson/jobs/Agent-Transfer/modules/com.cdc$foo-bar- api/builds/2012-03-31_14-49-02/archive/com.cdc/foo-bar-api/Agent-Transfer-SNAPSHOT/foo-bar- api-Agent-Transfer-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
/export/jenkins_slave/workspace/Agent-Transfer/repo/foo-bar-api/src/main/java/com/cdc/games/domain/Currency.java:[16,60] unmappable character for encoding ASCII
我知道編碼是從settings.xml中拾取的beca使用如果我刪除它得到編碼警告
[WARNING] Using platform encoding (ISO8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
的問題是似乎只有 - 從上面出來把日誌 - 會對資源產生影響:資源和編譯沒有:編譯。我期待從the wiki這個描述編碼的.java文件
正如你可以看到我建立這個奴隸,在它建立的主人甚至與編碼警告,但我想這是因爲平臺編碼是不同的。我可以改變對奴隸,但我寧願不是因爲我想構建是便攜式
有一些字符串中的字符不是ascii,但我期待maven編譯插件上的UTF-8設置能夠處理它 – cdog 2012-03-31 22:17:54