Re: Filter dependencies based on OSGi bundle detection during assembly

2013-07-04 Thread Alejandro . Endo
I don't think you will find such a thing, but if you do, let us know

What we do is exclude particular dependencies, since most of them are osgi
and are to be included; but this probably isn't your case. Some of our osgi
dependencies have an "osgi" classifier but not all so we can't use that to
decide. Maybe you can make all of yours have that classifier and then
includeClassifiers in the copy-dependencies goal?

I don't know if this would be too specific of a setting for the
maven-dependency-plugin (perhaps someone else can clear this up) but it
would be very useful to have an include/excludeBundles that checks the
manifest to detect if the dependency is a bundle. Then again, maybe it
should be a copy-dependencies goal in the maven-bundle-plugin instead.
Either way, it shouldn't be too hard to implement. If you don't write it I
might give it a try, but don't count on it, it won't be soon





Alejandro Endo | Software Designer/Concepteur de logiciels



From:   Tang Kin Chuen 
To: users@maven.apache.org,
Date:   2013-07-04 09:42
Subject:Filter dependencies based on OSGi bundle detection during
assembly



Hi,

I am creating a Maven assembly that copies required dependencies to a "lib"
directory. Since it is an OSGi based application, I would like to exclude
non-OSGi based (transitive) dependencies automatically when my module's
assembly is processed.

>From maven dependency plugin and assembly descriptors configuration, does
not seem to be a way to do this other than specifying includes/excludes
manually for each dependency.

Appreciate if someone can provide advise on a better way to achieve this.

I am looking for something like "if a dependency/transitive dependency does
not include the required OSGi manifest information, exclude it".

Regards,
Kin Chuen



DISCLAIMER:

Privileged and/or Confidential information may be contained in this
message. If you are not the addressee of this message, you may not
copy, use or deliver this message to anyone. In such event, you
should destroy the message and kindly notify the sender by reply
e-mail. It is understood that opinions or conclusions that do not
relate to the official business of the company are neither given
nor endorsed by the company.

Thank You.


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



AppendingTransformer in maven shade plugin to support pattern matches?

2013-07-04 Thread Mukarram Baig
Hello,

The org.apache.maven.plugins.shade.resource.AppendingTransformer in the
maven shade plugin (v 2.0) only supports exact resource name matches for
appending resources for the uber jar. Do you guys see any problems if this
this supports patterns that might be able to do it for a bunch of resources
at a time, rather than repeating the names of the files:


META-INF/spring.*


instead of


META-INF/spring.handlers


META-INF/spring.schemas


If you don't see a problem, I can go ahead and propose a patch for it.

Thanks in advance!


Filter dependencies based on OSGi bundle detection during assembly

2013-07-04 Thread Tang Kin Chuen
Hi,

I am creating a Maven assembly that copies required dependencies to a "lib"
directory. Since it is an OSGi based application, I would like to exclude
non-OSGi based (transitive) dependencies automatically when my module's
assembly is processed.

>From maven dependency plugin and assembly descriptors configuration, does
not seem to be a way to do this other than specifying includes/excludes
manually for each dependency.

Appreciate if someone can provide advise on a better way to achieve this.

I am looking for something like "if a dependency/transitive dependency does
not include the required OSGi manifest information, exclude it".

Regards,
Kin Chuen


Re: Problems setting up a custom package type II - plugin/mojo versions in components.xml

2013-07-04 Thread Vincent Latombe
I'm not sure I got everything that you've said, but that looks right.
Vincent


