Return-Path: X-Original-To: apmail-maven-users-archive@www.apache.org Delivered-To: apmail-maven-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 929DFED7A for ; Fri, 15 Mar 2013 15:43:52 +0000 (UTC) Received: (qmail 49346 invoked by uid 500); 15 Mar 2013 15:43:50 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 48775 invoked by uid 500); 15 Mar 2013 15:43:50 -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 48745 invoked by uid 99); 15 Mar 2013 15:43:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Mar 2013 15:43:48 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dantran@gmail.com designates 209.85.217.180 as permitted sender) Received: from [209.85.217.180] (HELO mail-lb0-f180.google.com) (209.85.217.180) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Mar 2013 15:43:45 +0000 Received: by mail-lb0-f180.google.com with SMTP id q12so2868031lbc.39 for ; Fri, 15 Mar 2013 08:43:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=QmvBweVIpKcuhNtEw/KucJlFq4XeXgxr9MnOnpsQXtk=; b=oz7cyfuCGjfldWp4lEE1mNeoGY3up8VknMlgrB3ucmbbzfcvcSJrJrLQ7siZxRnSsk FI8ugqZsvhcRGBW0+L0/hhGDFS2G+aFotfLfaPahnh5XDoYac373k3t0RrV02XL7vO0I jhh9yFGJjMzNcsQWmtlMw6H01dT7I0K7BIg0grwqAM9D9i0dCLNQA9FsjfB3IEGWdwlr hHm3zmbfN1G3hiXtJapDQrDe2kzcLC94idjaTayY4QxP3B2re9ktkCZ+Ea1pSBopPTsF Zalwmv1Nfou47hdWxDj7Voi3uB3iV5z7AREp16fmbVn72XGMSxfZWYB6sP6+FIbjr458 wVpA== MIME-Version: 1.0 X-Received: by 10.152.147.130 with SMTP id tk2mr6192942lab.24.1363362203624; Fri, 15 Mar 2013 08:43:23 -0700 (PDT) Received: by 10.114.83.71 with HTTP; Fri, 15 Mar 2013 08:43:23 -0700 (PDT) In-Reply-To: <89DCEECCA249B34580C460F60092388719A81C1A@PVSWMAIL2010.pervasive.com> References: <89DCEECCA249B34580C460F60092388719A7F26A@PVSWMAIL2010.pervasive.com> <89DCEECCA249B34580C460F60092388719A80CB5@PVSWMAIL2010.pervasive.com> <89DCEECCA249B34580C460F60092388719A80FFB@PVSWMAIL2010.pervasive.com> <89DCEECCA249B34580C460F60092388719A81C1A@PVSWMAIL2010.pervasive.com> Date: Fri, 15 Mar 2013 08:43:23 -0700 Message-ID: Subject: Re: merge-maven-repos problems with maven-metadata.xml From: Dan Tran To: Maven Users List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org So far what I hear is the merge is doing the right thing, however, we still need to reindexing repo manager to pickup metadata changes. if not so, we need more details about how exactly metadata must be after the merge without the need to run the reindex -D On Fri, Mar 15, 2013 at 6:50 AM, Jim McCaskey wrote: > Hi there, > > Your probably right Dan. I did take a quick walk through the code and it= looked like the wagon-maven-plugin just calls a .merge on the maven-metada= ta.xml files from some other package. I felt there be dragons, so came up = with another "solution". > > Thanks to Alejandro for the idea of just triggering something on the serv= er. I wanted to be a bit more tactical though. I was able to rebuild just= the Metadata (which is all my builds need to keep going during the day) by= doing this: > > curl --user : -X DELETE --insecure https://repoUrl/nexus/servic= e/local/metadata/repositories/repoName/content/path/to/artifact > > That takes seconds to accomplish instead of a few minutes as that was tri= pping up my Jenkins server. It does put and extra burden on me to correctl= y identify which artifacts need to be rebuilt, but I figure a little script= ing can accomplish that. We rebuild the indexes every night, which is "good= enough" for what we need. I basically followed the REST documentation on = my server. I found the docs here as well: > > http://nexus.xwiki.org/nexus/nexus-core-documentation-plugin/core/docs/re= st.metadata.domain.target.content.html > > I'm back in business for now. Thanks everyone! > > -Jim > > -----Original Message----- > From: Dan Tran [mailto:dantran@gmail.com] > Sent: Thursday, March 14, 2013 6:36 PM > To: Maven Users List > Subject: Re: merge-maven-repos problems with maven-metadata.xml > > You may want to talk a look at metadata merge logic under > wagon-maven-plugin and fix it, i think it is doable > > -D > > On Thu, Mar 14, 2013 at 12:16 PM, wrote: > >> i do something similar to fix a bug in nexus ( >> https://issues.sonatype.org/browse/NEXUS-5525) >> >> since it is a jenkins build, i just trigger a scheduled (manual) task to >> reindex the repo on build finish. >> The command i use to trigger it is >> >> /usr/bin/wget --user=3Dsomething --password=3Dmy-pass >> http://url/to/repo/nexus/service/local/schedule_run/21 >> >> where 21 is the id of the reindex job >> >> So in summary: >> >> -create scheduled job to "repair repositories index" >> -somehow (jenkins in my case) trigger a command to invoke the REST servi= ce >> -enjoy >> >> I did not find a REST service directly to trigger a reindex, thus the ha= ck >> with the scheduled job. Let me know if you find something better >> >> hope it helps, >> >> Alejandro >> >> [image: Inactive hide details for Jim McCaskey ---2013-03-14 >> 14:38:57---It's not a Maven build. It's an old legacy non-java (mostly) = b]Jim >> McCaskey ---2013-03-14 14:38:57---It's not a Maven build. It's an old >> legacy non-java (mostly) build that takes 1.5 hours to build, b >> >> From: Jim McCaskey >> To: Maven Users List , >> Date: 2013-03-14 14:38 >> Subject: RE: merge-maven-repos problems with maven-metadata.xml >> ------------------------------ >> >> >> >> It's not a Maven build. It's an old legacy non-java (mostly) build that >> takes 1.5 hours to build, but we still want to crank that whole thing wh= en >> there is a change. I don't publish the build till it is all done. I us= e a >> stub pom.xml to generate the staging-repo with a bunch of deploy executi= ons >> (which I will never show anyone in the Maven community for fear of being >> forever banned). Once that whole things works, then I merge that build >> into our SNAPSHOT repo. Works great except for the maven-metadata.xml >> files. >> >> I think this is the point where folks start telling me I'm doing it wron= g. >> :) Honestly, we do our pure Maven stuff "right", it's just this clunker >> that we have to hack around a little. >> >> Our non-SNAPSHOT builds work fine, I just did not know SNAPSHOT's where >> treated different, so now I'll have to come up with a workaround to get = the >> maven-metadata.xml files rigged properly. You can do that through the >> Nexus UI by clicking on the "Rebuild Metadata" button. Given that the >> Nexus folks make a big deal about everything being available through RES= T, >> there's got to be some way to do that programmatically. Anyone got a hi= nt? >> (I know, go ask on the Nexus list) >> >> -Jim >> >> -----Original Message----- >> From: Dan Tran [mailto:dantran@gmail.com ] >> Sent: Thursday, March 14, 2013 11:10 AM >> To: Maven Users List >> Subject: Re: merge-maven-repos problems with maven-metadata.xml >> >> You need to reindex for both cases any way since the repository is not >> aware of your changes. Without reindexing, it may not serve your new >> artifact. >> >> Just curious, why do you want to merge snaphot repo, why not just push >> the artifact directly to your snapshot repos? >> >> -D >> >> On Thu, Mar 14, 2013 at 6:57 AM, Jim McCaskey >> wrote: >> > Ouch... Is that documented somewhere? I checked the bug tracker and >> uncle Google and couldn't find anything regarding that. I went ahead an= d >> opened an issue in Jira: >> > >> > http://jira.codehaus.org/browse/MOJO-1913 >> > >> > I wonder what would be quicker. Finding a hack around or fixing the >> module. :) It would probably be easy to fire off a Nexus reindex of the >> effected artifacts which would "fix" the problem for me. >> > >> > -Jim >> > >> > -----Original Message----- >> > From: Dan Tran [mailto:dantran@gmail.com ] >> > Sent: Thursday, March 14, 2013 4:06 AM >> > To: Maven Users List >> > Subject: Re: merge-maven-repos problems with maven-metadata.xml >> > >> > merge-maven-repos mojo works with release repos ONLY. Merging >> > snapshot repos requires enhancement >> > >> > -Dan >> > >> > On Wed, Mar 13, 2013 at 11:29 AM, Jim McCaskey >> > wrote: >> >> Hello all, >> >> >> >> Below you will find a maven-metadata.xml file from my Nexus repositor= y >> (GAV changed to protect the innocent). What you will notice is that the >> timestamp and the do not match. I don't th= ink >> that it's a Nexus repo issue. Perhaps a bug in merge-maven-repos. >> >> >> >> I build the components to an empty directory using the >> altDeploymentRepository property: >> >> >> >> -DaltDeploymentRepository=3Drepo::default:: >> file://E:\builddir\staging-repo deploy >> >> >> >> I then publish this component to Nexus using this (using Maven 3.0.4)= : >> >> >> >> org.codehaus.mojo:wagon-maven-plugin:1.0-beta-4:merge-maven-repos >> >> >> >> This seems to work just fine for my non-SNAPSHOT builds. But the CI >> builds seem to get their maven-metadata.xml file messed up every time th= ose >> SNAPSHOT builds run. This took a while to track down because I run "Upd= ate >> Repositories Index" every night and Nexus fixes the maven-metadata.xml. >> And this is a very long build. >> >> >> >> FWIW, this is a shim between legacy code and our newer, all Maven bui= ld >> code. As you can tell we just zip that mess up and use it whole sale in >> downstream builds. >> >> >> >> Any thoughts on how I can fix this? Perhaps it's just a bug in >> wagon:merge-maven-repos? >> >> >> >> -Jim >> >> >> >> >> >> >> >> >> >> myGroup >> >> MyArtifact >> >> 10.2.6-SNAPSHOT >> >> >> >> >> >> 20130313.165705 >> >> 1 >> >> >> >> 20130313165705 >> >> >> >> >> >> MyClassifier >> >> zip >> >> 10.2.6-20130311.175410-1 >> >> 20130311175410 >> >> >> >> >> >> pom >> >> 10.2.6-20130311.175410-1 >> >> 20130311175410 >> >> >> >> >> >> >> >> >> >> >> >> NOTICE: All information in and attached to this email may be >> proprietary, confidential, privileged and otherwise protected from impro= per >> or erroneous disclosure. If you are not the sender's intended recipient, >> you are not authorized to intercept, read, print, retain, copy, forward,= or >> disseminate this message. >> >> >> >> >> >> --------------------------------------------------------------------- >> >> 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 >> > >> > >> > NOTICE: All information in and attached to this email may be >> proprietary, confidential, privileged and otherwise protected from impro= per >> or erroneous disclosure. If you are not the sender's intended recipient, >> you are not authorized to intercept, read, print, retain, copy, forward,= or >> disseminate this message. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org >> For additional commands, e-mail: users-help@maven.apache.org >> >> >> NOTICE: All information in and attached to this email may be proprietary= , >> confidential, privileged and otherwise protected from improper or errone= ous >> disclosure. If you are not the sender's intended recipient, you are not >> authorized to intercept, read, print, retain, copy, forward, or dissemin= ate >> this message. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org >> For additional commands, e-mail: users-help@maven.apache.org >> >> DISCLAIMER: Privileged and/or Confidential information may be contained = in >> this message. If you are not the addressee of this message, you may not >> copy, use or deliver this message to anyone. In such event, you should >> destroy the message and kindly notify the sender by reply e-mail. It is >> understood that opinions or conclusions that do not relate to the offici= al >> business of the company are neither given nor endorsed by the company. >> Thank You. >> >> > NOTICE: All information in and attached to this email may be proprietary,= confidential, privileged and otherwise protected from improper or erroneou= s disclosure. If you are not the sender's intended recipient, you are not a= uthorized to intercept, read, print, retain, copy, forward, or disseminate = this message. > > --------------------------------------------------------------------- > 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