How can I emit the SNAPSHOT version after deploy?

2015-08-21 Thread Jeff
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


Re: How can I emit the SNAPSHOT version after deploy?

2015-08-21 Thread 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




-- 
Jeff Vincent
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent


Re: Dependency Best Practices

2015-08-21 Thread Ron Wheeler

It is hard to understand your example.
Can you define child and grandchild and clarify where the 
dependencies are coming from (Third parties? Other children?)


In general, you use the parent to define properties and define the exact 
versions of dependencies in a dependency management section.

Children define the dependencies that they require but not the versions.

What is the choice that you are trying to make that you think needs to 
follow a best practice?
You might want to mention what kind of application you are building 
(language, type of app, target platform).


Ron

On 21/08/2015 5:37 AM, aalok singhvi wrote:

Hello,

Any best practices on how to arrange dependency in multi module maven
project.

Let me give an example

Parent Project
   Child1
   GrandChild1 ( Depedency1, Dependency2, Dependency3)
   GrandChild2 ( Depedency1, Dependency2, Dependency, 4)
   GrandChild3  (Depedency1, Dependency2, Dependency, 5)
   GrandChild4
 (Depedency1, Dependency2, Dependency3, Dependency4, Dependency,
5)
   Child2
   GrandChild1 ( Depedency1, Dependency2, Dependency3)
   GrandChild2 ( Depedency1, Dependency2, Dependency, 4)
   GrandChild3  (Depedency1, Dependency2, Dependency, 5)
   GrandChild4
 (Depedency1, Dependency2, Dependency3, Dependency4, Dependency,
5)

How can you set dependency properly so that it will available to
GrandChild4 as well.

Looking forward to your reply.

Thanks




--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: How can I emit the SNAPSHOT version after deploy?

2015-08-21 Thread Dan Tran
Not possible at this moment, I ended up to download the maven-metadata.xml
and extract the info after deploy.

However, I do believe this is a good enhancement for maven-deploy-plugin,
please file enhancement request for it

-Dan

On Fri, Aug 21, 2015 at 8:08 AM, Jeff predato...@gmail.com wrote:

 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
 



 --
 Jeff Vincent
 See my LinkedIn profile at:
 http://www.linkedin.com/in/rjeffreyvincent



Re: How can I emit the SNAPSHOT version after deploy?

2015-08-21 Thread Martin Desruisseaux
Hello Jeff

I also wanted to do something similar a while ago. But in my attempt in
a multi-modules project, each modules got a slightly different
timestamp. Building from the root of a project having modules A, B and C
gave me the following timestamps:

A: 20150702.165421-17
B: 20150702.165432-17
C: 20150702.165454-17

It looks like that Maven generates an individual timestamp from the time
at which each sub-module is built, instead that a unique timestamp for
the whole project. This make difficult the usage of a single property
for the timestamp portion if the project has more than one module.

Martin



Le 21/08/15 11:08, Jeff a écrit :
 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!



Re: How can I emit the SNAPSHOT version after deploy?

2015-08-21 Thread Jörg Schaible
Hi Jeff,

Jeff wrote:

 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.

What happens if you use dependency:get to download the SNAPHSOT? You might 
find it then in your local repository as timestamped version (depending on 
your settings in updatePolicy (always) for the snapshot repo).

Cheers,
Jörg



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: How can I emit the SNAPSHOT version after deploy?

2015-08-21 Thread Jeff
That could be a backup option but I'd definitely prefer to have it done as
part of the same build step.  Thanks for the suggestion.

On Fri, Aug 21, 2015 at 11:15 AM, Jörg Schaible 
joerg.schai...@swisspost.com wrote:

 Hi Jeff,

 Jeff wrote:

  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.

 What happens if you use dependency:get to download the SNAPHSOT? You
 might
 find it then in your local repository as timestamped version (depending on
 your settings in updatePolicy (always) for the snapshot repo).

 Cheers,
 Jörg



 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




-- 
Jeff Vincent
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent


Dependency Best Practices

2015-08-21 Thread aalok singhvi
Hello,

Any best practices on how to arrange dependency in multi module maven
project.

Let me give an example

Parent Project
  Child1
  GrandChild1 ( Depedency1, Dependency2, Dependency3)
  GrandChild2 ( Depedency1, Dependency2, Dependency, 4)
  GrandChild3  (Depedency1, Dependency2, Dependency, 5)
  GrandChild4
(Depedency1, Dependency2, Dependency3, Dependency4, Dependency,
5)
  Child2
  GrandChild1 ( Depedency1, Dependency2, Dependency3)
  GrandChild2 ( Depedency1, Dependency2, Dependency, 4)
  GrandChild3  (Depedency1, Dependency2, Dependency, 5)
  GrandChild4
(Depedency1, Dependency2, Dependency3, Dependency4, Dependency,
5)

How can you set dependency properly so that it will available to
GrandChild4 as well.

Looking forward to your reply.

Thanks

-- 
Aalok Singhvi