$ {path.separator} on Maven on Mac is set to ":"

We have a problem with several people using Windows and Maven, and I suspect that the problem is related to ${path.separator} . They get an error that the directory "D: \ basedir \ target / dist" does not exist. We are not getting this error on Mac, Linux and Unix systems.

I would like to change this as ${project.build.directory}${path.separator}dist , but on a Mac the value of ${path.separator} is : and not / . Now my build does not work on Mac, because /Users/david/project/target:dist not a valid directory.

How to set the default value of ${path.separator} on Mac as / ?

+7
properties maven
source share
1 answer

Just to close it ...

I wanted ${file.separator} , not ${path.separator} . ${path.separator} is what is used to separate directory names in paths. On Windows, this ; , and on Mac and Unix - :

${file.separator} is a directory delimiter. On Windows, this is \ , and on Unix and Mac it is `/ '.

I got confused because on old System X computers the file separator was : I usually use / , but this did not work in this one project.

+9
source share

All Articles