Sean
Sean

Reputation: 371

Maven Dependencies Location

I'm using Eclipse Luna and having trouble with a imported third party Maven project. In Maven Dependencies the project has several jars, but the project is insisting they are to be found in C:\Users\username.m2\repository when they're not.

How do I tell it they are not there but in E:\java\jars?

I tried changing Native Library Locations but that didn't work, and there is nothing in the pom file that says which folder location to use. All attempts to get the classpath to work have failed (probably due to my newness to this environment).

Upvotes: 0

Views: 762

Answers (1)

Buhake Sindi
Buhake Sindi

Reputation: 89189

You can include your resource in your pom.xml as follows:

<project>
 <build>
   <resources>
     <resource>
       <directory>[your folder here]</directory>
     </resource>
   </resources>
 </build>
</project>

Alternatively, you can add your 3rd Party JARs as a repository, like so:

<repositories>
   <repository>
       <id>lib_id</id>
       <url>file://your_path_to_lib/lib</url>
   </repository>
</repositories>

Resources:

Upvotes: 1

Related Questions