maveneclipse-plugintychovmargscdo-emf

How to make a path relative in the vmargs?


In my project I have an eclipse cdo-server which is set up as described here: http://wiki.eclipse.org/Setting_up_a_CDO_Server .

My project structure is like this:

-cdo-server plugin
 |- config folder with cdo-server.xml
 |- pom.xml
-cdo-server-product
 |-pom.xml
-master
 |-pom.xml

When I start my cdo-server.product as Eclipse application everything works fine.

When I build it and materialize it with Maven, it also has a BUILD SUCCESS. But when I start the CDO-CommonRepositoryServer.app which was built with Maven, there is the error:

!MESSAGE CDO server configuration not found:
/Users/pathtoCDO-Server/CDO-CommonRepositoryServer.app/Contents/MacOS/${resource_loc:/cdo.server/config}/cdo-server.xml. 

This is logical, because this is the wrong path. When I enter the absolute path to the cdo-server.xml in the vmargs (-Dnet4j.config=/Users/pathtoCDO-config/cdo-server.xml) it also works. However, I want to make it relative, so that everybody in our git-repo can use it and not only in my folder structure.

Is there any possibility to make this path relative?

With -Dnet4j.config="${resource_loc:/cdo.server/config}" it only works when i run it as an eclipse application, but not as maven built .app file.

Update:

Now I can start the CDO-CommonRepository.app file if I take

-Dnet4j.config=../../../../../../../../../../cdo.server/config

as path, but then I can only start it with the maven built file and I cannot start it from inside Eclipse anymore...

I've created a new question for this new problem: Slash in property name in pom.xml


Solution

  • I just solved my problem in copying my files with Maven copy-resources in this stupid /Users/pathtoCDO-Server/CDO-CommonRepositoryServer.app/Contents/MacOS/${resource_loc:/cdo.server/config}/cdo-server.xml folder.