Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Liferay ant deploy failure

I have been having trouble deploying liferay portlets and themes from the command line with ant deploy;

sample execution:

pwd: C:\liferay-plugins-sdk\themes

create.bat deep-blue "Deep Blue"

cd deep-blue-theme

ant deploy

-> Buildfile: C:\liferay-plugins-sdk\themes\deep-blue-theme\build.xml

-> compile:

-> BUILD FAILED

-> C:\liferay-plugins-stk\themes\build-common-theme.xml:172: C:\liferay-plugins-sdk\themes\deep-blue-theme\liferay-portal-6.0.6 omcat-6.0.29webappsROOT\html\themes_unstyled does not exist.

the problem appears to be with the bold section and how the path is obviously incorrect; where is this directory being set?

edit:

the problem was my app.server.dir in build.{username}.properties

like image 340
COner Avatar asked Dec 13 '22 12:12

COner


2 Answers

The error is a result of the ant build not being able to find a Liferay installation (which contains items needed by the SDK).

By default, the build properties in the SDK are set up on the assumption that your setup looks like this:

- Your Development Directory
  - bundles
    - data
    - deploy
    - license
    - tomcat-6.0.29
  - liferay-plugins-sdk

Where bundles contains a Liferay bundle distribution, including the bundled Tomcat server.

You can see this setup in the build.properties file at the root level of your SDK.

#
# Specify the paths to an unzipped Tomcat bundle.
#
app.server.type=tomcat
app.server.dir=${project.dir}/../bundles/tomcat-6.0.29
app.server.deploy.dir=${app.server.dir}/webapps
app.server.lib.global.dir=${app.server.dir}/lib/ext
app.server.portal.dir=${app.server.dir}/webapps/ROOT

The recommended way to change this is not to edit this section of build.properties, but to create overriding entries in a new file, called build.username.properties. (where username is your user name on your computer account).

like image 178
npskirk Avatar answered Dec 21 '22 22:12

npskirk


As you say in the comment to kirkz's answer, you have already set your build.connor.properties: You obviously have used backslash in there. Here \t is short for the tab character. This explains what you see: ...liferay-portal-6.0.6 omcat... (there's a tab between 6.0.6 and omcat)

Do only use forward-slash in properties files (when you refer to file names, no matter if you're on windows or on any other platforms)

like image 22
Olaf Kock Avatar answered Dec 21 '22 23:12

Olaf Kock