akhikhl / wuff

Gradle plugin for automating assembly of OSGi/Eclipse bundles and applications
MIT License
153 stars 51 forks source link

Skip certain Require-Bundle or Import-Package entries #83

Closed petarov closed 7 years ago

petarov commented 9 years ago

@akhikhl I read your Wuff-bundle-files-draft, however, I did not see any work done in that direction and I urgently needed a solution because of a project migration to Gradle that I'm working on at the moment.

This PR is far from a solution. I opened it up only as a suggestion of some sort. Perhaps it adds a bit to the idea of having the generateBundleFiles = true flag. In my case I'm interested in Merge mode with some slight exceptions to what is included in the Require-Bundle and Import-Package fields.

This adds 2 new configuration options to the wuff configuration - skipRequireBundle and skipImportPackage. These 2 define sets of String entries that Wuff will match and remove from the final MANIFEST.MF file when merging the default and user-defined MANIFEST.MF files.

Example:

wuff {
    localMavenRepositoryDir = new File(System.getProperty('user.home'), '.wuff/m2_repository')

    wuffDir = new File(System.getProperty('user.home'), '.wuff')

    skipRequireBundle = ['org.eclipse.swt', 'org.eclipse.ui', 'org.eclipse.jface', 'org.eclipse.core.resources', 'org.eclipse.core.expressions']
    skipImportPackage = ['org.osgi.framework']

Disclaimer: I'm not a Groovy developer, so the code is probably quite poorly written.

muenzpraeger commented 9 years ago

Can we get an update on this PR?