IntelliJ seems to override java.library.path and/or ${env.LD_LIBRARY} when running maven surefire plugin in IDE
I am using IntelliJ Ultimate 14.0.3 on RHLEL 6.1 and the following POM segment works when running Maven from the command line; however, it fails when running from within the IDE:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Djava.library.path=${env.LD_LIBRARY_PATH}</argLine>
</configuration>
</plugin>
Debug logging when running mvn install includes the following (partial) logging statement:
Forking command line: ... -Djava.library.path=/data_local/idea-IU-139.1117.1/bin: ...
I expect -Djava.library.path= to contain the same path specified in the export LD_LIBRARY_PATH= ... statement that is defined in ~/.bashrc.
Again, ths POM segment works when running tests from the command line but not in IntelliJ.
Thanks in advance. Any help is greatly appreciated.
Please sign in to leave a comment.