Foros

Inicio » Liferay IDE » English

Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Raymond Gardner
Ant build error when running from with the IDE
23 de agosto de 2011 14:59
Respuesta

Raymond Gardner

Ranking: Regular Member

Mensajes: 106

Fecha de incorporación: 14 de julio de 2011

Mensajes recientes

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 de agosto de 2011 0:26
Respuesta

Gregory Amerson

LIFERAY STAFF

Ranking: Liferay Master

Mensajes: 915

Fecha de incorporación: 16 de febrero de 2010

Mensajes recientes

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 de agosto de 2011 12:02
Respuesta

Raymond Gardner

Ranking: Regular Member

Mensajes: 106

Fecha de incorporación: 14 de julio de 2011

Mensajes recientes

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 de agosto de 2011 0:02
Respuesta

Gregory Amerson

LIFERAY STAFF

Ranking: Liferay Master

Mensajes: 915

Fecha de incorporación: 16 de febrero de 2010

Mensajes recientes

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 de agosto de 2011 10:16
Respuesta

Raymond Gardner

Ranking: Regular Member

Mensajes: 106

Fecha de incorporación: 14 de julio de 2011

Mensajes recientes

Sounds like you guys know best!
Mazhar Alam
RE: Ant build error when running from with the IDE
10 de diciembre de 2012 6:03
Respuesta

Mazhar Alam

Ranking: Regular Member

Mensajes: 188

Fecha de incorporación: 25 de noviembre de 2011

Mensajes recientes

Helpful post