Foren

Home » Liferay IDE » English

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Raymond Gardner
Ant build error when running from with the IDE
23. August 2011 14:59
Antwort

Raymond Gardner

Rang: Regular Member

Nachrichten: 108

Eintrittsdatum: 14. Juli 2011

Neue Beiträge

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
24. August 2011 00:26
Antwort

Gregory Amerson

LIFERAY STAFF

Rang: Liferay Master

Nachrichten: 935

Eintrittsdatum: 16. Februar 2010

Neue Beiträge

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
25. August 2011 12:02
Antwort

Raymond Gardner

Rang: Regular Member

Nachrichten: 108

Eintrittsdatum: 14. Juli 2011

Neue Beiträge

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
30. August 2011 00:02
Antwort

Gregory Amerson

LIFERAY STAFF

Rang: Liferay Master

Nachrichten: 935

Eintrittsdatum: 16. Februar 2010

Neue Beiträge

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
30. August 2011 10:16
Antwort

Raymond Gardner

Rang: Regular Member

Nachrichten: 108

Eintrittsdatum: 14. Juli 2011

Neue Beiträge

Sounds like you guys know best!
Mazhar Alam
RE: Ant build error when running from with the IDE
10. Dezember 2012 06:03
Antwort

Mazhar Alam

Rang: Regular Member

Nachrichten: 188

Eintrittsdatum: 25. November 2011

Neue Beiträge

Helpful post