You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Max Spring <m2...@springdot.org> on 2012/08/29 01:26:40 UTC

alternative deploy strategy

To speed up my large Maven build I'm thinking of using a "local-remote" repository sitting on the local file system.

1) build would start with a wiped local-remote repository
2) build's deploys into the local-remote repository
3) if build finished successfully, artifacts in the local-remote repository get deployed into the real remote group repository.

(The benefits would be that nothing gets deployed until the build succeeds and the build result is available sooner.)

Are there tools which would help with 3) ?
I've looked into the Nexus Command Line Tools [1], but they don't do what I want.

Alternatively I could write my own using the Maven API, I suppose.

-Max

[1] https://docs.sonatype.com/display/SPRTNXOSS/Nexus+Command+Line+Tools

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


Re: alternative deploy strategy

Posted by Max Spring <m2...@springdot.org>.
Indeed, this sounds like a promising approach.
Thanks!
-Max

On 08/28/2012 11:47 PM, Manfred Moser wrote:
> Hm.. if you are using Nexus Pro with the 2.1 release and the nexus staging
> maven plugin you get local creation of a staging bundle in the target
> folder and atomic upload to the repo .. which only happens after
> successful build including on multi module projects.
>
> I think this does what you want..
>
> manfred
>
> PS: You might want to move this discussion to the Nexus mailing list..
>
> On Tue, August 28, 2012 9:17 pm, Max Spring wrote:
>> I do use Nexus for the group repositories.
>> Using Nexus also locally defeats the purpose.
>> The deploy to a file://... repo gives me the performance I'm looking for.
>>
>> Nexus Pro's staging feature would give me what I want, but I'd still have
>> to transport via HTTP.
>>
>> -Max
>>
>>
>> On 08/28/2012 09:05 PM, Manfred Moser wrote:
>>> On Tue, August 28, 2012 4:26 pm, Max Spring wrote:
>>>> To speed up my large Maven build I'm thinking of using a "local-remote"
>>>> repository sitting on the local file system.
>>>>
>>>> 1) build would start with a wiped local-remote repository
>>>> 2) build's deploys into the local-remote repository
>>>> 3) if build finished successfully, artifacts in the local-remote
>>>> repository get deployed into the real remote group repository.
>>>>
>>>> (The benefits would be that nothing gets deployed until the build
>>>> succeeds
>>>> and the build result is available sooner.)
>>>>
>>>> Are there tools which would help with 3) ?
>>>> I've looked into the Nexus Command Line Tools [1], but they don't do
>>>> what
>>>> I want.
>>>>
>>>> Alternatively I could write my own using the Maven API, I suppose.
>>>
>>> Why not just use a local deployment of Nexus?
>>>
>>> manfred
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


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


Re: alternative deploy strategy

Posted by Manfred Moser <ma...@mosabuam.com>.
Hm.. if you are using Nexus Pro with the 2.1 release and the nexus staging
maven plugin you get local creation of a staging bundle in the target
folder and atomic upload to the repo .. which only happens after
successful build including on multi module projects.

I think this does what you want..

manfred

PS: You might want to move this discussion to the Nexus mailing list..

On Tue, August 28, 2012 9:17 pm, Max Spring wrote:
> I do use Nexus for the group repositories.
> Using Nexus also locally defeats the purpose.
> The deploy to a file://... repo gives me the performance I'm looking for.
>
> Nexus Pro's staging feature would give me what I want, but I'd still have
> to transport via HTTP.
>
> -Max
>
>
> On 08/28/2012 09:05 PM, Manfred Moser wrote:
>> On Tue, August 28, 2012 4:26 pm, Max Spring wrote:
>>> To speed up my large Maven build I'm thinking of using a "local-remote"
>>> repository sitting on the local file system.
>>>
>>> 1) build would start with a wiped local-remote repository
>>> 2) build's deploys into the local-remote repository
>>> 3) if build finished successfully, artifacts in the local-remote
>>> repository get deployed into the real remote group repository.
>>>
>>> (The benefits would be that nothing gets deployed until the build
>>> succeeds
>>> and the build result is available sooner.)
>>>
>>> Are there tools which would help with 3) ?
>>> I've looked into the Nexus Command Line Tools [1], but they don't do
>>> what
>>> I want.
>>>
>>> Alternatively I could write my own using the Maven API, I suppose.
>>
>> Why not just use a local deployment of Nexus?
>>
>> manfred
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


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


RE: alternative deploy strategy

Posted by "Lyons, Roy" <Ro...@cmegroup.com>.
one word of caution here.  I've employed rsync in the past.  the only issue is maven-metadata.xml is not fixed up (and you have to exclude it from your rsync or you will royally mess it up)...  you also have a bunch of other crap files which aren't used in the main repo...

