You must have come across the error “Task cannot continue because ECJ is not installed. ECJ was automatically installed. Please rerun your task. Total time: 6 second”while ant running the build.xml file in liferay.
To solve this error follow the below steps:
Where you can see an option named “Ant”. Under the Ant option select runtime, so you will see the above showed Runtime tab.
Select the Global Entries section, now on the right hand side click on the Add External Jar. Select the ecj.jar file kept in your computer.
You can find the ecj.jar in the liferay sdk/lib folder. And that’s it. Now build your project again. You will see a BUILD SUCCESSFFULL message.