You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@continuum.apache.org by MATHUS Baptiste <ma...@mipih.fr> on 2008/03/14 15:21:01 UTC

deploy without install

Hi all,

I hesitated on posting on mvn user list. As it more related to
continuous integration, I'll post it here.

I noticed the .m2/repository directory of the maven binaries used by the
continuum server is also receiving the artifacts that are deployed. 
>From my understanding, this is because a mvn clean deploy will also do
an install.

The thing is: in this case, that is a quite big artifact (35MB war) in
SNAPSHOT version. And no project depends on it, so installing it on the
server is completely wasteful. 
When deployed into archiva, I can configure the purge of the old
snapshots. But I guess it's not possible with maven?

So I'd like to be able to prevent mvn deploy from including a mvn
install? Is this possible at all?

Cheers.


RE : deploy without install

Posted by MATHUS Baptiste <ma...@mipih.fr>.


-------- Message d'origine--------
> De: Wendy Smoak [mailto:wsmoak@gmail.com]
> Date: ven. 14/03/2008 18:49
> À: users@continuum.apache.org
> Objet : Re: deploy without install
>  
> On Fri, Mar 14, 2008 at 7:21 AM, MATHUS Baptiste <ma...@mipih.fr> wrote:
> 
> >  I noticed the .m2/repository directory of the maven binaries used by the
> >  continuum server is also receiving the artifacts that are deployed.
> >  From my understanding, this is because a mvn clean deploy will also do
> >  an install.
> ...
> >  So I'd like to be able to prevent mvn deploy from including a mvn
> >  install? Is this possible at all?
> 
> No, because the install phase precedes the deploy phase in the Maven
> lifecycle.  http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
> 
> We recently added a feature to the _deploy_ plugin to skip deployment
> [1], but it sounds like you *do* want it available in Archiva?
> Perhaps a similar 'skip' feature for the install plugin could work,
> but I have a feeling that would break things...

You're right. Actually, I want that deployment to happen. 

> 
> The answer seems to be a general tool to purge snapshots from the
> local Maven repo, something that is not Continuum related.

IMO, the tool wouldn't need to be continuum related, but it would be one of the first target to use such a tool.
In fact, if you own both a continuum and a maven proxy/repo (like archiva for example), you want continuum builds to be deployed to archiva, but you don't care about the local repo of that continuum server (especially if only continuum runs in this environment).

> 
> See also:  http://jira.codehaus.org/browse/CONTINUUM-1693

