views:

164

answers:

2

I am having a similar problem as http://stackoverflow.com/questions/1799684/ant-basedir-slashes-escape-problem except that I'm running under Maven.

I'd like to generate cross-platform paths relative to Maven's built-in property ${basedir}. The problem is that under Windows, ${basedir} resolves to a path containing Windows-style slashes. Is there an easy way for me to get ${basedir} into a form that always uses Unix-style slashes even under Windows?

A: 

In the case of adding a dir to the library path, you are better off creating a new artifact with its own pom, installing it in your local repo and adding it as a dependency in the project.

Maven and Native Libraries: JDIC and java.library.path UPDATED goes into more detail about getting a native dependency into the library path.

http://stackoverflow.com/questions/3064045/using-native-dependencies-inside-maven Is another approach.

DataSurfer
A: 

Answering my own question:

Use ${file.separator} instead of slash and watch out for this bug: http://jira.codehaus.org/browse/MEXEC-81

Gili