Foren

Can't run Ant on ext environment from within Eclipse

thumbnail
Joel Kozikowski, geändert vor 16 Jahren.

Can't run Ant on ext environment from within Eclipse

Expert Beiträge: 405 Beitrittsdatum: 28.06.06 Neueste Beiträge
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, geändert vor 16 Jahren.

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

Liferay Master Beiträge: 518 Beitrittsdatum: 20.07.05 Neueste Beiträge
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, geändert vor 16 Jahren.

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

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
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, geändert vor 16 Jahren.

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

Liferay Master Beiträge: 846 Beitrittsdatum: 05.08.04 Neueste Beiträge
Looks like we made the default "modern" for the source code but forgot to update that in the ext build files.
thumbnail
Michael Young, geändert vor 16 Jahren.

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

Liferay Master Beiträge: 846 Beitrittsdatum: 05.08.04 Neueste Beiträge
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, geändert vor 16 Jahren.

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

Expert Beiträge: 405 Beitrittsdatum: 28.06.06 Neueste Beiträge
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, geändert vor 13 Jahren.

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

Junior Member Beiträge: 69 Beitrittsdatum: 26.12.06 Neueste Beiträge
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, geändert vor 9 Jahren.

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

New Member Beiträge: 18 Beitrittsdatum: 19.11.12 Neueste Beiträge
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)