maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Domsch <land...@gmail.com>
Subject Influence property substitution
Date Tue, 14 Aug 2018 09:19:39 GMT
Hi,

we are facing an awkward problem with property substitution. The following part is in our
cargo-maven2-plugin configuration:

…
<build>
  <plugins>
    <plugin>
      ...
      <configuration>
        <container>
          <systemProperties>
            <dbUrl>jdbc:derby:${basedir}/target/database/Repository1.db;create=true</dbUrl>
          </systemProperties>
        </container>
      </configuration>
    </plugin>
  </plugins>
</build>

What is done here, is configuring the derby driver. This works fine under all *nix systems.
In windows environments there is a very bad case. ${baseDir} gets substituted with the absolute
path using File.separator (\). Derby takes that string literally and if the path contains
path segments that happen to start with a t or an r the url is not usable anymore, since it
now contains tabs or line feeds (\t or \r).

I am not sure how to circumvent that problem, since it seems to be a core maven mechanism
that is not to be tampered with.

Any ideas to work around that problem are highly appreciated.

Christian
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message