Sorry if this seems like a basic config issue (I'm still new to M2), but
I couldn't find an answer searching through the mail list archives.
I'd like to setup an internal plugin repository (actually on our
network). So I ran all mvn commands that I thought users may run ("mvn
ear:ear", "mvn test", etc.) to download all required plugins. I then
copied my local cached repository from C:\Documents and
Settings\mrachell\.m2\repository to the server location
//myserver/projects/maven2repo. Then I updated my pom.xml to point to
the network repo, deleted my local cached repo and re-ran the mvn
commands. Although it is getting most plugins from the internal repo
(the download shows file://... instead of http://...) it is still
downloading some plugins from the internet even though they exist on the
configured internal repo. For example, the following shows that the
first plugin is from the internet, but the next one is from the internal
repo:
> mvn ear:ear
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'ear'.
[INFO] org.apache.maven.plugins: checking for updates from LOCAL PLUGIN
REPO
[INFO] org.apache.maven.plugins: checking for updates from Ibiblio
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from LOCAL PLUGIN REPO
[INFO] org.codehaus.mojo: checking for updates from Ibiblio
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] artifact org.apache.maven.plugins:maven-ear-plugin: checking for
updates from LOCAL PLUGIN REPO
[INFO] artifact org.apache.maven.plugins:maven-ear-plugin: checking for
updates from Ibiblio
[INFO] artifact org.apache.maven.plugins:maven-ear-plugin: checking for
updates from central
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-ear-plugin/
2.1/maven-ear-plugin-2.1.pom
903b downloaded
Downloading:
file://myserver/Projects/maven2repo/org/apache/maven/plugins/maven-plugi
n-parent/2.0.1/maven-plugin-parent-2.0.1.pom
7K downloaded
Here's my pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.test.app</groupId>
<artifactId>testapp</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>Maven Quick Start Archetype</name>
<url>http://maven.apache.org</url>
<repositories>
<repository>
<id>NETWORK REPO</id>
<url>file://myserver/Projects/maven2repo</url>
</repository>
<repository>
<id>Ibiblio</id>
<name>Ibiblio</name>
<url>http://www.ibiblio.org/maven/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>NETWORK REPO</id>
<name>Maven Plugin Repository</name>
<url>file://myserver/Projects/maven2repo</url>
</pluginRepository>
<pluginRepository>
<id>Ibiblio</id>
<name>Ibiblio</name>
<url>http://www.ibiblio.org/maven2/</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Are some plugins ALWAYS downloaded from the internet? Thanks for any
help?
Morgan