Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven, how to add additional libs not available in repo

I have a maven project that has a set of library dependancies that are not available via any maven repository. How can I add those libraries to the pom? I want to do this so when I run 'mvn eclipse:eclipse' it doesnt remove those libraries from the eclipse classpath.

like image 968
wuntee Avatar asked Mar 19 '10 16:03

wuntee


1 Answers

You can declare it as a dependency with system scope.

<project>
...
 <dependencies>
   <dependency>
     <groupId>sun.jdk</groupId>
     <artifactId>tools</artifactId>
     <version>1.5.0</version>
     <scope>system</scope>
     <systemPath>${java.home}/../lib/tools.jar</systemPath>
   </dependency>
 </dependencies>
 ...
</project>
like image 177
YuppieNetworking Avatar answered Oct 23 '22 09:10

YuppieNetworking