Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven Dependencies Eclipse

Tags:

I added the below depdencies in my pom

     <dependency>         <artifactId>richfaces-api</artifactId>         <groupId>org.richfaces.framework</groupId>         <version>3.3.3.Final</version>     </dependency>        <dependency>         <groupId>org.richfaces.ui</groupId>         <artifactId>richfaces-ui</artifactId>         <version>3.3.3.Final</version>     </dependency>     <dependency>         <artifactId>richfaces-impl</artifactId>         <groupId>org.richfaces.framework</groupId>         <version>3.3.3.Final</version>     </dependency> 

When I did mvn clean install in command prompt , these dependency jars got downloaded. However in Eclipse this is not showing under referenced libraries section. The other jar files that are part of dependencies are showing up though. Is there anything that I must do for this to get reflected? Thanks.

like image 754
Punter Vicky Avatar asked Apr 03 '12 08:04

Punter Vicky


People also ask

How do I fix missing Maven dependencies in Eclipse?

Right-click on the project and choose Properties, and then Maven. Uncheck the box labeled "Resolve dependencies from Workspace projects" Hit Apply, and then OK. Right-click again on your project and do a Maven->Update Snapshots (or Update Dependencies)

How do I get dependencies in Eclipse?

Right-click the project, then select "Properties", then "Java Build Path". The tabs "Projects" and "Libraries" list what the project depends on. Note that the "Order and Export" tab alllows you to have indirect dependencies. All the information here is saved in a file named .

How do I run a Maven dependency tree in Eclipse?

Maven Dependency Tree in Eclipse IDEEclipse pom. xml “Dependency Hierarchy” tab shows the dependency tree of the project. It has two sides - the left side shows verbose output and the right side shows the resolved dependencies. We can use the “Filter” option to look for a specific dependency.


Video Answer


1 Answers

This depends on how you have integrated Maven in Eclipse:

  • No Eclipse integration: run mvn eclipse:eclipse on command line to refresh the project definition.
  • M2Eclipse or m2e: Update the POM file (select, press F5), then right-click the project, Maven > Update Dependencies

This should fix it.

like image 198
nwinkler Avatar answered Sep 22 '22 13:09

nwinkler