You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Tang Kin Chuen <kc...@big2.net> on 2013/07/04 12:11:20 UTC

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

Re: Filter dependencies based on OSGi bundle detection during assembly

Posted by Al...@miranda.com.
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 <kc...@big2.net>
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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org