论坛

主页 » Liferay IDE » English

组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Raymond Gardner
Ant build error when running from with the IDE
2011年8月23日 下午2:59
答复

Raymond Gardner

等级: Regular Member

帖子: 116

加入日期: 2011年7月14日

最近的帖子

Hello,

I am trying to run the build.xml file from within my Liferay Developer Studio EE 6.0 IDE. Actually, I added a few targets to the build.xml generated during project creation. I want to have a few custom targets for our build/deploy process and I decided to use the one given, since it is already there.

The build.xml works when I run it from the command-line. I had to set ANT_HOME to the IDE's Ant plugin folder.
But, when I run it within the IDE it fails:
Buildfile: C:\Sandbox\Liferay\eVolve-sdk\portlets\eVolve-plugin-portlet\build.xml

BUILD FAILED
C:\Sandbox\Liferay\eVolve-sdk\portlets\eVolve-plugin-portlet\build.xml:4: The following error occurred while executing this line:
C:\Sandbox\Liferay\eVolve-sdk\portlets\build-common-portlet.xml:6: The following error occurred while executing this line:
C:\Sandbox\Liferay\eVolve-sdk\build-common-plugin.xml:4: The following error occurred while executing this line:
C:\Sandbox\Liferay\eVolve-sdk\build-common.xml:72: .

Task cannot continue because ECJ is not installed.

ECJ was automatically installed. Please rerun your task.

Total time: 310 milliseconds


I run it again but I get the same error. Looking at build-common.xml line 72, it is trying to copy the ecj.jar file from project lib to ant home lib.
But, the ecj.jar file exists under ant home. I also find it in the sdk lib.
Gregory Amerson
RE: Ant build error when running from with the IDE
2011年8月24日 上午12:26
答复

Gregory Amerson

LIFERAY STAFF

等级: Liferay Legend

帖子: 1041

加入日期: 2010年2月16日

最近的帖子

You can fix this problem by adding the ECJ.jar to the global ant runtime path.
1Window > Preferences > Ant > Runtime > Global entries > Add jar
2Point to the ecj.jar that is in the SDK_dir/lib/ecj.jar location.
Raymond Gardner
RE: Ant build error when running from with the IDE
2011年8月25日 下午12:02
答复

Raymond Gardner

等级: Regular Member

帖子: 116

加入日期: 2011年7月14日

最近的帖子

Thanks! That did the trick.

I'd like to see the IDE/Studio be able to run these ant build files provided by the SDK without having to make this Eclipse Preferences change.
Not sure what would be the best way to do that, however.
Gregory Amerson
RE: Ant build error when running from with the IDE
2011年8月30日 上午12:02
答复

Gregory Amerson

LIFERAY STAFF

等级: Liferay Legend

帖子: 1041

加入日期: 2010年2月16日

最近的帖子

Actually we have been discussing this issue internally. The problem is rather complex one as it turns out. You can see more detail here:

http://issues.liferay.com/browse/IDE-411


So as you can see in the Ticket our solution is going to be put context menu actions/commands so that you can invoke any SDK command that you would need using a Liferay IDE action. This way we can be sure that the ECJ.jar classpath issue doesn't crop up but also we can prevent adding a global ECJ entry that could harm other project ant operating environment.
Raymond Gardner
RE: Ant build error when running from with the IDE
2011年8月30日 上午10:16
答复

Raymond Gardner

等级: Regular Member

帖子: 116

加入日期: 2011年7月14日

最近的帖子

Sounds like you guys know best!
Mazhar Alam
RE: Ant build error when running from with the IDE
2012年12月10日 上午6:03
答复

Mazhar Alam

等级: Regular Member

帖子: 201

加入日期: 2011年11月25日

最近的帖子

Helpful post