Liferay Ant deploy target issue (Task cannot continue because ECJ is not installed)
Buildfile: opt\6.2.0 GA1\plugins\portlets\sample-portlet\build.xml
BUILD FAILED
opt\6.2.0 GA1\plugins\portlets\sample-portlet\build.xml:5: The following error occurred while executing this line:
opt\6.2.0 GA1\plugins\portlets\build-common-portlet.xml:5: The following error occurred while executing this line:
opt\6.2.0 GA1\plugins\build-common-plugin.xml:5: The following error occurred while executing this line:
opt\6.2.0 GA1\plugins\build-common.xml:96: .
Task cannot continue because ECJ is not installed.
ECJ was automatically installed. Please rerun your task.
Total time: 552 milliseconds
This Issue we can overcome using below 2 solution
Solution 1:
Step 1: Click Window menu in Eclipse IDE –> Select Preferences
Step 2: Select the Ant in left hand side menu –> click Runtime.
Step 3: Select Global Entries and click Add External JARs.
Step 4: Navigate to
%LIFERAY-HOME%/tomcat-xxx/lib –> select ecj-xxx.jar
OR
%PLUGIN-SDK_HOME%/lib –> select ecj.jar
and click OK.
Solution 2:
Add the below code in “build.username.properties” in plugin sdk
Property available in build.properties
javac.compiler=modern
# javac.compiler=org.eclipse.jdt.core.JDTCompilerAdapter