您的位置:首页 > 产品设计 > UI/UE

signavio\editor\build.xml:118: Java returned: 2 编译错误

2012-08-26 14:40 369 查看
BMPN文件在线编辑器

项目svn地址:http://code.google.com/p/signavio-core-components/source/checkout

最近搞的signavio项目,就是BPMN的在线编辑软件,从一个商业版本的软件商拆分下来贡献给activiti使用。网址是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

E:\newworkspace\signavio\build.xml:64: The following error occur

ing this line:

E:\newworkspace\signavio\editor\build.xml:118: Java returned: 2

研究了一下是因为编码问题,ant文件调用了editor/build.xml。其中有

[html]
view plaincopy

<concat destfile='${build}/oryx.debug.js'>...</concat>  

这个命令是合并文件,但是源文件中的scripts/Core/SVG/label.js是utf-8格式的,而其他是ansi格式的,这个utf-8文件转成ansi会出现乱码。因此修改为

[html]
view plaincopy

<property name="charset" value="utf-8"/>  

[html]
view plaincopy

<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

[html]
view plaincopy

<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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  java html build ant encoding
相关文章推荐