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...@oracle.com> on 2011/07/01 14:47:38 UTC

Re: new maven-bundle-plugin snapshot available for beta testing

On Thursday 30 June 2011 07:49 PM, Stuart McCulloch wrote:
> On 30 Jun 2011, at 04:35, Sahoo wrote:
>
>> Hi Stuart,
>>
>> Thanks for fixing all these issues. I am happy to report that one can use bundle plugin to generate well formed WABs with embedded libraries [1].
>>
>> I would like to draw your attention to another issue [2] which is not yet reported in JIRA. How can one configure the plugin to generate files with .war extension as opposed to .jar extensions?
> The ".jar" extension issue should also be fixed in the latest snapshot: https://issues.apache.org/jira/browse/FELIX-2435
>
I still don't understand what happens when packaging type is war and 
bundle goal is configured to run in package phase. The plugin execution 
order didn't look very simple to me, so I tend to avoid such 
configuration. So, I was looking for ways to configure maven bundle 
plugin to generate files with some other extension (like war) when 
packaging type is bundle.
>> I know I should have raised this earlier, but better late than never.
> NP, there is still time to fix small issues since the bundlerepository vote (which is a pre-req) has a few days left to run.
>
I would really like your thoughts about FELIX-3018.

Thanks much,
Sahoo

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


Re: new maven-bundle-plugin snapshot available for beta testing

Posted by Sahoo <sa...@oracle.com>.
On Friday 01 July 2011 09:12 PM, Stuart McCulloch wrote:
> I did some prototyping yesterday and I think it's safer to push out 2.3.6
> without FELIX-3018 and then do a major clean up (and remove the deprecated
> goals).
Stuart,

If we can address this, then I think enterprise OSGi artifact 
development using maven can be made simpler for people coming from 
traditional EE/maven background.

Thanks,
Sahoo


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


Re: new maven-bundle-plugin snapshot available for beta testing

Posted by Stuart McCulloch <mc...@gmail.com>.
On 1 July 2011 13:47, Sahoo <sa...@oracle.com> wrote:

> On Thursday 30 June 2011 07:49 PM, Stuart McCulloch wrote:
>
>> On 30 Jun 2011, at 04:35, Sahoo wrote:
>>
>>  Hi Stuart,
>>>
>>> Thanks for fixing all these issues. I am happy to report that one can use
>>> bundle plugin to generate well formed WABs with embedded libraries [1].
>>>
>>> I would like to draw your attention to another issue [2] which is not yet
>>> reported in JIRA. How can one configure the plugin to generate files with
>>> .war extension as opposed to .jar extensions?
>>>
>> The ".jar" extension issue should also be fixed in the latest snapshot:
>> https://issues.apache.org/**jira/browse/FELIX-2435<https://issues.apache.org/jira/browse/FELIX-2435>
>>
>>  I still don't understand what happens when packaging type is war and
> bundle goal is configured to run in package phase.


With 2.3.5-SNAPSHOT in terms of where and what filename is used, the bundle
goal will:

   * use the configured build directory (ie. "target")
   * use the configured finalName (ie. "artifactId-version") plus the
extension for the project's packaging type (ie. ".war" for war packaging)
   * overwrite any existing file (the default behaviour for most Maven
plugins, since you could be running "mvn install" without any "clean")
   * attach the bundle as the main project artifact

Therefore if you tell Maven to run the "bundle" goal in the packaging phase
this will run after the default goal for the project packaging, and
potentially overwrite the previous file written by the packaging's plugin.
So your war file would be overwritten by the bundle file (which may also be
a war if you used the <_wab> instruction) But this is the same for many
other Maven plugins - for example if you added a jar goal execution to a
project which had packaging bundle then the jar plugin would similarly
overwrite the bundle with a plain jar file.

The plugin execution order didn't look very simple to me, so I tend to avoid
> such configuration.


The execution order inside a given packaging phase is more deterministic in
Maven 3 (follows order of configuration in the pom). But yes, it's not a
good idea to use the bundle goal in a project that has a different
packaging, unless you know what you're doing and configure output locations
accordingly. Ideally you would use the manifest goal when adding metadata to
an existing archive, which is where FELIX-3018 comes in.


> So, I was looking for ways to configure maven bundle plugin to generate
> files with some other extension (like war) when packaging type is bundle.


You'll need to raise a feature request for that - btw, while we can easily
change the extension used in the target directory it's not clear that we
could change the extension used when the artifact is installed/deployed to
the Maven repository since the repository extension is defined by the
project's packaging type (see the current metadata in
bundleplugin/src/main/resources/META-INF/plexus/components.xml).

This is the same as configuring the finalName in Maven - you can change the
name used in the target dir, but the repository has to use
"artifactid-version.ext"


>  I know I should have raised this earlier, but better late than never.
>>>
>> NP, there is still time to fix small issues since the bundlerepository
>> vote (which is a pre-req) has a few days left to run.
>>
>>  I would really like your thoughts about FELIX-3018.
>

I did some prototyping yesterday and I think it's safer to push out 2.3.6
without FELIX-3018 and then do a major clean up (and remove the deprecated
goals).


> Thanks much,
> Sahoo
>

-- 
Cheers, Stuart