在我的項目中,我有一個eclipse cdo-server,它的設置方式如下:http://wiki.eclipse.org/Setting_up_a_CDO_Server。如何在vmargs中創建相對路徑?
我的項目結構是這樣的:
-cdo-server plugin
|- config folder with cdo-server.xml
|- pom.xml
-cdo-server-product
|-pom.xml
-master
|-pom.xml
當我開始我的CDO的server.product作爲Eclipse應用程序一切正常。
當我使用Maven構建它並實現它時,它也具有BUILD BUILD SUCCESS。但是,當我開始這是使用Maven構建的CDO-CommonRepositoryServer.app,有錯誤:
!MESSAGE CDO server configuration not found:
/Users/pathtoCDO-Server/CDO-CommonRepositoryServer.app/Contents/MacOS/${resource_loc:/cdo.server/config}/cdo-server.xml.
這是合乎邏輯的,因爲這是在錯誤的道路。當我在vmargs(-Dnet4j.config=/Users/pathtoCDO-config/cdo-server.xml
)中輸入cdo-server.xml的絕對路徑時,它也可以工作。但是,我想讓它成爲相對的,這樣我們的git-repo中的每個人都可以使用它,而不僅僅是在我的文件夾結構中。
有沒有可能使這條路徑相對?
與-Dnet4j.config="${resource_loc:/cdo.server/config}"
它只適用於當我運行它作爲eclipse應用程序,但不是作爲maven內置的.app文件。
更新:
現在我可以開始CDO-CommonRepository.app文件,如果我拿
-Dnet4j.config=../../../../../../../../../../cdo.server/config
的路徑,但我只能使用Maven構建文件來啓動它,我不能從Eclipse內啓動了它......
我已經創造了這個新問題的新問題:Slash in property name in pom.xml
爲什麼不使用相對路徑,即像'cdo.server/config/cdo-server.xml'這樣的路徑?或以編程方式配置CDO服務器? – oberlies
感謝您的回答,我將問題更新至我目前的狀態! – tralala