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 4D8541021F for ; Tue, 22 Oct 2013 13:39:56 +0000 (UTC) Received: (qmail 52673 invoked by uid 500); 22 Oct 2013 13:39:50 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 49704 invoked by uid 500); 22 Oct 2013 13:39:36 -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 49483 invoked by uid 99); 22 Oct 2013 13:39:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Oct 2013 13:39:32 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Adam.Downer@gamesys.co.uk designates 93.93.84.17 as permitted sender) Received: from [93.93.84.17] (HELO mx01.gamesys.co.uk) (93.93.84.17) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Oct 2013 13:39:28 +0000 Received: from LDNEX12.Gamesys.corp (unknown [10.224.130.13]) by mx01.gamesys.co.uk (Postfix) with ESMTP id 4CE7ACB9FE for ; Tue, 22 Oct 2013 13:39:07 +0000 (UTC) Received: from LDNEX22.Gamesys.corp ([169.254.4.149]) by LDNEX12.Gamesys.corp ([::1]) with mapi id 14.02.0318.001; Tue, 22 Oct 2013 14:39:07 +0100 From: Adam Downer To: Maven Users List Subject: Re: passing the deployed artifact URL to another system Thread-Topic: passing the deployed artifact URL to another system Thread-Index: AQHOzkRbo1zZuxfQSEOzH1PJiHNampn/BW8AgAAfmQCAACsZgIAABR4AgAEsGYCAABGRAIAAKLyA Date: Tue, 22 Oct 2013 13:39:06 +0000 Message-ID: In-Reply-To: <7081B463-4705-4221-8F17-E2672FC0A882@gold-family.us> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.224.196.10] x-exclaimer-md-config: 082f0562-b41b-471a-8bd8-7031576410b5 Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hi Russ, Can you specify individual timestamped snapshots in a GAV based request? Anders, I will look into the nexus pro/plugin | Artifactory route, thanks. Regards Adam D On 22/10/2013 13:13, "Russell Gold" wrote: >HI Adam, > >I'd think this would be easier to handle using the artifacts' GAV >coordinates directly rather than the remote URL. Those should be >predictable and you'd probably use Maven to download them anyway. So why >not use the coordinates as your key? > >- Russ > >On Oct 22, 2013, at 6:10 AM, Adam Downer >wrote: > >> Hi Curtis, >>=20 >> A little bit more background information. I hope this illustrates better >> what I am trying to achieve. >>=20 >> The tool I am writing is not another repository of actual software or >>any >> of the information already stored in nexus (SHA1's etc.) but a database >>of >> extra metadata about deployable artifacts that nexus doesn't already >>store >> using the absolute URL as a key. It is focused on deployments of my >> companies own software. It will not be trying to store data on third >>party >> jars which, as you correctly point out, I can't hope to maintain an >>index >> for all that and with nexus running a proxy group for optimal access to >> all the external repos the devs use, the resolved download location >>could >> be different in each case. >>=20 >>> If I understand correctly, you are trying to derive a remote repository >>> path from a GAV. Is that correct? Firstly, I will second what Stephen >>> pointed out: the deploy path (i.e., for upload) is not the same thing >>>as >>> the resolution path (i.e., for downloading again later). I am guessing >>> your >>> application actually cares about where these artifacts (and their POMs) >>> can >>> be downloaded, rather than what path was actually used at deploy time. >>>=20 >>> If so, is there something wrong with simply having a hardcoded list of >>> repository base URLs, from which you can scan for the GAVs? That's >>>pretty >>> much what Maven does with its elements. >>=20 >> If by remote repository path you mean maven central or other externally >> host location, no I am not trying to do that. This is only for my >>locally >> hosted internal release repository which contains a finite set of known >> projects. I don't really want to guess at the path based on GAV as I >>will >> have to make assumptions about the repo location which means hard coding >> it which, in turn, means more maintenance should I change the nexus >> service in some way. As I see it, the maven deploy has code takes all >>this >> into account when it is building the artifact. So I don't want to >>reinvent >> the wheel, just take advantage of code that already does what I want, >>but >> doesn't expose it in a way I can currently use. >>=20 >> The tools database will contain the fully resolved nexus URL of an >> artefact: >>=20 >>http://nexus.mycompany/content/repositories/repo_name/group/artifact/vers >>io >> n/artifact.jar >>=20 >> Not an interpreted route to the artefact: >>=20 >>http://nexus.mycompany/service/local/artifact/maven/resolve?g=3Dgroup&a= =3Dart >>if >> act&v=3D1.2.3&r=3Drepo_name&e=3Djar >>=20 >> The absolute URL of the artefact is used by our deployment scripts to >> download the artefact it wants to deploy. I am going to make our >> deployment scripts query the new application to check for certain flags >> (smoke tested, etc.) before allowing the deploy to proceed. >>=20 >>=20 >> To that end I need to populate the database as new items get built. My >> thought was to use maven to do this as (at build time) maven knows the >> absolute URL of the artifact. Or at least it gives the impression it >>does >> as it displays it in the console during the deploy phase. >>=20 >>> [INFO] [deploy:deploy {execution: default-deploy}] >>> [INFO] Retrieving previous build number from deploy-snapshots >>> Uploading: >>>=20 >>>=20 >>>http://nexus.mycompany/content/repositories/repo_name/group/artifact/ver >>>si >>> o >>> n/artifact.jar >>=20 >>=20 >> If there is an alternative way to achieve this I am open to any >> suggestions. For instance maybe I should write a script which runs from >> the nexus box and fires off constructed URLs to a rest endpoint as the >> file system changes. But this doesn't seem as elegant a solution as a >> maven based one. >>=20 >> Regards >>=20 >> Adam D >>=20 >>=20 >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org >> For additional commands, e-mail: users-help@maven.apache.org >>=20 > >----------------- >Author, Getting Started with Apache Maven > > >Come read my webnovel, Take a Lemon , >and listen to the Misfile radio play >! > > > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org