Foros de discusión

Can't run Ant on ext environment from within Eclipse

thumbnail
Joel Kozikowski, modificado hace 16 años.

Can't run Ant on ext environment from within Eclipse

Expert Mensajes: 405 Fecha de incorporación: 28/06/06 Mensajes recientes
Got another one:

Just tried to build my extension environment from within Eclipse. I ran the "clean" target, and got the message:

Task cannot continue because ECJ is not installed.

ECJ was automatically installed. Please rerun your task.


Of course, I re-ran the task again, and got the same message (Eclipse 3.2).

I went out to command line, and was able to execute the clean target. I'm not yet able to execute the "deploy" target due to build errors (looks like some changes to the API that broke my code, so I'm working on that next.

ECJ == what?

Eclipse Compiler for Java?
thumbnail
Alexander Chow, modificado hace 16 años.

RE: Can't run Ant on ext environment from within Eclipse

Liferay Master Mensajes: 518 Fecha de incorporación: 20/07/05 Mensajes recientes
Good guess. Yah, Jikes development has died down and ECJ (Eclipse's compiler) is becoming a popular alternative to javac that produces optimized bytecode that is fully JDK 1.5 compliant (unlike Jikes 1.22). See http://support.liferay.com/browse/LEP-4273 and http://download.eclipse.org/eclipse/downloads/drops/R-3.3.1.1-200710231652/index.php#JDTCORE.
thumbnail
Neil Griffin, modificado hace 16 años.

RE: Can't run Ant on ext environment from within Eclipse

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
Joel, the Eclipse ejc.jar file needs to be copied into your $ANT_HOME/lib folder in order to use EJC with an external Ant distribution.
thumbnail
Michael Young, modificado hace 16 años.

RE: Can't run Ant on ext environment from within Eclipse

Liferay Master Mensajes: 846 Fecha de incorporación: 5/08/04 Mensajes recientes
Looks like we made the default "modern" for the source code but forgot to update that in the ext build files.
thumbnail
Michael Young, modificado hace 16 años.

RE: Can't run Ant on ext environment from within Eclipse

Liferay Master Mensajes: 846 Fecha de incorporación: 5/08/04 Mensajes recientes
To fix this in eclipse, however, you need to edit the eclipse ant runtime preferences and add the ecj.jar file to the classpath (it should have been copied to your $ANT_HOME/lib directory.
thumbnail
Joel Kozikowski, modificado hace 16 años.

RE: Can't run Ant on ext environment from within Eclipse

Expert Mensajes: 405 Fecha de incorporación: 28/06/06 Mensajes recientes
Similar problem occurred, and I goofed and started another thread rather than appending it here. This post is for the cross reference in case others have this problem.
thumbnail
Borxa Varela Bouzas, modificado hace 13 años.

RE: Can't run Ant on ext environment from within Eclipse

Junior Member Mensajes: 69 Fecha de incorporación: 26/12/06 Mensajes recientes
Joel Kozikowski:
Got another one:

Just tried to build my extension environment from within Eclipse. I ran the "clean" target, and got the message:

Task cannot continue because ECJ is not installed.

ECJ was automatically installed. Please rerun your task.


Of course, I re-ran the task again, and got the same message (Eclipse 3.2).


Are you using JRE from Eclipse core?

For check this, you need to select the build.xml context menu "Run As -> External Tools Configuration" and go to the JRE tab, there check "Run in the same JRE as the workspace".
thumbnail
Kushal Jayswal, modificado hace 9 años.

RE: Can't run Ant on ext environment from within Eclipse

New Member Mensajes: 18 Fecha de incorporación: 19/11/12 Mensajes recientes
Hi Joel,

I was facing the same issue. Below are some steps to fix up the life emoticon.

1. In Eclipse, Go To Window->Preferences->Ant->Runtime
2. Select Ant Home Entries (Default)
3. Add External JAR... ecj.jar. (Available in the lib folder of the Liferay Plugins SDK)