I have an external library that should be dynamically linked to a test in my java project. The project is being configured using maven, and I need to add the following vm arguments to eclipse to pass the test:
-Djava.library.path=${env_var:HOME}/.m2/repository/natives/dist/lib -ea
Unfortunately, this means running the test from maven with: mvn testwill always fail.
One job is to call mvnwith an argument -DargLineas follows:
mvn test -DargLine="-Djava.library.path=/Users/rob/.m2/repository/natives/dist/lib -ea"
However, it is obvious that the problem is with my machine, so I cannot install it directly in the pom file. I assume that what I am looking for is a way to change this line on every machine basis, like the first line for eclipse.
I am also curious how I can put it in a POM file, I tried to put it inside the tags <argLine>, but this does not seem to work, there is something that I am missing:
<argLine>-Djava.library.path=/Users/rob/.m2/repository/natives/dist/lib -ea</argLine>
source
share