Reputation: 17032
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.
Upvotes: 26
Views: 91603
Reputation: 71
Follow the following steps to fix this issue
Upvotes: 1
Reputation: 10976
Another possibility I tripped over today, is if you accidentally set compile:compile
to ignore - I've no idea how I did it but to fix it go to Window->Preferences->Maven->Life Cycle Mappings, open the file it points to and remove all the pluginExecution
elements that say
<action>
<ignore />
</action>
Upvotes: 1
Reputation: 14558
Right click on the project ->
Properties -> Deployment Assembly -> Add -> Java Build Path Entries ->
choose maven deps -> finish -> click ok
or simply run below command and let maven generate eclipse files
mvn eclipse:eclipse
Upvotes: 3
Reputation: 16060
there are two things, you can do:
a) use a plugin like m2eclipse
b) call mvn eclipse:eclipse
The first approch will make eclipse work with maven. The second one will create a .project and a .classpath file. You have to call mvn eclipse:eclipse
everytime you change the maven dependencies.
From my point of view, the second approch is better, because I got into some serious trouble with m2eclipse and multimodule projects.
update:
As far as I define compatibility, eclipse is not maven compatible, because it does not seperate the different classpathes of maven. Other IDE are better (in this aspect).
Upvotes: 6
Reputation: 54477
This depends on how you have integrated Maven in Eclipse:
mvn eclipse:eclipse
on command line to refresh the project definition.This should fix it.
Upvotes: 53