Friday, April 27, 2012

Liferay : Target "depoly" does not exist in the project "my-greeting-portlet"

After creating a portlet, as mentioned in liferay documentation.While deploying it to tomcat, below mentioned error was seen.

Target "depoly" does not exist in the project "my-greeting-portlet"

Please see the commands below.

C:\liferay-plugins-sdk-6.0.5\portlets>create.bat my-greeting "My Greeting"
Buildfile: C:\liferay-plugins-sdk-6.0.5\portlets\build.xml

create:
    [unzip] Expanding: C:\liferay-plugins-sdk-6.0.5\portlets\portlet.zip into C:
\liferay-plugins-sdk-6.0.5\portlets\my-greeting-portlet
    [mkdir] Created dir: C:\liferay-plugins-sdk-6.0.5\portlets\my-greeting-portl
et\docroot\WEB-INF\tld
     [copy] Copying 6 files to C:\liferay-plugins-sdk-6.0.5\portlets\my-greeting
-portlet\docroot\WEB-INF\tld

BUILD SUCCESSFUL
Total time: 4 seconds

C:\liferay-plugins-sdk-6.0.5\portlets>

While deploying using ant deploy command, below mentioned error was seen.

C:\liferay-plugins-sdk-6.0.5\portlets>cd my-greeting-portlet

C:\liferay-plugins-sdk-6.0.5\portlets\my-greeting-portlet>ant deploy
Buildfile: C:\liferay-plugins-sdk-6.0.5\portlets\my-greeting-portlet\build.xml

BUILD FAILED
Target "depoly" does not exist in the project "my-greeting-portlet".

C:\liferay-plugins-sdk-6.0.5\portlets\my-greeting-portlet>

I am not sure of the above error. What I did is, I deleted the portlet and recreated the same. And this time when I tried to deploy it, it went smooth.

Please see the output.

C:\liferay-plugins-sdk-6.0.5\portlets>create.bat my-greeting "My Greeting"
Buildfile: C:\liferay-plugins-sdk-6.0.5\portlets\build.xml

create:
    [unzip] Expanding: C:\liferay-plugins-sdk-6.0.5\portlets\portlet.zip into C:
\liferay-plugins-sdk-6.0.5\portlets\my-greeting-portlet
    [mkdir] Created dir: C:\liferay-plugins-sdk-6.0.5\portlets\my-greeting-portl
et\docroot\WEB-INF\tld
     [copy] Copying 6 files to C:\liferay-plugins-sdk-6.0.5\portlets\my-greeting
-portlet\docroot\WEB-INF\tld

BUILD SUCCESSFUL
Total time: 1 second

C:\liferay-plugins-sdk-6.0.5\portlets>cd my-greeting-portlet

C:\liferay-plugins-sdk-6.0.5\portlets\my-greeting-portlet>ant deploy
Buildfile: C:\liferay-plugins-sdk-6.0.5\portlets\my-greeting-portlet\build.xml

compile:

merge:
    [mkdir] Created dir: C:\liferay-plugins-sdk-6.0.5\portlets\my-greeting-portl
et\docroot\WEB-INF\classes
    [mkdir] Created dir: C:\liferay-plugins-sdk-6.0.5\portlets\my-greeting-portl
et\docroot\WEB-INF\lib

merge:

war:
   [delete] Deleting: C:\liferay-plugins-sdk-6.0.5\dist\my-greeting-portlet-6.0.
5.1.war

clean-portal-dependencies:
      [zip] Building zip: C:\liferay-plugins-sdk-6.0.5\dist\my-greeting-portlet-
6.0.5.1.war

deploy:
     [copy] Copying 1 file to C:\liferay-portal-6.0.5\deploy

BUILD SUCCESSFUL
Total time: 2 seconds

C:\liferay-plugins-sdk-6.0.5\portlets\my-greeting-portlet>