Fórum

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

Mikko Torri, modificado 12 Anos atrás.

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

Junior Member Postagens: 33 Data de Entrada: 10/05/11 Postagens Recentes
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 12 Anos atrás.

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

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
Can you try to right-click your hook project and choose Liferay > SDK > Deploy and see if that works?
Mikko Torri, modificado 12 Anos atrás.

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

Junior Member Postagens: 33 Data de Entrada: 10/05/11 Postagens Recentes
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 12 Anos atrás.

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

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
Can you zip up your hook project and send it to me to take a look?
Mikko Torri, modificado 12 Anos atrás.

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

Junior Member Postagens: 33 Data de Entrada: 10/05/11 Postagens Recentes
Mikko Torri, modificado 12 Anos atrás.

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

Junior Member Postagens: 33 Data de Entrada: 10/05/11 Postagens Recentes
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 12 Anos atrás.

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

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
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 12 Anos atrás.

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

Junior Member Postagens: 33 Data de Entrada: 10/05/11 Postagens Recentes
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 7 Anos atrás.

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

New Member Postagens: 2 Data de Entrada: 24/09/14 Postagens Recentes
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".