**/* .lastUpdated
**/ _maven.repositories


It also only uses sha1 in local repo, and so md5 will be missing.


Just some friendly advice...  It may be more pain than you are thinking.

-----Original Message-----
From: Max Spring [mailto:m2spring@springdot.org] 
Sent: Wednesday, August 29, 2012 10:15 AM
To: users@maven.apache.org
Subject: Re: alternative deploy strategy

I'm thinking of rsync'ing the "local-remote" repository to the machine running Nexus.
Then I'd do the deploy via HTTP (localhost) which would avoid the wire.

So, I'd preserve the auth.

Keeping the copy of the "local-remote" repository around on the Nexus machine would improve the next build's rsync.

-Max


On 08/28/2012 11:52 PM, Anders Hammar wrote:
> If you want to bypass the Repo manager (normally what happens if you 
> don't deploy through HTTP) you will also bypass authentication, 
> authorization, and other good stuff that a repo manager helps you 
> with. Don't do that!
>
> /Anders
>
> On Wed, Aug 29, 2012 at 6:17 AM, Max Spring <m2...@springdot.org> wrote:
>> I do use Nexus for the group repositories.
>> Using Nexus also locally defeats the purpose.
>> The deploy to a file://... repo gives me the performance I'm looking for.
>>
>> Nexus Pro's staging feature would give me what I want, but I'd still 
>> have to transport via HTTP.
>>
>> -Max
>>
>>
>>
>> On 08/28/2012 09:05 PM, Manfred Moser wrote:
>>>
>>> On Tue, August 28, 2012 4:26 pm, Max Spring wrote:
>>>>
>>>> To speed up my large Maven build I'm thinking of using a "local-remote"
>>>> repository sitting on the local file system.
>>>>
>>>> 1) build would start with a wiped local-remote repository
>>>> 2) build's deploys into the local-remote repository
>>>> 3) if build finished successfully, artifacts in the local-remote 
>>>> repository get deployed into the real remote group repository.
>>>>
>>>> (The benefits would be that nothing gets deployed until the build 
>>>> succeeds and the build result is available sooner.)
>>>>
>>>> Are there tools which would help with 3) ?
>>>> I've looked into the Nexus Command Line Tools [1], but they don't 
>>>> do what I want.
>>>>
>>>> Alternatively I could write my own using the Maven API, I suppose.
>>>
>>>
>>> Why not just use a local deployment of Nexus?
>>>
>>> manfred
>>>
>>>
>>> --------------------------------------------------------------------
>>> - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


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


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


Re: alternative deploy strategy

Posted by Max Spring <m2...@springdot.org>.
I'm thinking of rsync'ing the "local-remote" repository to the machine running Nexus.
Then I'd do the deploy via HTTP (localhost) which would avoid the wire.

So, I'd preserve the auth.

Keeping the copy of the "local-remote" repository around on the Nexus machine would improve the next build's rsync.

-Max


On 08/28/2012 11:52 PM, Anders Hammar wrote:
> If you want to bypass the Repo manager (normally what happens if you
> don't deploy through HTTP) you will also bypass authentication,
> authorization, and other good stuff that a repo manager helps you
> with. Don't do that!
>
> /Anders
>
> On Wed, Aug 29, 2012 at 6:17 AM, Max Spring <m2...@springdot.org> wrote:
>> I do use Nexus for the group repositories.
>> Using Nexus also locally defeats the purpose.
>> The deploy to a file://... repo gives me the performance I'm looking for.
>>
>> Nexus Pro's staging feature would give me what I want, but I'd still have to
>> transport via HTTP.
>>
>> -Max
>>
>>
>>
>> On 08/28/2012 09:05 PM, Manfred Moser wrote:
>>>
>>> On Tue, August 28, 2012 4:26 pm, Max Spring wrote:
>>>>
>>>> To speed up my large Maven build I'm thinking of using a "local-remote"
>>>> repository sitting on the local file system.
>>>>
>>>> 1) build would start with a wiped local-remote repository
>>>> 2) build's deploys into the local-remote repository
>>>> 3) if build finished successfully, artifacts in the local-remote
>>>> repository get deployed into the real remote group repository.
>>>>
>>>> (The benefits would be that nothing gets deployed until the build
>>>> succeeds
>>>> and the build result is available sooner.)
>>>>
>>>> Are there tools which would help with 3) ?
>>>> I've looked into the Nexus Command Line Tools [1], but they don't do what
>>>> I want.
>>>>
>>>> Alternatively I could write my own using the Maven API, I suppose.
>>>
>>>
>>> Why not just use a local deployment of Nexus?
>>>
>>> manfred
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


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


Re: alternative deploy strategy

