2012-09-17 48 views
0

我目前正在配置我們的開發環境,以便從開源的glassfish v3.1升級到開源的glassfish 3.1.2,並且已經注意到使用asadmin命令的版本之間的差異:GlassFish ASADMIN部署命令使用--name?指定上下文根目錄

v3.1

部署--name測試:測試-1.0 「C:\ tmp目錄\我長的試驗應用,戰爭name.war」

這是通過HTTP訪問:\\本地主機:8080 \測試

V3.1.2

deploy --name test:beta-1.0「c:\ tmp \ my-long-test-app-war-name.war」

這隻能通過http訪問:\\ localhost:8080 \ my-long -test-APP-戰爭名稱

我注意到它被描述爲新版本的--contextroot:

--contextroot 
     Valid only if the archive is a web module. It is 
     ignored for other archive types; defaults to filename 
     without extension. 

而且--name爲:

--name 
     Name of the deployable component. 

     The name can include an optional version identifier, 
     which follows the name and is separated from the name 
     by a colon (:). The version identifier must begin with 
     a letter or number. It can contain alphanumeric charac- 
     ters plus underscore (_), dash (-), and period (.) 
     characters. For more information about module and 
     application versions, see "Module and Application Ver- 
     sions" in Oracle GlassFish Server Application Deploy- 
     ment Guide. 

所以對於更新的版本(或者每當它改變超過3.1時)守LD部署命令變成:

部署--name測試:測試版,1.0 --contextroot測試 「C:\ tmp目錄\我長的試驗應用,戰爭name.war」

乾杯, 克雷格

PS目前正試圖搞垮v3.1.2.2來測試,但在企業防火牆是殘酷的

回答

1

我認爲無論--contextroot和--name分別對應於當您從使用管理面板瀏覽器。他們彼此獨立。僅當您想要將默認的contextroot更改爲另一個時,才使用--contextroot。

相關問題