users@jersey.java.net

[Jersey] about jersey 2 building

From: Tang Yong <tangyong_at_cn.fujitsu.com>
Date: Mon, 04 Feb 2013 13:05:00 +0900

Hi Team,

Today, while I was building jersey 2 on my japanese windows env, I met a
problem and the following is failed info of building.
...
INFO] jersey-core-client ................................ SUCCESS [2.281s]
[INFO] jersey-core-server ................................ FAILURE
[10:38.422s]
[INFO] jersey-containers ................................. SKIPPED
...
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
(default-compile) on project jersey-server: Compilation failure:
Compilation failure:
[ERROR]
D:\github\jersey\core-server\target\generated-sources\xjc\com\sun\research\ws\wadl\Request.java:[5,40]
エラー: この文字は、エンコーディングUTF-8にマップできません
[ERROR]
D:\github\jersey\core-server\target\generated-sources\xjc\com\sun\research\ws\wadl\Request.java:[5,42]
エラー: この文字は、エンコーディングUTF-8にマップできません
[ERROR]
D:\github\jersey\core-server\target\generated-sources\xjc\com\sun\research\ws\wadl\Grammars.java:[5,40]
エラー: この文字は、エンコーディングUTF-8にマップできません
[ERROR]
D:\github\jersey\core-server\target\generated-sources\xjc\com\sun\research\ws\wadl\Grammars.java:[5,42]
エラー: この文字は、エンコーディングUTF-8にマップできません
[ERROR]
D:\github\jersey\core-server\target\generated-sources\xjc\com\sun\research\ws\wadl\Param.java:[5,40]
エラー: この文字は、エンコーディングUTF-8にマップできません
...

After some investigation, I find a work around based on
http://java.net/jira/browse/MAVEN_JAXB2_PLUGIN-27,

firstly,

set MAVEN_OPTS=-Xmx512m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8

then,

mvn -DskipTests=true clean install

And building is ok.

Thanks
--Tang