I am setting up a project in eclipse . This projects builds successfully through command line(all mvn
commands like mvn package
, mvn compile<
or
<dependency>
<groupId>net.xyz.xyz</groupId>
<artifactId>xyz-xyz</artifactId>
<version>x.y.z</version>
<type>pom</type>
</dependency>
or
<dependency>
<groupId>net.xyz.xyz</groupId>
<artifactId>xyz-xyz</artifactId>
<version>x.y.z</version>
<scope>test</scope>
</dependency>
then further Maven > Update Project
Solution 1:
Set correct proxy:
<proxy>
<id>optional</id>
<active>false</active>
<protocol>http</protocol>
<username></username>
<password></password>
<host>172.27.171.91</host>
<port>8080</port>
</proxy>
Solution2 :
just delete
lastupdated extension files from folder
and try updating maven.
[Most of the times this solution will work]
For me I changed the packaging from pom to jar, and then the dependency got downloaded.
so I changed from <packaging>pom</packaging> to <packaging>jar</packaging>
I have come across the same issue recently.
First of all you have to configure proxy settings in settings.xml in your maven repository.
If you are using eclipse/STS then please do verify following.
Window -> Preferences -> Maven -> User Settings -> update user settings by pointing your settings.xml
Now it's set to update the maven project. It worked for me.
I got the same problem and this is how i solved. :