You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thomas Scheffler <th...@uni-jena.de> on 2012/08/17 10:32:59 UTC

How to add "package" to site lifecycle

Hi,

I made a maven project where the assembly plugin creates a zip file. I
want that zip file to be included in the site. In my opinion the best
way to enforce the presence of that zip file would be add the "package"
lifecycle to the site lifecycle on phase "pre-site". How can I modify
the default site lifecycle without writing a new plugin for that?

kind regards,

Thomas

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


Re: How to add "package" to site lifecycle

Posted by Anders Hammar <an...@hammar.net>.
I think it should be possible to bind the 'single' goal of the
assembly plugin to the pre-site phase, where it would produce the zip.

But I think the approach depends on what you're trying to do. You
might be doing too much in one project. What would the zip contain?

/Anders

On Fri, Aug 17, 2012 at 10:36 AM, Stephen Connolly
<st...@gmail.com> wrote:
> Why don't you bind add dependency:copy-dependencies to the site phase. and
> configure it to copy the zip you want. Much less dangerous
>
> On 17 August 2012 09:32, Thomas Scheffler <th...@uni-jena.de>wrote:
>
>> Hi,
>>
>> I made a maven project where the assembly plugin creates a zip file. I
>> want that zip file to be included in the site. In my opinion the best
>> way to enforce the presence of that zip file would be add the "package"
>> lifecycle to the site lifecycle on phase "pre-site". How can I modify
>> the default site lifecycle without writing a new plugin for that?
>>
>> kind regards,
>>
>> Thomas
>>
>> ---------------------------------------------------------------------
>> 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: How to add "package" to site lifecycle

Posted by Stephen Connolly <st...@gmail.com>.
If you have done `mvn install` previously then it will copy that zip to the
site. The only risk is that you may have a stale zip in your local
repository, but since the release plugin will invoke `deploy site-deploy`
the released site will always be correct.

On 20 August 2012 06:46, Thomas Scheffler <th...@uni-jena.de>wrote:

> Am 17.08.2012 10:36, schrieb Stephen Connolly:
> > Why don't you bind add dependency:copy-dependencies to the site phase.
> and
> > configure it to copy the zip you want. Much less dangerous
>
> The ZIP file is build in the package phase and that's why I want to add
> the package phase to the site phase as some kind of dependency. To
> create the correct site I now have to run "mvn package site". Simply
> running "mvn site" will not work to have all things done for site creation.
>
> regards,
>
> Thomas
>
>
> >> I made a maven project where the assembly plugin creates a zip file. I
> >> want that zip file to be included in the site. In my opinion the best
> >> way to enforce the presence of that zip file would be add the "package"
> >> lifecycle to the site lifecycle on phase "pre-site". How can I modify
> >> the default site lifecycle without writing a new plugin for that?
>
>
> --
> Thomas Scheffler
> Friedrich-Schiller-Universität Jena
> Thüringer Universitäts- und Landesbibliothek
> Bibliotheksplatz 2
> 07743 Jena
> Phone: ++49 3641 940027
> FAX:   ++49 3641 940022
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: How to add "package" to site lifecycle

Posted by Thomas Scheffler <th...@uni-jena.de>.
Am 17.08.2012 10:36, schrieb Stephen Connolly:
> Why don't you bind add dependency:copy-dependencies to the site phase. and
> configure it to copy the zip you want. Much less dangerous

The ZIP file is build in the package phase and that's why I want to add
the package phase to the site phase as some kind of dependency. To
create the correct site I now have to run "mvn package site". Simply
running "mvn site" will not work to have all things done for site creation.

regards,

Thomas


>> I made a maven project where the assembly plugin creates a zip file. I
>> want that zip file to be included in the site. In my opinion the best
>> way to enforce the presence of that zip file would be add the "package"
>> lifecycle to the site lifecycle on phase "pre-site". How can I modify
>> the default site lifecycle without writing a new plugin for that?


-- 
Thomas Scheffler
Friedrich-Schiller-Universität Jena
Thüringer Universitäts- und Landesbibliothek
Bibliotheksplatz 2
07743 Jena
Phone: ++49 3641 940027
FAX:   ++49 3641 940022

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


Re: How to add "package" to site lifecycle

Posted by Stephen Connolly <st...@gmail.com>.
Why don't you bind add dependency:copy-dependencies to the site phase. and
configure it to copy the zip you want. Much less dangerous

On 17 August 2012 09:32, Thomas Scheffler <th...@uni-jena.de>wrote:

> Hi,
>
> I made a maven project where the assembly plugin creates a zip file. I
> want that zip file to be included in the site. In my opinion the best
> way to enforce the presence of that zip file would be add the "package"
> lifecycle to the site lifecycle on phase "pre-site". How can I modify
> the default site lifecycle without writing a new plugin for that?
>
> kind regards,
>
> Thomas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>