COn*_*ner 3 ant liferay liferay-6
我在使用ant deploy从命令行部署liferay portlet和主题时遇到了麻烦;
样本执行:
pwd:C:\ liferay-plugins-sdk\themes
create.bat深蓝色"Deep Blue"
cd深蓝色主题
蚂蚁部署
- > Buildfile:C:\ liferay-plugins-sdk\themes\deep-blue-theme\build.xml
- >编译:
- >建立失败
- > C:\ liferay-plugins -stk\themes\build-common-theme.xml:172:C:\ liferay-plugins-sdk\themes\deep-blue-theme\liferay-portal-6.0.6\ tomcat-6.0 .29webappsROOT\html\themes_unstyled不存在.
问题似乎与粗体部分有关,路径显然是不正确的; 这个目录在哪里设置?
编辑:
问题是我的app.server.dir在build.{username} .properties中
正如你在对kirkz的回答的评论中所说,你已经设置了build.connor.properties:你显然在那里使用了反斜杠.这里\ t是制表符的缩写.这解释了你所看到的:... liferay-portal-6.0.6 omcat ...(6.0.6和omcat之间有一个标签)
只在属性文件中使用正斜杠(当您引用文件名时,无论您是在Windows上还是在任何其他平台上)
该错误是由于ant构建无法找到Liferay安装(其中包含SDK所需的项目).
默认情况下,SDK中的构建属性是在假设您的设置如下所示的情况下设置的:
- Your Development Directory
- bundles
- data
- deploy
- license
- tomcat-6.0.29
- liferay-plugins-sdk
Run Code Online (Sandbox Code Playgroud)
其中bundle包含Liferay捆绑包分发,包括捆绑的Tomcat服务器.
您可以在build.propertiesSDK的根级别的文件中看到此设置.
#
# 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
Run Code Online (Sandbox Code Playgroud)
建议的更改方法不是编辑此部分build.properties,而是在新文件中创建覆盖条目,称为build.username.properties.(username您的计算机帐户上的用户名在哪里).