Foros de discusión

Bug? New Liferay Project from IDE does not work (unable to build)

Mikko Torri, modificado hace 12 años.

Bug? New Liferay Project from IDE does not work (unable to build)

Junior Member Mensajes: 33 Fecha de incorporación: 10/05/11 Mensajes recientes
When I create a new project from Eclipse (Indigo, IDE 1.5) it fails to build.

I've created a hook with portlet directly from the IDE, when I drag the build.xml to ant window it says: "Default target deploy does not exist in this project"

Deploy gives this:
Buildfile: D:\liferay-6.1\liferay-plugins-sdk-6.1.0-ce-ga1\hooks\sample-hook\build.xml

BUILD FAILED
D:\liferay-6.1\liferay-plugins-sdk-6.1.0-ce-ga1\hooks\sample-hook\build.xml:5: Cannot find D:\liferay-6.1\liferay-plugins-sdk-6.1.0-ce-ga1\hooks\build-common-portlet.xml imported from D:\liferay-6.1\liferay-plugins-sdk-6.1.0-ce-ga1\hooks\sample-hook\build.xml

Total time: 244 milliseconds

It says the same when run from command line.

Steps to reproduce:
1) Create New Liferay Project in Eclipse
2) Create a Hook
3) Check Advanced settings>Liferay Plugin>Portlet plugin as
4) Try to deploy

Mikko
thumbnail
Gregory Amerson, modificado hace 12 años.

RE: Bug? New Liferay Project from IDE does not work (unable to build)

Liferay Legend Mensajes: 1123 Fecha de incorporación: 16/02/10 Mensajes recientes
Can you try to right-click your hook project and choose Liferay > SDK > Deploy and see if that works?
Mikko Torri, modificado hace 12 años.

RE: Bug? New Liferay Project from IDE does not work (unable to build)

Junior Member Mensajes: 33 Fecha de incorporación: 10/05/11 Mensajes recientes
Gregory Amerson:
Can you try to right-click your hook project and choose Liferay > SDK > Deploy and see if that works?


It doesn't work either:
Buildfile: D:\liferay-6.1\liferay-plugins-sdk-6.1.0-ce-ga1\hooks\sample-hook\build.xml

BUILD FAILED
D:\liferay-6.1\liferay-plugins-sdk-6.1.0-ce-ga1\hooks\sample-hook\build.xml:5: Cannot find D:\liferay-6.1\liferay-plugins-sdk-6.1.0-ce-ga1\hooks\build-common-portlet.xml imported from D:\liferay-6.1\liferay-plugins-sdk-6.1.0-ce-ga1\hooks\sample-hook\build.xml

Total time: 390 milliseconds

Here is the cause of it, build.xml:
<?xml version="1.0"?>
<!DOCTYPE project>

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

So selecting portlet from the plugins causes the build.xml to be overwritten with portlet's build.xml. Of course there is no build-common-portlet.xml in the hooks folder of the sdk.

Mikko
thumbnail
Gregory Amerson, modificado hace 12 años.

RE: Bug? New Liferay Project from IDE does not work (unable to build)

Liferay Legend Mensajes: 1123 Fecha de incorporación: 16/02/10 Mensajes recientes
Can you zip up your hook project and send it to me to take a look?
Mikko Torri, modificado hace 12 años.

RE: Bug? New Liferay Project from IDE does not work (unable to build)

Junior Member Mensajes: 33 Fecha de incorporación: 10/05/11 Mensajes recientes
Mikko Torri, modificado hace 12 años.

RE: Bug? New Liferay Project from IDE does not work (unable to build)

Junior Member Mensajes: 33 Fecha de incorporación: 10/05/11 Mensajes recientes
And as a follow up, if creating a plugin which would consist of hook and portlet functionalities, which plugin project should be taken as a base? Hook or Portlet?
thumbnail
Gregory Amerson, modificado hace 12 años.

RE: Bug? New Liferay Project from IDE does not work (unable to build)

Liferay Legend Mensajes: 1123 Fecha de incorporación: 16/02/10 Mensajes recientes
A portlet can contain hook functionality but not the other way around. However, if you deploy a hook.xml file in a portlet with the current 6.1.0 GA using the IDE it will create invokerFilter stackOverflow. so you will need to use the "SDK > Deploy" command to deploy instead of the "run on server" or the "add/remove modules" action in the IDE until 6.1.0 GA2 is released.
Mikko Torri, modificado hace 12 años.

RE: Bug? New Liferay Project from IDE does not work (unable to build)

Junior Member Mensajes: 33 Fecha de incorporación: 10/05/11 Mensajes recientes
Thanks for a quick answer. Then the original Bug is kind of invalid, since I created a hook with portlet functionalities in it.

One could argue though that that kind of configuration should not be possible through the IDE.
Nagalinga Pattar, modificado hace 7 años.

RE: Bug? New Liferay Project from IDE does not work (unable to build)

New Member Mensajes: 2 Fecha de incorporación: 24/09/14 Mensajes recientes
One of the following mistake:

1. The portlet one that you want to import should be placed under "portlets of Liferay-plugins-sdk".

2. build-common-portlet might have been missed in the "portlets of Liferay-plugins-sdk".