Yury Pogrebnyak
Yury Pogrebnyak

Reputation: 4173

Include jar files from maven repository to eclipse project?

How can I include jars from local maven repository into eclipse project? Actually, I need to include them into WebContent/WEB-INF/lib directory in eclipse web service project, if it makes any differencies.

Upvotes: 0

Views: 1193

Answers (1)

Sampath Pasupunuri
Sampath Pasupunuri

Reputation: 638

Open your pom file and add a dependency like this.. suppose the jar you want to add from local repository is myfaces-10.jar and if it is in the path .m2\repository\org\apache\myfaces\myfaces\10\myfaces-10.jar .. then add a dependency in your pom.xml like this..

<dependencies>
    .
    .
   <dependency>
        <groupId>org.apache.myfaces</groupId>
        <artifactId>myfaces</artifactId>
        <version>10</version>
</dependency>
    .
    .

now the jar will be available in the classpath and you can use it in your project..

make sure your groupId matches the path like in my example...

hope it helps..

Upvotes: 1

Related Questions