0

I have a problem, what I cannot solve.

I want to build my eclipse cdo server with Tycho/Maven and also I want to have the prossibility to start my cdo-server.product out of eclipse.

The cdo server it set up like this: http://wiki.eclipse.org/Setting_up_a_CDO_Server

No there is my problem: If I choose:

-Dnet4j.config="${resource_loc:/cdo.server/config}"

I can start it out of eclipse, but if I want to start the built CDO-Server.app it cannot find this folder.

If I choose:

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

I can start the built CDO-Server.app, but I can't start it ou of eclipse.

This is all logical, but now I decided to make ${resource_loc:/cdo.server/config} as a property in my pom.xml file. But if I write it like this:

<properties>
<resource_loc:/cdo.server/config>../../../../../../../../../../cdo.server/config</resource_loc:/cdo.server/config>
</properties>

I get the exception, that this is not a parseable POM because of the slash in the tag.

If I want to make it like this:

<properties>
    <resource_loc:>
        <cdo.server>
           <config>../../../../../../../../../../cdo.server/config</config>
    </cdo.server>
    </resource_loc:>
</properties>

It also is not a parseable POM. Is there any possibility to use ${resource_loc:/cdo.server/config} as a property?

ClimateUnboxed
  • 7,106
  • 3
  • 41
  • 86
tralala
  • 163
  • 2
  • 16

2 Answers2

1

The problem in your property definition are the slashes in the name of the property.

The following will fail parsing the pom.xml:

<resource_loc:/cdo.server/config>yx</resource_loc:/cdo.server/config>

or WhatEverValue

It will also not working if you try to use / as a replacement for the slash in the entity name.

khmarbaise
  • 92,914
  • 28
  • 189
  • 235
  • Thanks for your answer! i know, that the slash doesn't work in this tag, but is there any other possibility to solve this problem? – tralala Apr 26 '13 at 11:18
  • If you really need the slashes i don't see one. – khmarbaise Apr 26 '13 at 17:39
  • I need it, because I need this: -Dnet4j.config="${resource_loc:/cdo.server/config}" in the vmArgs to start my product in eclipse and to start it when it is built with maven, outside eclipse. – tralala Apr 28 '13 at 10:24
0

you may want to try http://mojo.codehaus.org/properties-maven-plugin/read-project-properties-mojo.html to read the properties from a separate file instead in order to get around the XML well-formedness limitation in pom.xml.

jsievers
  • 1,853
  • 10
  • 13