I want to build a file repository in my computer which can't access Internet.
so, I create the repository in file://e:\repository1 which contains all the
required artifacts hierarchy. and config pom.xml like below:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.dolly</groupId>
<artifactId>sample</artifactId>
<version>1.0.1</version>
<dependencies/>
<repositories>
<repository>
<id>central</id>
<name>Maven Repository Switchboard</name>
<layout>default</layout>
<url> file://e:\repository1 </url>
</repository>
</repositories>
</project>
The localRepository of Maven2 is default to ~/.m2/ which has no artifacts at
the beginning. The mvn result is :
E:\mvndemo\my-app>mvn -o compile
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-resources-plugin' does not
exist or no valid version could be found
[INFO] ------------------------------------------------------------------------
According log, mvn2 try to access http://repo1.maven.org/maven2 ( not
file://e:\repository1 ) to download the maven-resources-plugin.
How can my own repository completely replace the dafault repository
http://repo1.maven.org/maven2.
Thanks for any suggestion?