2013/7/4 Mirko Friedenhagen :
> Hello Vincent,
>
> thanks for your answer. Just so I get this right: I am looking at my
> IT-pom [1] and it has no parent defined. I am running Apache Maven
> 3.0.5.  In my output I *do not* see the plugin-versions defined in the
> super POM from Maven-core (this are the ones defined in
> default-bindings.xml[2], right?) but newer ones as they are defined in
> the parent-pom of the plugin/extension project.
>
> * Say I have an extension (should be almost the same with a plugin)
> with version 2.13 of surefire in the pluginManagement of it's POM.
> * I include this extension in a parent pom PP and define 2.14.1 in the
> pluginManagement section.
> 
> 
> 
> 
> maven-surefire-plugin
> 2.14.1
> 
> 
> 
> 
> 
> g
> a
> 1.0
> 
> 
> 
> * In project A inheriting this parent pom I define 2.15 as version.
> * Now should I expect the run of 2.15 for A, 2.14.1 for projects just
> having PP as parent and all projects not using the PP but the
> extension to use 2.13, right?
>
>
>
>
> [1] 
> https://github.com/mfriedenhagen/foss-jar-maven-plugin/blob/master/src/it/test-foss-jar/pom.xml
> [2] 
> https://github.com/apache/maven/blob/master/maven-core/src/main/resources/META-INF/plexus/default-bindings.xml
> Regards Mirko
> --
> http://illegalstateexception.blogspot.com/
> https://github.com/mfriedenhagen/
> https://bitbucket.org/mfriedenhagen/
>
>
> On Thu, Jul 4, 2013 at 8:33 AM, Vincent Latombe
>  wrote:
>> These are taken from the parent pom (super POM coming from maven core,
>> any parent pom that you define)
>>
>> Regards,
>> Vincent
>>
>>
>> 2013/7/4 Mirko Friedenhagen :
>>> Hello everyone,
>>>
>>> now I am getting greedy :-). I see that you may specify versions for
>>> the goals being executed during phases in components.xml for custom
>>> package types.
>>>
>>> Is there a way to convince the versions-maven-plugin etc. to update
>>> these versions as well?
>>> Or. where are the versions for the plugins in components taken from?
>>>
>>> Regards Mirko
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>>> For additional commands, e-mail: users-h...@maven.apache.org
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>

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



AppendingTransformer in maven shade plugin to support pattern matches?

2013-07-04 Thread Mukarram Baig
Hello,

The org.apache.maven.plugins.shade.resource.AppendingTransformer in the
maven shade plugin (v 2.0) only supports exact resource name matches for
appending resources for the uber jar. Do you guys see any problems if this
this supports patterns that might be able to do it for a bunch of resources
at a time, rather than repeating the names of the files:


META-INF/spring.*


instead of


META-INF/spring.handlers


META-INF/spring.schemas


If you don't see a problem, I can go ahead and propose a patch for it.

Thanks in advance!


Re: Problems setting up a custom package type II - plugin/mojo versions in components.xml

2013-07-04 Thread Mirko Friedenhagen
Hello Vincent,

thanks for your answer. Just so I get this right: I am looking at my
IT-pom [1] and it has no parent defined. I am running Apache Maven
3.0.5.  In my output I *do not* see the plugin-versions defined in the
super POM from Maven-core (this are the ones defined in
default-bindings.xml[2], right?) but newer ones as they are defined in
the parent-pom of the plugin/extension project.

* Say I have an extension (should be almost the same with a plugin)
with version 2.13 of surefire in the pluginManagement of it's POM.
* I include this extension in a parent pom PP and define 2.14.1 in the
pluginManagement section.




maven-surefire-plugin
2.14.1





g
a
1.0



* In project A inheriting this parent pom I define 2.15 as version.
* Now should I expect the run of 2.15 for A, 2.14.1 for projects just
having PP as parent and all projects not using the PP but the
extension to use 2.13, right?




[1] 
https://github.com/mfriedenhagen/foss-jar-maven-plugin/blob/master/src/it/test-foss-jar/pom.xml
[2] 
https://github.com/apache/maven/blob/master/maven-core/src/main/resources/META-INF/plexus/default-bindings.xml
Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/
https://bitbucket.org/mfriedenhagen/


On Thu, Jul 4, 2013 at 8:33 AM, Vincent Latombe
 wrote:
> These are taken from the parent pom (super POM coming from maven core,
> any parent pom that you define)
>
> Regards,
> Vincent
>
>
> 2013/7/4 Mirko Friedenhagen :
>> Hello everyone,
>>
>> now I am getting greedy :-). I see that you may specify versions for
>> the goals being executed during phases in components.xml for custom
>> package types.
>>
>> Is there a way to convince the versions-maven-plugin etc. to update
>> these versions as well?
>> Or. where are the versions for the plugins in components taken from?
>>
>> Regards Mirko
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>

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