You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Sahoo <sa...@sun.com> on 2008/09/11 22:27:14 UTC
Using both maven-jar-plugin and maven-bundle-plugin
Perhaps a stupid question, but can I use maven-jar-plugin if I configure
maven-bundle-plugin to execute bundle goal? Assuming I have no secondary
artifacts being produced by my pom, which plugin eventually makes the
final jar? Is it the maven-jar-plugin or maven-bundle-plugin? I guess it
depends on who is configured to run last.
Thanks,
Sahoo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Using both maven-jar-plugin and maven-bundle-plugin
Posted by Sahoo <sa...@sun.com>.
Stuart McCulloch wrote:
> 2008/9/12 Sahoo <sa...@sun.com>
>
>
>> Perhaps a stupid question, but can I use maven-jar-plugin if I configure
>> maven-bundle-plugin to execute bundle goal? Assuming I have no secondary
>> artifacts being produced by my pom, which plugin eventually makes the final
>> jar? Is it the maven-jar-plugin or maven-bundle-plugin? I guess it depends
>> on who is configured to run last.
>>
>>
>
> it depends on the packaging type and the phase to which you bind the other
> plugin goal
>
> for example, using packaging bundle will automatically bind the bundle goal
> to the packaging phase,
> but you could also bind the jar goal of the maven-jar-plugin to the same
> phase, or even a later phase.
>
> similarly if you had packaging jar then maven would bind the jar goal to the
> packaging phase, but you
> could then explicitly bind the bundle goal of the maven-bundle-plugin to the
> same phase or later...
>
> in both cases the explicitly bound plugin (ie. the one added using
> <executions>...) should run last.
>
The above point was not clear to me. Thanks for telling that.
> however, if your aim is to use the maven-bundle-plugin to generate the
> manifest, but use packaging
> type jar (ie. bundle is created by the maven-jar-plugin) then you should use
> the "manifest" goal of
> the maven-bundle-plugin, ideally bound to the process-classes phase so it
> will run after compilation
> but before the packaging starts, and then feed that manifest into the
> maven-jar-plugin.
>
Yes, we already do that. I wanted to understand interaction between
bundle goal and jar-plugin. It's clear now.
Thanks,
Sahoo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Using both maven-jar-plugin and maven-bundle-plugin
Posted by Stuart McCulloch <mc...@gmail.com>.
2008/9/12 Sahoo <sa...@sun.com>
> Perhaps a stupid question, but can I use maven-jar-plugin if I configure
> maven-bundle-plugin to execute bundle goal? Assuming I have no secondary
> artifacts being produced by my pom, which plugin eventually makes the final
> jar? Is it the maven-jar-plugin or maven-bundle-plugin? I guess it depends
> on who is configured to run last.
>
it depends on the packaging type and the phase to which you bind the other
plugin goal
for example, using packaging bundle will automatically bind the bundle goal
to the packaging phase,
but you could also bind the jar goal of the maven-jar-plugin to the same
phase, or even a later phase.
similarly if you had packaging jar then maven would bind the jar goal to the
packaging phase, but you
could then explicitly bind the bundle goal of the maven-bundle-plugin to the
same phase or later...
in both cases the explicitly bound plugin (ie. the one added using
<executions>...) should run last.
however, if your aim is to use the maven-bundle-plugin to generate the
manifest, but use packaging
type jar (ie. bundle is created by the maven-jar-plugin) then you should use
the "manifest" goal of
the maven-bundle-plugin, ideally bound to the process-classes phase so it
will run after compilation
but before the packaging starts, and then feed that manifest into the
maven-jar-plugin.
Thanks,
> Sahoo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
--
Cheers, Stuart