maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell Gold <r...@gold-family.us>
Subject Re: passing the deployed artifact URL to another system
Date Mon, 21 Oct 2013 16:58:07 GMT
There is a free version of nexus available; it is quite easy to configure. Why do you want
to avoid the tools with which maven works best? A repository manager of some kind is a basic
assumption of much of the way maven users work. It seems as though you are going out of your
way to make it hard for yourself.

On Oct 21, 2013, at 9:23 AM, Adam Downer <Adam.Downer@Gamesys.co.uk> wrote:

> Thanks for your reply Stephen,
> 
> So, in my case at least, things are pretty simple....
> 
> - No nexus pro. So no staging or other middle man type repos.
> - No repository grouping. Releases is releases and snapshots is snapshots
> (we have restrictions on who can access what and setting up groups made
> this harder to manage effectively.
> 
> My builds upload to
> http://nexus.mycompany/content/repositories/repo_name/group/artifact/versio
> n/artifact.jar
> 
> Then production deployment will reference
> http://nexus.mycompany/content/repositories/repo_name/group/artifact/versio
> n/artifact.jar to get it on the environment.
> 
> I agree that people with more complicated setups (involving proxies,
> staging repos, groups and non-nexus) will not find this so useful but I
> still find it hard to believe that no one else has wanted to pass a
> download url of an artifact from one build to another, maybe as a
> parameter in a deployment script for instance.
> 
> The build process outputs the full URL to the console during the build.
> 
> [INFO] [deploy:deploy {execution: default-deploy}]
> [INFO] Retrieving previous build number from deploy-snapshots
> Uploading: 
> http://nexus.mycompany/content/repositories/repo_name/group/artifact/versio
> n/artifact.jar
> 4/7757K
> 
> ...
> 
> So the URL is constructed somewhere in the maven execution to be used by
> the deploy phase. Even if you can only point me to the maven deploy code
> which does the construct, that would be helpful.
> 
> 
> On 21/10/2013 13:30, "Stephen Connolly" <stephen.alan.connolly@gmail.com>
> wrote:
> 
>> These are not the droids you are looking for...
>> 
>> Also, this is not the problem you want to solve... Nexus Pro has this nice
>> feature called staging whereby the URL you deploy to is not the same URL
>> that people download from. I know Artifactory has similar features.
>> 
>> The final nail in the coffin is that very often the deployment repository
>> is not configured as the download repository, as you deploy into an
>> internal repository but download from a group proxying repository (so that
>> you get fast builds by only asking 1 repository)
>> 
>> For the 99% the deploy URL is not the same as the download URL, so the
>> best
>> you can do is query the attached artifact to determine the timestamp that
>> was used (for -SNAPSHOT deployment) and then construct the URL based off
>> the configured download URL that you expect to be downstream from where
>> you
>> made your deployment
>> 
>> 
>> On 21 October 2013 11:00, Adam Downer <Adam.Downer@gamesys.co.uk> wrote:
>> 
>>> Hi users,
>>> 
>>> I was wondering if there was a simple way to achieve the following. I
>>> have
>>> looked at the deploy plugin project pages, searched the mailing list and
>>> interwebs and I can't find examples of what I am trying to do or a
>>> possible
>>> method for me to achieve it.
>>> 
>>> I use maven to upload software to a nexus repository, no fancy tricks
>>> just
>>> jars and wars put into snapshot and release repositories.
>>> I have written a small app which collates data about where artifacts
>>> have
>>> been deployed and what tests have been run against them.
>>> 
>>> My problem is this. I want to store the full nexus url of artifacts in
>>> my
>>> other app, to use as the main reference for data about them. I started
>>> writing a maven plugin to achieve this (passing the URL in an HTML post
>>> as
>>> data) but I can't find a way to get the deploy URL which is used during
>>> the
>>> deploy phase of the maven build.
>>> 
>>> I thought about constructing the url myself as the pattern is formulaic,
>>> but it involves timestamps, which if I generate again will be different
>>> to
>>> the real ones.
>>> 
>>> If anyone knows a way to achieve this or can share examples of a way it
>>> has been done. I would be most appreciative.
>>> 
>>> Regards
>>> 
>>> Adam D
>>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

-----------------
Author, Getting Started with Apache Maven <http://www.packtpub.com/getting-started-with-apache-maven/video>

Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 
and listen to the Misfile radio play <http://www.fuzzyfacetheater.com/misfile/>!








Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message