Posted by Anders Hammar <an...@hammar.net>.
If you want to bypass the Repo manager (normally what happens if you
don't deploy through HTTP) you will also bypass authentication,
authorization, and other good stuff that a repo manager helps you
with. Don't do that!

/Anders

On Wed, Aug 29, 2012 at 6:17 AM, Max Spring <m2...@springdot.org> wrote:
> I do use Nexus for the group repositories.
> Using Nexus also locally defeats the purpose.
> The deploy to a file://... repo gives me the performance I'm looking for.
>
> Nexus Pro's staging feature would give me what I want, but I'd still have to
> transport via HTTP.
>
> -Max
>
>
>
> On 08/28/2012 09:05 PM, Manfred Moser wrote:
>>
>> On Tue, August 28, 2012 4:26 pm, Max Spring wrote:
>>>
>>> To speed up my large Maven build I'm thinking of using a "local-remote"
>>> repository sitting on the local file system.
>>>
>>> 1) build would start with a wiped local-remote repository
>>> 2) build's deploys into the local-remote repository
>>> 3) if build finished successfully, artifacts in the local-remote
>>> repository get deployed into the real remote group repository.
>>>
>>> (The benefits would be that nothing gets deployed until the build
>>> succeeds
>>> and the build result is available sooner.)
>>>
>>> Are there tools which would help with 3) ?
>>> I've looked into the Nexus Command Line Tools [1], but they don't do what
>>> I want.
>>>
>>> Alternatively I could write my own using the Maven API, I suppose.
>>
>>
>> Why not just use a local deployment of Nexus?
>>
>> manfred
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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


Re: alternative deploy strategy

Posted by Max Spring <m2...@springdot.org>.
I do use Nexus for the group repositories.
Using Nexus also locally defeats the purpose.
The deploy to a file://... repo gives me the performance I'm looking for.

Nexus Pro's staging feature would give me what I want, but I'd still have to transport via HTTP.

-Max


On 08/28/2012 09:05 PM, Manfred Moser wrote:
> On Tue, August 28, 2012 4:26 pm, Max Spring wrote:
>> To speed up my large Maven build I'm thinking of using a "local-remote"
>> repository sitting on the local file system.
>>
>> 1) build would start with a wiped local-remote repository
>> 2) build's deploys into the local-remote repository
>> 3) if build finished successfully, artifacts in the local-remote
>> repository get deployed into the real remote group repository.
>>
>> (The benefits would be that nothing gets deployed until the build succeeds
>> and the build result is available sooner.)
>>
>> Are there tools which would help with 3) ?
>> I've looked into the Nexus Command Line Tools [1], but they don't do what
>> I want.
>>
>> Alternatively I could write my own using the Maven API, I suppose.
>
> Why not just use a local deployment of Nexus?
>
> manfred
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


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


Re: alternative deploy strategy

Posted by Manfred Moser <ma...@mosabuam.com>.
On Tue, August 28, 2012 4:26 pm, Max Spring wrote:
> To speed up my large Maven build I'm thinking of using a "local-remote"
> repository sitting on the local file system.
>
> 1) build would start with a wiped local-remote repository
> 2) build's deploys into the local-remote repository
> 3) if build finished successfully, artifacts in the local-remote
> repository get deployed into the real remote group repository.
>
> (The benefits would be that nothing gets deployed until the build succeeds
> and the build result is available sooner.)
>
> Are there tools which would help with 3) ?
> I've looked into the Nexus Command Line Tools [1], but they don't do what
> I want.
>
> Alternatively I could write my own using the Maven API, I suppose.

Why not just use a local deployment of Nexus?

manfred


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


RE: alternative deploy strategy

Posted by "Lyons, Roy" <Ro...@cmegroup.com>.
Actually, the command line tools for nexus do this.  I guess the only gotcha is that it works with staging, and staging is only valid with release deployments, not with snapshot.

Perhaps they can enhance the tool to do pseudo-staging for snapshots as well, with automatic promotion to the full snapshot repository.

*nudge nudge Sonatype*

-----Original Message-----
From: Max Spring [mailto:m2spring@springdot.org] 
Sent: Tuesday, August 28, 2012 6:27 PM
To: users@maven.apache.org
Subject: alternative deploy strategy

To speed up my large Maven build I'm thinking of using a "local-remote" repository sitting on the local file system.

1) build would start with a wiped local-remote repository
2) build's deploys into the local-remote repository
3) if build finished successfully, artifacts in the local-remote repository get deployed into the real remote group repository.

(The benefits would be that nothing gets deployed until the build succeeds and the build result is available sooner.)

Are there tools which would help with 3) ?
I've looked into the Nexus Command Line Tools [1], but they don't do what I want.

Alternatively I could write my own using the Maven API, I suppose.

-Max

[1] https://docs.sonatype.com/display/SPRTNXOSS/Nexus+Command+Line+Tools

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


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