Forum

Accueil » Liferay IDE » English

Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
toggle
Raymond Gardner
Ant build error when running from with the IDE
23 août 2011 14:59
Réponse

Raymond Gardner

Rang: Regular Member

Publications: 108

Date d'inscription: 14 juillet 2011

Publications Récentes

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 août 2011 00:26
Réponse

Gregory Amerson

LIFERAY STAFF

Rang: Liferay Master

Publications: 935

Date d'inscription: 16 février 2010

Publications Récentes

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 août 2011 12:02
Réponse

Raymond Gardner

Rang: Regular Member

Publications: 108

Date d'inscription: 14 juillet 2011

Publications Récentes

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 août 2011 00:02
Réponse

Gregory Amerson

LIFERAY STAFF

Rang: Liferay Master

Publications: 935

Date d'inscription: 16 février 2010

Publications Récentes

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 août 2011 10:16
Réponse

Raymond Gardner

Rang: Regular Member

Publications: 108

Date d'inscription: 14 juillet 2011

Publications Récentes

Sounds like you guys know best!
Mazhar Alam
RE: Ant build error when running from with the IDE
10 décembre 2012 06:03
Réponse

Mazhar Alam

Rang: Regular Member

Publications: 188

Date d'inscription: 25 novembre 2011

Publications Récentes

Helpful post