I\'m using maven in my project and I need to run the build in a non-internet-access machine.
When I test my project build everything is working, bu
I think this happens because Maven hasn't got the metadata available locally to determine if its plugin versions are correct. If you specify exact versions for your plugins (which is a good idea for reproducability anyway), it doesn't need to do the check, so will not try to connect to the remote repositories.
By specify exact versions, I mean that in your project's POM you should add the version to the plugin declaration. For example:
org.apache.maven.plugins
maven-dependency-plugin
2.0
Note you can also force Maven to use internal repositories instead of Central by setting up repository mirrors. See this answer for more details on using repository managers and mirrors.
In the config you included, you're setting your remote repository to point to your local repository, this is not a good idea. To run offline you should either pass -o at the command line or add this to your settings.xml:
true