If adding repository information to a pom is not recommend, how is one supposed to get access to artifacts that are not in central? It either has to go in the pom or central needs to be mirrored to something in the settings.xml file which actually does contain all the artifacts that your project may need.
Settings.xml though is no better since all developers on your team must share the same mirror definitions. This makes build environments very unportable. You can at least store poms in source control and other members of your team will automatically have the new repository definition. On a side note, I will look into creating a bug report. Let me know if/when you have duplicated the problem. --- Todd Thiessen -----Original Message----- From: Igor Fedorenko [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 11, 2008 3:55 PM To: [email protected] Subject: Re: [m2eclipse-user] Using an internal central repository without changing settings.xml There is a chance version of maven embedder used by m2e does not properly handle project-specific repository definitions. I will try to reproduce this problem myself, but if you could create a bugreport in JIRA [1] with sample project and steps to reproduce, this would certainly help. Also, adding repository definition to pom.xml files is generally not recommended. This makes projects harder to move from one build environment to another. -- Regards, Igor Todd Thiessen wrote: > I've overridden the central repo in my pom. ie: > > <repositories> > <repository> > <id>central</id> > <url>http://localhost:8081/nexus/content/groups/public</url> > </repository> > </repositories> > <pluginRepositories> > <pluginRepository> > <id>central</id> > <url>http://localhost:8081/nexus/content/groups/public</url> > </pluginRepository> > </pluginRepositories> > > But for some reason, m2e still downloads some of the artifacts from > the maven central repo. Not all of them however. When running the > project from m2e within eclipse I get as output (partial). > > url = _http://localhost:8081/nexus/content/groups/public_ > Downloading: > _http://localhost:8081/nexus/content/groups/public/org/apache/maven/pl > ugins/maven-resources-plugin/2.2/maven-resources-plugin-2.2.pom_ > > url = _http://repo1.maven.org/maven2_ > Downloading: > _http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugins/ > 1/maven-plugins-1.pom_ > > > However, if I execute the same build from the command line, all > downloads go to my central repo, which is what I would expect. ie: > > Downloading: > _http://localhost:8081/nexus/content/groups/public/org/apache/maven/pl > ugins/maven-resources-plugin/2.2/maven-resources-plugin-2.2.pom_ > > Downloading: > _http://localhost:8081/nexus/content/groups/public/org/apache/maven/pl > ugins/maven-plugins/1/maven-plugins-1.pom_ > > --- > /Todd Thiessen/ > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
