Why doesn't Maven download jar files, but does plugins load fine?

Good. I am moving my development environment from my laptop to the desktop.

I have the same projects on both machines, but when I try to run the maven dependency updates via eclipse on the desktop, it just complains about the “missing artifact” for each individual dependency !?

I checked the local repo on the desktop and of course there are no cans !? Everything is there, but there are no cans!

I went back to the laptop, removed from the cans from the local repo on this machine and again called the dependencies of the updates and hacked, and the jars booted just fine, but the desktop can not load any of the cans?

Both machines are on the same network / router, so it cannot be a hardware firewall / proxy server, but is there any eclipse or Windows firewall setting that I completely forget about?

Finally, I deleted the repo on the desktop and used mvn -up clean install in the project, I notice that it loads the PLUGIN jars as accurately as possible, but then it continues to download only the POM for any dependencies!

My settings.xml is as follows (mashup view from suggested repositories);

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0http://maven.apache.org/xsd/settings-1.0.0.xsd"> <pluginGroups></pluginGroups> <proxies></proxies> <servers></servers> <mirrors></mirrors> <profiles> <profile> <id>standard-extra-repos</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>net.java.download</id> <url>http://download.java.net/maven/2</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>org.apache</id> <url>http://maven.apache.org/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>org.codehaus.mojo</id> <url>http://mojo.codehaus.org/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>com.jboss.repository</id> <url>http://repository.jboss.com/maven2</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>com.springsource.repository.bundles.release </id> <name>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</name> <url>http://repository.springsource.com/maven/bundles/release </url> <releases> <enabled>true</enabled> <updatePolicy>daily</updatePolicy> <checksumPolicy>warn</checksumPolicy> </releases> </repository> <repository> <id>com.springsource.repository.bundles.external </id> <name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name> <url>http://repository.springsource.com/maven/bundles/external </url> <releases> <enabled>true</enabled> <updatePolicy>daily</updatePolicy> <checksumPolicy>warn</checksumPolicy> </releases> </repository> <repository> <id>com.springsource.repository.libraries.release </id> <name>SpringSource Enterprise Bundle Repository - SpringSource Library Releases</name> <url>http://repository.springsource.com/maven/libraries/release </url> <releases> <enabled>true</enabled> <updatePolicy>daily</updatePolicy> <checksumPolicy>warn</checksumPolicy> </releases> </repository> <repository> <id>com.springsource.repository.libraries.external </id> <name>SpringSource Enterprise Bundle Repository - External Library Releases</name> <url>http://repository.springsource.com/maven/libraries/external </url> <releases> <enabled>true</enabled> <updatePolicy>daily</updatePolicy> <checksumPolicy>warn</checksumPolicy> </releases> </repository> </repositories> </profile> 

+8
java maven
source share
6 answers

Hmm, not sure if this is not a problem, but I used maven 3.0.1 on the desktop, I downloaded 2.2.1 again to match laptop and BANG, loading dependency bans is just fine now! So much for "backward compatibility" maven 3 !!!!

+5
source share

View the contents of the downloaded POM. Sometimes Maven tries to download them, even creating them in the file system, but if you look at the content, you will find the server error code, maybe this can help.

+2
source share

Make sure you have the correct settings in the settings.xml file.

+1
source share

There was the same problem. Adding a duplicate server in the mirror section enabled this for me.

0
source share

If you want your project to be portable on any computer, you cannot rely on local settings.xml. What I usually saw was creating a local repo in the / target directory somewhere and using it to run targets in the maven environment that you generate during build. It seems to be src / main / it / settings.xml and src / main / it / local-repo.

I'm sure there is somewhere a maven plugin that will do this for you.

0
source share

If this is not a proxy problem, it could be due to your network problem, which means that your network cannot connect to the repository center specified in your settings.xml file.

Try changing the center of the repository:
In maven_home / conf / setting.xml, find the mirror tag and replace your old / empty mirror with a new mirror, and then restart eclipse.

The following is a mirror that works great for me:

  <mirror> <id>ibiblio.org</id> <name>ibiblio Mirror of http://repo1.maven.org/maven2/</name> <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url> <mirrorOf>central</mirrorOf> <!-- United States, North Carolina --> </mirror> <mirror> <id>jboss-public-repository-group</id> <mirrorOf>central</mirrorOf> <name>JBoss Public Repository Group</name> <url>http://repository.jboss.org/nexus/content/groups/public</url> </mirror> 
0
source share

Source: https://habr.com/ru/post/651025/


All Articles