I have two jar files that need to be added to javac -bootclasspath before the jdk's rt.jar file in order for the project to compile. What is the best way of achieving that using Maven2? I can't find anyway of specifing this in the dependency section so right now I'm doing the following:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> <compilerArguments> <bootclasspath>C:\...\.m2\repository\path\to\myjar.jar;${java.home}\lib\rt.j ar</bootclasspath> </compilerArguments> </configuration> </plugin> This appears to work okay, though I'm hoping there is a better way. Ideally I would like to be able to specify in the dependency section which jar files should go in the bootclasspath. Or somehow be able to refer to the dependency section from the plugin section so I don't have duplicate information. One small improvement would be to replace the repository path with a variable. Is there a variable I can use so I can do the following: <compilerArguments> <bootclasspath>${repo}\path\to\myjar.jar;${java.home}\lib\rt.jar</bootclassp ath> </compilerArguments> By the way, is there anywhere one can find a good list of variables that are available to pom.xml writers. Any help greatly appreciated. /Scott Taylor