2011-06-07 180 views
3

我一直在使用ant deploy從命令行部署liferay portlet和主題時遇到問題;Liferay螞蟻部署失敗

樣品執行:

PWD:C:\ Liferay的-插件-SDK \主題

create.bat深藍色的 「深藍」

CD深藍色的主題

螞蟻部署

- >構建文件:C:\ Liferay的-插件-SDK \ \主題深藍色主題\ build.xml文件

- >編譯:

- >建立失效

- > C:\的liferay-插件-STK \主題\集結共theme.xml:172:C:\的liferay-插件-SDK \ themes \ deep-blue-theme \ liferay-portal-6.0.6 omcat-6.0.29webappsROOT \ html \ themes_unstyled不存在。

該問題似乎與粗體部分以及路徑顯然不正確;這個目錄在哪裏設置?

編輯:

問題是我在建app.server.dir {用戶名}的.properties

回答

5

的錯誤是不能夠找到一個Liferay的安裝Ant構建的結果(這包含SDK所需的項目)。

默認情況下,在SDK構建屬性設置在你的設置是這樣的假設:

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

凡束包含Liferay的束分佈,包括捆綁的Tomcat服務器。

您可以在SDK的根級別的build.properties文件中看到此設置。

# 
# 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 

推薦的方式來改變,這不是編輯的build.properties這一節,而是創造一個新的文件覆蓋項,稱爲build.username.properties。 (其中username是您的計算機帳戶上的用戶名)。

+0

我應該有最初包括我的build.conor.properties: app.server.dir = C:\的liferay門戶-6.0.6 \ Tomcat的6.0.29 auto.deploy.dir = C:\ liferay的-portal-6.0.6 \ deploy app.server.lib.portal.dir = C:\ liferay-portal-6.0.6 \ tomcat-6.0.29 \ webapps \ ROOT \ WEB-INF \ lib app。 server.portal.dir = C:\ liferay-portal-6.0.6 \ tomcat-6.0.29 \ webapps \ ROOT – COner 2011-06-07 18:10:02

5

正如你在評論kirkz的回答中所說的,你已經設置了你的build.connor.properties:你顯然已經在那裏使用了反斜槓。這裏\ t是製表符的簡稱。這解釋了你所看到的:... liferay-portal-6.0.6 omcat ...(在6.0.6和omcat之間有一個選項卡)

只在屬性文件中使用正斜槓(當你引用文件名稱,不管你是在windows還是在其他平臺上)

+0

ahh哇,謝謝,我沒有完全弄清楚這個問題,但已經完全取消了我的版本文件,並通過複製粘貼啓動它,它工作。 – COner 2011-06-08 20:12:17

1

我認爲現在就解決這個問題。要檢查天氣你得到不成功的建設或不,你可以試試這個解決方案:

我剛在這個解決方案中使用了靜態liferay路徑。

<elseif> 
      <equals arg1="${theme.parent}" arg2="classic" /> 
      <then> 
       <copy todir="docroot" overwrite="true"> 
        <fileset 
         dir="C:/Liferay/liferay-portal-6.2-ce-ga2/tomcat-7.0.42/webapps/ROOT/html/themes/classic" 
         excludes="_diffs/**,templates/**" 
        /> 
       </copy> 

       <copy todir="docroot/templates" overwrite="true"> 
        <fileset 
         dir="C:/Liferay/liferay-portal-6.2-ce-ga2/tomcat-7.0.42/webapps/ROOT/html/themes/classic/templates" 
         includes="*.${theme.type}" 
        /> 
       </copy> 
      </then> 
     </elseif> 

在集結共theme.xml文件設置此代碼後,你將不會得到omcat-6.0.29webappsROOT \ HTML \ themes_unstyled錯誤最少。