Return-Path: Delivered-To: apmail-maven-users-archive@www.apache.org Received: (qmail 49915 invoked from network); 28 Mar 2011 19:36:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Mar 2011 19:36:48 -0000 Received: (qmail 72970 invoked by uid 500); 28 Mar 2011 19:36:45 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 72879 invoked by uid 500); 28 Mar 2011 19:36:45 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 72871 invoked by uid 99); 28 Mar 2011 19:36:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Mar 2011 19:36:45 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=FREEMAIL_FROM,SPF_NEUTRAL,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 216.139.236.26 is neither permitted nor denied by domain of saavyone@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Mar 2011 19:36:38 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.69) (envelope-from ) id 1Q4IEb-0002yu-Ed for users@maven.apache.org; Mon, 28 Mar 2011 12:36:17 -0700 Date: Mon, 28 Mar 2011 12:36:17 -0700 (PDT) From: saavyone To: users@maven.apache.org Message-ID: <1301340977445-4268167.post@n5.nabble.com> In-Reply-To: <5C0150D4-4771-4AE5-89D8-5FCDA89ACE44@marinecyb.com> References: <5AC7641455DFA0429089CECAA050FA1FB539F5E559@IE2RD2XVS011.red002.local> <4BD08F0E.8090703@artifact-software.com> <3A19C4AE-6A75-49D8-BC59-4479C3ED77F1@marinecyb.com> <4BD09436.6060801@artifact-software.com> <5C0150D4-4771-4AE5-89D8-5FCDA89ACE44@marinecyb.com> Subject: Re: maven-metadata-local.xml MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org We're struggling with this as well! Our team has 5 inter-dependent projects (not circularly) and a dozen developers. Once any of the projects are 'mvn install'ed for any reason, they become "locally managed" and FORGET about getting any updates from Nexus ever again! While working on that project, it works like it should, i.e. I don't want Nexus stomping my work. But, once I'm done i want to turn control back over to Nexus (switch from "locally managed" to "remotely managed"). Now, I know we could edit localCopy to be false, but is that really a feature or a hassle? I would think using -U should do this. But, alas it does not. Instead of surgically altering our artifacts' metadata in the repository, It's just easier to delete the local repository (which is what we all do). Has this never come up in Maven-land? What do you maven-ites do in this situation? I did find the following bug: http://jira.codehaus.org/browse/MNG-4142 But, I haven't tried the patch because building/running a custom build of maven seems too hack-ish. Let's vote this up and get it fixed! Thanks, Mike Halvor Platou wrote: > > Thanks for the answers! > > We are using version 2.2.1. Remember that you need to build the artifact > at your computer for the maven-metadata-local.xml to be written to your > local repository with the <localCopy> tag. > > I now also see that there are two maven-metadata-local.xml. One in the > root folder of the artifact in the repository and one inside the > x.x-SNAPSHOT folder. It is only the one inside the x.x-SNAPSHOT folder > that has this content. Here is an example: > > <?xml version="1.0" encoding="UTF-8"?> > <metadata> > <groupId>com.mycomp</groupId> > <artifactId>test</artifactId> > <version>1.0-SNAPSHOT</version> > <versioning> > <snapshot> > <localCopy>true</localCopy> > </snapshot> > <lastUpdated>20100422213001</lastUpdated> > </versioning> > </metadata> > > > Halvor > > > > On Apr22, 2010, at 8:23 PM, Ron Wheeler wrote: > > > What version of Maven? > > > > I do not see that tag in my local repo. I only checked a few > Artifacts > > but none of them had that line. > > I am using Maven 2.2.1 under Eclipse but I am not sure that this > would > > make any difference. > > > > Sorry that I am not more help but perhaps one of the smart guys might > > know what is happening. > > > > Ron > > > > On 22/04/2010 2:13 PM, Halvor Platou wrote: > >> Yes, these are all SNAPSHOT versions. Earlier this has not bee a > problem, but now it seems to be very consistent behavior. We have tried > this with several computers and they all show the same problem. We have > also tried with several remote repositories. Does anyone know the meaning > of the<localCopy> in maven-metadata.xml? > >> > >> Halvor > >> > >> > >> On Apr22, 2010, at 8:01 PM, Ron Wheeler wrote: > >> > >> > >>> On 22/04/2010 11:00 AM, Halvor Platou wrote: > >>> > >>>> Hello > >>>> > >>>> We have a problem concerning building of maven snapshot > artifacts that seems very odd. > >>>> > >>>> Let's say we have artifact: "A" and artifact: > "B". > >>>> "A" depends on "B". > >>>> If we build both of these on one computer, everything > seems fine. > >>>> > >>>> If then artifact "B" is built and > deployed(Nexus) on a different computer, "mvn install -U" on > artifact "A" on the first computer will not get the new artifact > "B", but use the one in the local repository. > >>>> > >>>> It seems that when we build locally the file > "maven-metadata-local.xml" is created in the local repository > containing<localCopy>true</localCopy>. As long as this is set > to true it will not get any new artifacts from the remote > repository(Nexus) even if they are newer and we specify -U. Removing the > localCopy line or changing it to false will make it download the new > artifact. > >>>> > >>>> Is it supposed to be like this? And has it always been > like this? > >>>> > >>>> Halvor > >>>> > >>>> > >>> Since you are deploying multiple times, you should be using > SNAPSHOTS > >>> and you should always get the latest from the Nexus. > >>> > >>> If they are releases, then it should not matter whether you > get it from > >>> your local repo or somewhere else since releases are > immutable and all > >>> copies of the same release versions are supposed to be > identical. > >>> > >>> If you make a mistake in a release, you have to delete the > bad copy from > >>> everywhere that has the wrong release. > >>> > >>> > >>> Ron > >>> > >>> > >>> > >>> > --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org > >>> For additional commands, e-mail: users-help@maven.apache.org > >>> > >>> > >>> > >> > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org > > For additional commands, e-mail: users-help@maven.apache.org > > > > > -- View this message in context: http://maven.40175.n5.nabble.com/maven-metadata-local-xml-localCopy-tp81265p4268167.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org