That is EXACTLY our problem. I should have searched continuum JIRA before. I started looking into it because I realized we were running out of disk space because there was a directory on war snapshot that was almost 4GB :) (scheduler runs every 15 minutes and there's a lot of commit, so this disk space could be something made in only some days...).
Maybe other people on this list are interested in this problem.

As I said above, I agree this is a task that's not directly related to continuum. But this is something a lot of people are likely to encounter on the local repository of their continuum server. 

So I see the following solution:
* write a plugin to delete old snapshots (or convert this maven1.x plugin draft: http://jira.codehaus.org/browse/MPREPO-1)
* use a clean way in continuum to call such a task. Obviously this could already be done with a fake project, but this might be better to do it as a real "cleaning" feature.

What do you think?

Thanks again for this wonderful software suite guys.

Cheers
-- 
Baptiste

Re: deploy without install

Posted by Dan Tran <da...@gmail.com>.
I added the ability to remove all previously installed artifact at
package phase, this way only one copy
of artifact is in local repository.

it is at build-helper-maven-plugin 1.1 snapshot ( deployed )

the usage is at

https://svn.codehaus.org/mojo/trunk/mojo/build-helper-maven-plugin/src/site/apt/usage.apt

please give it a try

-D

On Fri, Mar 14, 2008 at 10:54 AM, Dan Tran <da...@gmail.com> wrote:
> this is a nice feature to skip the install execution, I have 5 100M
> installers install/deply every build and it eats
> my harddish fast.
>
> The work around is to have antrunt to remove it after install phase.
>
> -D
>
>
> On Fri, Mar 14, 2008 at 10:49 AM, Wendy Smoak <ws...@gmail.com> wrote:
> > On Fri, Mar 14, 2008 at 7:21 AM, MATHUS Baptiste <ma...@mipih.fr> wrote:
> >
> > >  I noticed the .m2/repository directory of the maven binaries used by the
> > >  continuum server is also receiving the artifacts that are deployed.
> > >  From my understanding, this is because a mvn clean deploy will also do
> > >  an install.
> > ...
> > >  So I'd like to be able to prevent mvn deploy from including a mvn
> > >  install? Is this possible at all?
> >
> > No, because the install phase precedes the deploy phase in the Maven
> > lifecycle.  http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
> >
> > We recently added a feature to the _deploy_ plugin to skip deployment
> > [1], but it sounds like you *do* want it available in Archiva?
> > Perhaps a similar 'skip' feature for the install plugin could work,
> > but I have a feeling that would break things...
> >
> > The answer seems to be a general tool to purge snapshots from the
> > local Maven repo, something that is not Continuum related.
> >
> > See also:  http://jira.codehaus.org/browse/CONTINUUM-1693
> >
> > [1] http://maven.apache.org/plugins/maven-deploy-plugin-2.4-SNAPSHOT/faq.html#skip
> > (unreleased)
> >
> > --
> > Wendy
> >
>

Re: deploy without install

Posted by Dan Tran <da...@gmail.com>.
this is a nice feature to skip the install execution, I have 5 100M
installers install/deply every build and it eats
my harddish fast.

The work around is to have antrunt to remove it after install phase.

-D

On Fri, Mar 14, 2008 at 10:49 AM, Wendy Smoak <ws...@gmail.com> wrote:
> On Fri, Mar 14, 2008 at 7:21 AM, MATHUS Baptiste <ma...@mipih.fr> wrote:
>
> >  I noticed the .m2/repository directory of the maven binaries used by the
> >  continuum server is also receiving the artifacts that are deployed.
> >  From my understanding, this is because a mvn clean deploy will also do
> >  an install.
> ...
> >  So I'd like to be able to prevent mvn deploy from including a mvn
> >  install? Is this possible at all?
>
> No, because the install phase precedes the deploy phase in the Maven
> lifecycle.  http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
>
> We recently added a feature to the _deploy_ plugin to skip deployment
> [1], but it sounds like you *do* want it available in Archiva?
> Perhaps a similar 'skip' feature for the install plugin could work,
> but I have a feeling that would break things...
>
> The answer seems to be a general tool to purge snapshots from the
> local Maven repo, something that is not Continuum related.
>
> See also:  http://jira.codehaus.org/browse/CONTINUUM-1693
>
> [1] http://maven.apache.org/plugins/maven-deploy-plugin-2.4-SNAPSHOT/faq.html#skip
> (unreleased)
>
> --
> Wendy
>

Re: deploy without install

Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Mar 14, 2008 at 7:21 AM, MATHUS Baptiste <ma...@mipih.fr> wrote:

>  I noticed the .m2/repository directory of the maven binaries used by the
>  continuum server is also receiving the artifacts that are deployed.
>  From my understanding, this is because a mvn clean deploy will also do
>  an install.
...
>  So I'd like to be able to prevent mvn deploy from including a mvn
>  install? Is this possible at all?

No, because the install phase precedes the deploy phase in the Maven
lifecycle.  http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

We recently added a feature to the _deploy_ plugin to skip deployment
[1], but it sounds like you *do* want it available in Archiva?
Perhaps a similar 'skip' feature for the install plugin could work,
but I have a feeling that would break things...

The answer seems to be a general tool to purge snapshots from the
local Maven repo, something that is not Continuum related.

See also:  http://jira.codehaus.org/browse/CONTINUUM-1693

[1] http://maven.apache.org/plugins/maven-deploy-plugin-2.4-SNAPSHOT/faq.html#skip
(unreleased)

-- 
Wendy