Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven proxy vs mirror

Tags:

maven

I am finding it difficult to understand the difference between a mirror and a proxy defined in the settings.xml. I read that whatever a defined mirror is a mirrrorOf, all http requests to those(mirrorOf) repositories are overridden by a corresponding http request to the mirror. What is a proxy then? This question is in the wake of troubleshooting the following error I receive while I try to create a new project using mvn archetype:generate.

The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no valid version could be found

Any help?

like image 434
Ajay Avatar asked Sep 26 '12 12:09

Ajay


1 Answers

Proxy configuration relates to a standard HTTP proxy you might need reaching Internet, such as a proxy in your web browser. It does not relate to maven functionalities as such, but to reaching Internet connectivity.

If you can use a browser without a proxy, you probably don't need one for Maven either, and vice versa.

Mirror configuration, on the other hand, is meant to replace a maven repository with another. They are not related to connectivity - they change the target which your maven tries to reach.

like image 172
eis Avatar answered Nov 10 '22 21:11

eis