You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Morgan Rachell <mr...@cri-solutions.com> on 2006/04/27 19:30:24 UTC

M2 still downloads plugins from repo1.maven.org even with internal plugin repository

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
 

Re: M2 still downloads plugins from repo1.maven.org even with internal plugin repository

Posted by Wayne Fay <wa...@gmail.com>.
Two issues:
1. The settings you have specified in your pom will *not* prevent
Maven from going out to ibiblio to look for plugins.
2. You cannot simply copy the folders and expect it to work. There is
additional metadata stored in files in a real Maven Repository. I
think the forthcoming MRM "tool" will help with this, but not sure.

This is a common topic on the Maven User list. Please search the User
archives for "mirror" or "proxy" to find *tons* of discussion with
examples etc for configuring things, depending on how you want to go
about it... not everyone will want to set up a Maven Proxy, for
example. But if you override central with a mirrorOf entry, then Maven
will never go out to Central to find files, so if you add a new
dependency in your pom, you'll also need to download and install it
into your Repository before your build will succeed.

Also, this might be covered in the Mergere Maven book (free), not
sure, haven't looked at the final version yet:
http://library.mergere.com/  Even if its not, you should get the book
and refer to it as you work with your Maven builds.

Wayne

On 4/27/06, Morgan Rachell <mr...@cri-solutions.com> wrote:
> 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
>
>
>