Reputation: 1000
Maven throws time out when try to clean the project
USER>mvn clean
After this command the build throw:
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dep
endencies could not be resolved: Failed to read artifact descriptor for org.apac
he.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apa
che.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven
.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org
/23.235.46.215] failed: Connection timed out: connect -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException
Upvotes: 1
Views: 3323
Reputation: 70909
Do you have any other repositories configured in your ${HOME}/.m2/settings.xml
(or pom.xml)? If so, make sure that none of them have the id of central
or you may have reconfigured the location of maven-central.
Also, if you use a locally hosted "proxy" maven repository, do not reconfigure central
to point to the locally hosted maven repository, instead use a "mirror" directive, configuring the repository to be something with an id like "localrepo" and specifying it as a "mirrorOf" central
.
Finally, avoid any "proxy" settings unless you want all of your searches to start searching for repositories outside of your network (aka on the internet).
Maven manages dependencies in a very specific manner, which provides repeat-ability of builds. Basically it needs to be encoded in the pom.xml. Yes, you can do some magic to pass such things through using the command line, but if you do that, you are working against the design of maven (and robbing yourself of most of it's utility at the same time).
If you need something to "update" a build, consider making a script that updates and checks in the pom.xml for the artifact, or (less ideal) base the dependency on a snapshot version.
Upvotes: 1