Thanks for the answer. I look at the blog article. In fact, we use mirror definition in settings.xml. This is the only way for B to grab A from our Nexus repository. The problem is that when A is not in our local repository, B is not able to grab A in nexus if A is a snapshot version. The mirror is defined for everything (<mirrorOf>*</mirrorOf>) but it seems that it only search for release version and not for snapshots. Is it a wanted restriction or a bug ? I don't really understand Brett Porter's answer in http://jira.codehaus.org/browse/MNG-943, because if the "a single POM for the company that is the "root" that all projects inherit from" is a snapshot version, sub modules won't be able to find it.
Thanks, Vincent. On Mon, Mar 2, 2009 at 7:57 PM, Brian E. Fox <[email protected]>wrote: > You might want to take a look at this: > http://www.sonatype.com/people/2009/02/why-putting-repositories-in-your- > poms-is-a-bad-idea/<http://www.sonatype.com/people/2009/02/why-putting-repositories-in-your-%0Apoms-is-a-bad-idea/> > > -----Original Message----- > From: Vincent Beretti [mailto:[email protected]] > Sent: Monday, March 02, 2009 11:37 AM > To: [email protected] > Subject: Use mirror in parent snapshot inheritance > > Hi all, > let's consider the following project : > A > |---- B > |---- C > > A is the parent pom of B. In A, I define the repository location of our > entreprise repository. > A is a currently in a snapshot version so in B's pom.xml I have : > <parent> > <groupId>com.xxx</groupId> > <artifactId>A</artifactId> > <version>1.0-SNAPSHOT</version> > <parent> > > So when I checkout A and build it from A or B, the build is successfull. > But let's consider I only want to checkout B, because I don't want to > checkout all C project sources. > When I run an install on B project (A is not available through > filesystem in > the upper directory or in my local repository as a 1.0-SNAPSHOT > version), > the build fails saying that it can not find the artifact A with version > 1.0-SNAPSHOT. This should be normal because it can not find the location > of > our entreprise repository because it is defined in project A. > So I defined a mirror, that for all requests (<mirror-of>*<mirror-of>) > forward to our entreprise repository for all artifacts (releases and > snapshots). > It is still not working. > > I saw this issue : > http://jira.codehaus.org/browse/MNG-943 > It seems to be the reason why I can't retrieve the snapshots version of > my > artifact A. It is really blocking for big projects. > How can I bypass this limitation ? > Can we correct this limitation and allow retrieval of snapshots > artifacts ? > > Thanks, > Vincent Beretti. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
