I have a local artefact repository which my maven settings are pointed at but for some reason this doesn't seem to hit it, and fails all the time when trying to do an install. I can access the url directly in my browser and can also access the maven repo via browser. I can also ping both.
Any ideas why it keeps failing? Stack trace below
Cheers,
mvn clean install -DskipTests -T 8C
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-webdav/1.0-beta-2/wagon-webdav-1.0-beta-2.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project uk.co.three:Three:0.1 (/Users/***/Projects/three/Development/pom.xml) has 1 error
[ERROR] Unresolveable build extension: Plugin org.apache.maven.wagon:wagon-webdav:1.0-beta-2 or one of its dependencies could not be resolved: Failed to collect dependencies for org.apache.maven.wagon:wagon-webdav:jar:1.0-beta-2 (): Failed to read artifact descriptor for org.apache.maven.wagon:wagon-webdav:jar:1.0-beta-2: Could not transfer artifact org.apache.maven.wagon:wagon-webdav:pom:1.0-beta-2 from/to central (http://repo1.maven.org/maven2): Error transferring file: Connection refused -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
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)
In Maven, you can use Apache Maven Dependency Plugin, goal dependency:purge-local-repository to remove the project dependencies from the local repository, and re-download it again.
I don't know if you used the embedded or an external maven installation (Window-> Preferences -> Maven -> Installations).
If it's external you have to declare your corporate proxy in the settings.xml
(in the conf folder of your external installation or in your local repository).
It may be also the case if you use the embedded maven. Then you have to provide a settings file in "Global settings for embedded installation".
If you are using an external maven installation you can also try the command line outside eclipse.
With
mvn -U ...
You can force maven to look for the latest plugin versions.
If you are using proxy and you have unzipped the Maven directory, then update settings.xml in {APACHE_MAVEN_DIR}\conf like below,
just update the "REPLACE~~" strings with the proper info, and try again.
<proxies>
<proxy>
<id>example-proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>proxy.example.com</host>
<port>8080</port>
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>www.google.com|*.example.com</nonProxyHosts>
</proxy>
</proxies>
Here is the official documentation for proxy configuration in maven settings.xml:
https://maven.apache.org/guides/mini/guide-proxies.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With