Return-Path: Delivered-To: apmail-ant-ivy-user-archive@www.apache.org Received: (qmail 94286 invoked from network); 30 Jul 2009 21:31:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Jul 2009 21:31:14 -0000 Received: (qmail 67680 invoked by uid 500); 30 Jul 2009 21:31:14 -0000 Delivered-To: apmail-ant-ivy-user-archive@ant.apache.org Received: (qmail 67618 invoked by uid 500); 30 Jul 2009 21:31:14 -0000 Mailing-List: contact ivy-user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ivy-user@ant.apache.org Delivered-To: mailing list ivy-user@ant.apache.org Received: (qmail 67607 invoked by uid 99); 30 Jul 2009 21:31:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jul 2009 21:31:14 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [68.142.200.146] (HELO web30803.mail.mud.yahoo.com) (68.142.200.146) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 30 Jul 2009 21:31:03 +0000 Received: (qmail 72695 invoked by uid 60001); 30 Jul 2009 21:30:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1248989442; bh=ZS7EeLUScc5UH+JFc05e4CYMmTJfOR3xUAgIl8Ej3uM=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=OMRpHbwc1qV5O5VIbeIyFa0iC0C2C2DvvTeoBg+51bk8vNzZWjsnpfdkU2W1oSkBdfs3S2jCoY6Uu6O1XOJsdouyf3cgFC6gGnJbVkWb2nXPYhW7iDyIL1nIVYQtP81T7MuP8+JFpuYwfy7qZVCRpEuVZi0uVv1PO/UltqP4dok= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=qS5Dc39cPy63v1r+qnBfHwou9ZZm1di00TDgS85SYssOFFmxrarxmqK8ikZFNstq3GVqMMYFlJ3SuDBqK0lJ/gbhbVrw4KokYC0mjGHXS1rVANAcz/4wB05z5GCrmVkQWcaPaj42t9KOo3hWGxBOInxKqIKmOJDfmwns3Yxsa9w=; Message-ID: <53330.71283.qm@web30803.mail.mud.yahoo.com> X-YMail-OSG: 9NOuvnAVM1kRRUMZtq3fPGP5WaNeg_nEvxRI_CGBntKJkfTJ7dD8qUZwAqyWrvRP7N9o6e5gkYlY00L4sEmYtMhRd7DUVXCixEK3hKa0BOzmhH6iJESUKFzSPfG4.Lm9KBVKuIQU6h3KeadaeNOOJjUDPJrukTJIXCnr3hdbE_2W0SGZXIaDCtTxZoYDOovFawseIacuGozWsG9Y6dYLTGHAvRmdI7tzNn0.Qp7JdUpAbm3BEed0JH7J4jbY52bCUEgskGvlqzFtZ._XXn7DSliKLBTRxadSDN7zGREjQhzoxC0Zh2TeoxK1S5Mb_4exbvzm6yqQF4dhXz_wgDi6cvFg0T2qmYvOhmgK3v4H Received: from [81.242.193.175] by web30803.mail.mud.yahoo.com via HTTP; Thu, 30 Jul 2009 14:30:41 PDT X-Mailer: YahooMailRC/1358.22 YahooMailWebService/0.7.289.15 References: Date: Thu, 30 Jul 2009 14:30:41 -0700 (PDT) From: Maarten Coene Subject: Re: Using ivy:buildnumber with more than one url resolver To: ivy-user@ant.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked by ClamAV on apache.org Could you open a JIRA issue and post your full Ant log there, together with your settings.xml and build.xml Maarten ----- Original Message ---- From: "Glidden, Douglass A" To: ivy-user@ant.apache.org Sent: Thursday, July 30, 2009 8:15:03 PM Subject: Using ivy:buildnumber with more than one url resolver Hi, I've run into some weird behavior when the ivy buildnumber task is used with a url resolver more than once in the same build. Here's a sample scenario: Included in my resolvers are a releases resolver and a snapshots resolver, which run against two repositories in the same Nexus repository manager. The snapshot revision number is based on the current release revision number, e.g. if the latest revision in the releases repository is 0.6 then any new snapshots created should be 0.7-SNAPSHOT-# (where # is incremented with each new snapshot created). My build then first runs ivy:buildnumber against the releases resolver, then uses the result of that in running ivy:buildnumber against the snapshots resolver. The problem is that ivy:buildnumber doesn't construct the URL correctly when it is re-run. Here are relevant excerpts from the debug output: When ivy:buildnumber is run against the releases resolver, then against the snapshots resolver: ... [ivy:buildnumber] using releases to list all in http://nexus.myorg.com:8081/nexus/content/repositories/releases/myorg/myproject/ [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.com:8081/nexus/content/repositories/releases/myorg/myproject/0.6/]. [ivy:buildnumber] found 1 resources [ivy:buildnumber] using releases to list all in http://nexus.myorg.com:8081/nexus/content/repositories/releases/myorg/myproject/ [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.com:8081/nexus/content/repositories/releases/myorg/myproject/0.6/]. [ivy:buildnumber] found 1 resources [ivy:buildnumber] using releases to list all in http://nexus.myorg.com:8081/nexus/content/repositories/releases/myorg/myproject/0.6 [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.com:8081/nexus/content/repositories/releases/myorg/myproject/0.6/ivy-0.6.xml]. [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.com:8081/nexus/content/repositories/releases/myorg/myproject/0.6/ivy-0.6.xml.md5]. [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.com:8081/nexus/content/repositories/releases/myorg/myproject/0.6/ivy-0.6.xml.sha1]. [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.com:8081/nexus/content/repositories/releases/myorg/myproject/0.6/myproject-0.6.jar]. [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.com:8081/nexus/content/repositories/releases/myorg/myproject/0.6/myproject-0.6.jar.md5]. [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.com:8081/nexus/content/repositories/releases/myorg/myproject/0.6/myproject-0.6.jar.sha1]. [ivy:buildnumber] found 6 urls [ivy:buildnumber] 1 matched http://nexus.myorg.com:8081/nexus/content/repositories/releases/myorg/myproject/0.6/[artifact]-0.6.jar ... [ivy:buildnumber] using snapshots to list all in http://nexus.myorg.myorg:8081/nexus/content/repositories/snapshots/ [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.myorg:8081/nexus/content/repositories/snapshots/.meta/]. [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.myorg:8081/nexus/content/repositories/snapshots/myorg/]. [ivy:buildnumber] found 2 resources [ivy:buildnumber] using snapshots to list all in http://nexus.myorg.myorg:8081/nexus/content/repositories/snapshots/ [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.myorg:8081/nexus/content/repositories/snapshots/.meta/]. [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.myorg:8081/nexus/content/repositories/snapshots/myorg/]. [ivy:buildnumber] found 2 resources ... As you can see, when it runs against the snapshots resolver, it leaves off the organisation and module tokens from the URL. The problem is not with the settings for the snapshots resolver, though, because when ivy:buildnumber is run against the snapshots resolver without first running it against the releases resolver, the output is normal: ... [ivy:buildnumber] using snapshots to list all in http://nexus.myorg.com:8081/nexus/content/repositories/snapshots/myorg/myproject/ [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.com:8081/nexus/content/repositories/snapshots/myorg/myproject/0.7-SNAPSHOT-1/]. [ivy:buildnumber] found 1 resources [ivy:buildnumber] using snapshots to list all in http://nexus.myorg.com:8081/nexus/content/repositories/snapshots/myorg/myproject/ [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.com:8081/nexus/content/repositories/snapshots/myorg/myproject/0.7-SNAPSHOT-1/]. [ivy:buildnumber] found 1 resources [ivy:buildnumber] using snapshots to list all in http://nexus.myorg.com:8081/nexus/content/repositories/snapshots/myorg/myproject/0.7-SNAPSHOT-1 [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.com:8081/nexus/content/repositories/snapshots/myorg/myproject/0.7-SNAPSHOT-1/ivy-0.7-SNAPSHOT-1.xml]. [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.com:8081/nexus/content/repositories/snapshots/myorg/myproject/0.7-SNAPSHOT-1/ivy-0.7-SNAPSHOT-1.xml.md5]. [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.com:8081/nexus/content/repositories/snapshots/myorg/myproject/0.7-SNAPSHOT-1/ivy-0.7-SNAPSHOT-1.xml.sha1]. [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.com:8081/nexus/content/repositories/snapshots/myorg/myproject/0.7-SNAPSHOT-1/myproject-0.7-SNAPSHOT-1.jar]. [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.com:8081/nexus/content/repositories/snapshots/myorg/myproject/0.7-SNAPSHOT-1/myproject-0.7-SNAPSHOT-1.jar.md5]. [ivy:buildnumber] ApacheURLLister found URL=[http://nexus.myorg.com:8081/nexus/content/repositories/snapshots/myorg/myproject/0.7-SNAPSHOT-1/myproject-0.7-SNAPSHOT-1.jar.sha1]. [ivy:buildnumber] found 6 urls [ivy:buildnumber] 1 matched http://nexus.myorg.com:8081/nexus/content/repositories/snapshots/myorg/myproject/0.7-SNAPSHOT-1/[artifact]-0.7-SNAPSHOT-1.jar ... Relevant portions from the properties and ivysettings files: ... ivy.nexus.default.artifact.pattern=[organisation]/[module]/[revision]/[artifact]-[revision].[ext] ivy.nexus.default.ivy.pattern=[organisation]/[module]/[revision]/ivy-[revision].xml ivy.nexus.repositories.path=content/repositories ivy.nexus.releases.path=${ivy.nexus.repositories.path}/releases ivy.nexus.snapshots.path=${ivy.nexus.repositories.path}/snapshots ivy.nexus.url=http://nexus.myorg.com:8081/nexus ... ... ... The build file has two trivial targets; one calls ivy:buildnumber against the releases resolver and the other calls it against the snapshots resolver. Either target produces correct results when it is run by itself, but when both targets are run (regardless of order), the second one to be run always shows the behavior described above. Is this a bug or am I doing something wrong here? Thanks, Doug Glidden Software Engineer The Boeing Company Douglass.A.Glidden@boeing.com