Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export of the sources only from classes folder #36

Open
SOVALINUX opened this issue Nov 11, 2015 · 4 comments
Open

Export of the sources only from classes folder #36

SOVALINUX opened this issue Nov 11, 2015 · 4 comments

Comments

@SOVALINUX
Copy link

I can be mistaken about any tricks with Export-Package in this plugin.
As for me default behavior from maven-bundle-plugin and gradle osgi plugin looks very handy with exporting all packages except impl and internal under source folder. Here corresponding doc for maven http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html#default-behavior

May be I miss something, since I haven't read plugin sources yet

Or may be you could give me example for Export-Package except the specifying concrete package for every module?

@SOVALINUX SOVALINUX changed the title Export of the sources only within classes folder Export of the sources only from classes folder Nov 11, 2015
@mbelling
Copy link

I am also interested in this. So far the best I have come up with is exporting the unique part of the java package compared to other modules, and it auto-exports the rest underneath. If there was a mode where it would auto-detect this like you mentioned above, that would be great.

instruction 'Export-Package', 'com.company.appName.module.*'

@SOVALINUX
Copy link
Author

I understand that such approach of writing down packages is ok, however I'm working on migration about 300 bundles from maven to gradle and manual handling is not an option
Hopefully I can afford merge request of this functionality if no such

@TomDmitriev
Copy link
Owner

One of the reasons why this plugin was developed in the first place was
that there were people who were unhappy with the default behaviour of the
built-in osgi plugin, particularly with the default value it sets for
Export-Package, which is "*;-noimport:=false;version=" + getVersion() (see
https://github.com/gradle/gradle/blob/master/subprojects/osgi/src/main/groovy/org/gradle/api/internal/plugins/osgi/DefaultOsgiManifest.java).
In this plugin the same value can be set by hand.

On 11 November 2015 at 18:27, SOVALINUX [email protected] wrote:

I understand that such approach of writing down packages is ok, however
I'm working on migration about 300 bundles from maven to gradle and manual
handling is not an option
Hopefully I can afford merge request of this functionality if no such


Reply to this email directly or view it on GitHub
#36 (comment)
.

Yours sincerely,
Artyom Dmitriev

@SOVALINUX
Copy link
Author

Hm, looks like the trick not only in Export-Package. I think theirs analyzer.setJar(getClassesDir()); also plays significant role
I still having all dependencies included in export-package and it becomes 250kb
Also resulting bundle contains a lot of code included from the dependency jars

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants