最近搞了下signavio-core-components項目,網址是http://code.google.com/p/signavio-core-components
執行ant build-all-in-one-war或者ant build-and-deploy-all-in-one-war-to-tomcat
BUILD FAILED
D:\signavio\build.xml:64: The following error occurred while executing this line
D:\signavio\editor\build.xml:118: Java returned: 2
研究了一下是因為編碼問題,ant檔案調用了editor/build.xml。其中有
<concat destfile='${build}/oryx.debug.js'>...</concat>
這個命令是合并檔案,但是源檔案中的scripts/Core/SVG/label.js是utf-8格式的,而其他是ansi格式的,這個utf-8檔案轉成ansi會出現亂碼。因此修改為
<property name="charset" value="utf-8"/>
<concat destfile='${build}/oryx.debug.js' encoding="${charset}" outputencoding="${charset}">
這樣合并後的檔案沒有問題,但是YUICompressor壓縮還是有問題,到官網下載最新的2.4.7,放到lib目錄,將其中的yuicompressor-2.4.2.jar修改為yuicompressor-2.4.7.jar
<java dir="${build}" jar="${root}/lib/yuicompressor-2.4.7.jar" fork="true" failonerror="true" output='${compress.temp}'>
解決辦法同樣PO在了項目issue中,參見
http://code.google.com/p/signavio-core-components/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&groupby=&sort=&id=29