I have a Maven project that displays the path to my own library using properties that can be set in local profiles. For instance:
<project> ... <build> ... <plugins> <plugin> <artifactId>maven-surefire-plugin</artifactId> <configuration> <environmentVariables> <LD_LIBRARY_PATH>${foo.libdir}</LD_LIBRARY_PATH> </environmentVariables> <fork>always</fork> </configuration> </plugin> </plugins> </build> <profiles> <profile> <id>foo-default</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <foo.libdir>/usr/local/lib</foo.libdir> </properties> </profile> </profiles> </project>
When I work with this project in Eclipse using the M2Eclipse plugin , I would like to be able to configure launch options that also refers to this path in the same way (for example, so I can run the Eclipse debugger in the project). Is there a way to access the Maven property from Eclipse, for example, to set LD_LIBRARY_PATH in the startup configuration using a variable like ${maven_property:foo.libdir} ?
source share