Thanks for the quick reply Wayne. Although I'm still having trouble getting the <mirrorOf> setting to work, I have the more important piece working where m2 is using the networked repo for project dependencies. I suppose it's not too bad (at least in my environment) to let m2 get its own plugins from ibiblio.
BTW, the book has already proven to be an invaluable resource! Thanks. -----Original Message----- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Thursday, April 27, 2006 2:48 PM To: Maven Users List Subject: Re: M2 still downloads plugins from repo1.maven.org even with internal plugin repository 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 <[EMAIL PROTECTED]> 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-plugi > n/ > 2.1/maven-ear-plugin-2.1.pom > 903b downloaded > Downloading: > file://myserver/Projects/maven2repo/org/apache/maven/plugins/maven-plu > gi 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 > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
