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

来源:互联网 发布:怎么做自己的淘宝客app 编辑:程序博客网 时间:2024/05/16 12:58

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
  1. <concat destfile='${build}/oryx.debug.js'>...</concat>  

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

[html] view plaincopy
  1. <property name="charset" value="utf-8"/>  
[html] view plaincopy
  1. <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
  1. <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


原创粉丝点击