Fórum

Build Liferay ext plugin

Ram A, modificado 11 Anos atrás.

Build Liferay ext plugin

Junior Member Postagens: 76 Data de Entrada: 16/01/13 Postagens Recentes
Hi,

I have a ext plugin developed in my liferay application to extend the UserLocalService and LDAPImporterImpl classes.

Below is the my project Structure.

SampleLiferayApp
--customjsp
-- ext
---clients
---dist
---ext
-----sample-ext (folder structure)
------build.xml
------build-common-ext.xml
---lib
---misc
---tomcat
---tools
---webs
---build-common-plugin.xml
---build-common-plugins.xml
---build-commo.xml
---build.properties
---build.xml
--hooks
--portlets
--theme

my build.xml is given below

<project name="sample-ext" basedir="." default="deploy">
<import file="../build-common-ext.xml" />
</project>

when i tried to build using Ant it is giving the below error.

Buildfile: D:\eb071007\Sample ws\Sample ws2013\isportal\ext\ext\build.xml
[copy] Copying 1 file to D:\eb071007\eclipse_indigo\plugins\org.apache.ant_1.8.2.v20110505-1300\lib

BUILD FAILED
D:\eb071007\Sample ws\Sample ws2013\SampleLiferayApp\ext\ext\build.xml:6: The following error occurred while executing this line:
D:\eb071007\Sample ws\Sample ws2013\SampleLiferayAppext\build-common-plugins.xml:4: The following error occurred while executing this line:
D:\eb071007\Sample ws\Sample ws2013\SampleLiferayApp\ext\build-common.xml:72: .

Task cannot continue because ECJ is not installed.

ECJ was automatically installed. Please rerun your task.

Total time: 2 seconds


Below is my build-common.xml.
60.<whichresource resource="/org/eclipse/jdt/core/JDTCompilerAdapter.class" property="ecj.compiler" />
61.
62. <if>
<and>
<equals arg1="${javac.compiler}" arg2="org.eclipse.jdt.core.JDTCompilerAdapter" />
65. <not>
66. <isset property="ecj.compiler" />
</not>
68. </and>
69. <then>
70. <copy file="${project.dir}/lib/ecj.jar" todir="${ant.home}/lib" />
71.
72. <fail>
.

75. Task cannot continue because ECJ is not installed.

77. ECJ was automatically installed. Please rerun your task.
78. </fail>
79. </then>
80. </if>



Please help me to solve this issue and how to build liferay ext plugin.

Thanks in advance
Ram A
thumbnail
David H Nebinger, modificado 11 Anos atrás.

RE: Build Liferay ext plugin

Liferay Legend Postagens: 14915 Data de Entrada: 02/09/06 Postagens Recentes
try doing a google search before posting. This has been covered many times on the forum and there is an answer in the wiki.

I know people hate the RTFM response, but honestly I can't get anything done answering the same questions ever day because people haven't even tried a minimum of research on their own...
thumbnail
Rudolf Pischek, modificado 10 Anos atrás.

RE: Build Liferay ext plugin

New Member Postagens: 2 Data de Entrada: 05/12/13 Postagens Recentes
David H Nebinger:
try doing a google search before posting. This has been covered many times on the forum and there is an answer in the wiki.

I know people hate the RTFM response, but honestly I can't get anything done answering the same questions ever day because people haven't even tried a minimum of research on their own...


Unfortunately the RTFM (https://www.liferay.com/community/wiki/-/wiki/Main/ECJ) doesn't respect Windows development (if you're not full administrator of Windows). The Eclipse (or other RAD tools with Ant) can be installed into Program Files folder (or any other restricted directory). And because Liferay Ant scripts wanted ecj.jar into restricted folder then copy fails. If you manually copy file ecj.jar into restricted directory than you can see the same message:

"Task cannot continue because ECJ is not installed.
ECJ was automatically installed. Please rerun your task."

but rerun has no effect!

The solution is in the thread: https://www.liferay.com/community/forums/-/message_boards/message/12920370
thumbnail
David H Nebinger, modificado 10 Anos atrás.

RE: Build Liferay ext plugin

Liferay Legend Postagens: 14915 Data de Entrada: 02/09/06 Postagens Recentes
Rudolf Pischek:
Unfortunately the RTFM (https://www.liferay.com/community/wiki/-/wiki/Main/ECJ) doesn't respect Windows development (if you're not full administrator of Windows). The Eclipse (or other RAD tools with Ant) can be installed into Program Files folder (or any other restricted directory). And because Liferay Ant scripts wanted ecj.jar into restricted folder then copy fails.


Nor does it respect unix development if your system admin has locked down the /usr, /opt, ... directories blocking you from putting the jar into the system directory...

Seriously, if you have a locked down corporate environment then of course it is up to you to convince your system admins that you need a particular file dropped into a specific directory and why.

It is hardly the responsibility of a generic Wiki page to go through every possible deployment scenario and work out all of the details. End of the day, it has the answer (install the ecj jar in the appropriate spot). If you have to jump through some hoops to do that, it's your responsibility.