ack, actually that isn't the snapshot version, it's the git commit.  But
it's the closest thing I know of.

On Mon, Aug 24, 2015 at 6:42 AM, Ben Podgursky <bpodgur...@gmail.com> wrote:

> Sorry for the late response,
>
> I think you can use this plugin:
> https://github.com/code54/buildversion-plugin
>
> "build-version" property will be the snapshot version.
>
> On Mon, Aug 24, 2015 at 1:52 AM, Gerd Aschbrenner <
> gaschbren...@picturesafe.de> wrote:
>
>> Hi Jeff,
>> I have no answer for your question, but maybe I have got a solution for
>> your problem.
>>
>> But you will be limited to only one running instance of your Jenkins
>> build pipeline.
>>
>> Take a look at the plugins:
>> * Copy Artifact Plugin
>> * Clean Workspace Plugin
>>
>> 1. Build your "myapp" with Jenkins
>> 2. Add the post build action "Archive Artifact"
>> 3. In the downstream project add a build step "Copy artifact from another
>> project"
>>
>> Now the artifact is in your workspace and you can work with it.
>>
>>
>> So what about the "Clean Workspace plugin"?
>> It is for stability. You can use it to clean the whole workspace (or only
>> the copied artifact of the previous build) before copying the artifact into
>> your downstream project.
>> This will ensure using a fresh copy of the artifact and not any old
>> (cached) build of it.
>>
>>
>> I use this plugins to collect some "last stable" artifacts from different
>> Jenkins projects and copy them to a test environment (publish-over-ssh
>> plugin).
>>
>>
>> Regards
>>    Gerd
>>
>>
>>
>> Am 21.08.2015 um 17:08 schrieb Jeff:
>>
>>> I should clarify that I want to find the specific SNAPSHOT version
>>> assigned
>>> by Nexus (or other maven repository manager applications) after the
>>> deploy.
>>>
>>> So after I deploy 'myapp.jar' to Nexus with GAV:
>>>
>>> groupID: mycompany.com
>>> artifactID: myapp
>>> version:  1.0-SNAPSHOT
>>>
>>>
>>> Nexus assigns it to something
>>> like /com/mycompany/myapp/1.0-SNAPSHOT/myapp-1.0-20150821.000538-120.jar
>>>
>>> I want to get the "20150821.000538-120" portion and also if possible the
>>> SHA1 hash Nexus generated.
>>>
>>> Thanks!
>>>
>>>
>>> On Fri, Aug 21, 2015 at 8:37 AM, Jeff<predato...@gmail.com>  wrote:
>>>
>>> In implementing a continuous deployment pipeline I would like to update
>>>> my
>>>> configuration tool with the specific SNAPSHOT version produced during
>>>> the
>>>> 'deploy' phase of the build.
>>>>
>>>> Ideally, I'd like to set an environment variable so that in Jenkins I
>>>> can
>>>> use it to trigger the downstream build.  Alternatively a file or
>>>> something
>>>> will work
>>>>
>>>> I've been searching Google and digging through the archives, but I
>>>> haven't
>>>> found a way yet.
>>>>
>>>> Is there a way to do this somehow using existing plugins or Maven
>>>> conventions?
>>>>
>>>> Thanks!
>>>>
>>>> --
>>>> Jeff Vincent
>>>> See my LinkedIn profile at:
>>>> http://www.linkedin.com/in/rjeffreyvincent
>>>>
>>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>
>

Reply via email to