Comments (2)
Generally the merge
right now just checks all artifacts available if they should be included, based on the condition you provide in the closure.
The feature
instruction serves only for the purpose to define which bundles should be included. It does not have any other effect.
In match
you have the artifact, but you don't have any information there about what depends on this artifact. So if that information is not added there, I don't see an obvious way to handle that there with the current API.
One way to solve this would be to support this where the actual selection which artifacts are merged takes place. The configuration for the merge could probably be extended to add an option to include dependencies for a bundle.
Another way could be to do some preprocessing beforehand. Including all dependencies to a bundle also in one Jar sounds very much like what the Shadow Jar plugin would do. There you also have the option to rename packages which could help avoiding conflicts if you have these dependencies included somewhere else as well. So here would be the approach to create the Jar in another task and add the already merged Jar instead. If you let the bundles task depend on that task, it is ensured that the merged Jar is created early enough.
from bnd-platform.
Thank you once more for your very helpful feedback, Simon!
I had a look at the Shadow plugin, which looked helpful at first glance. But unfortunately it currently does not support creating source bundles (at least out of the box), as highlighted in this issue. And having the sources at hand was one of the many reasons which made me switch from my own (half baked) bundling solution to bnd-platform.
What I did at the end, was splitting up my bnd-platform gradle project into three sub projects:
- sub project
A
creates an “uber” bundle forA
’s entire dependency tree, by simply applying settingmatch { true }
- sub project
B
creates the individual bundles (for those, the OSGi resolution black magic works fine, so no need to merge them) - finally, sub project
updatesite
pulls the bundles together usingbundle fileTree(dir: '../A/build/plugins')
andbundle fileTree(dir: '../B/build/plugins')
and builds the update site
In the root’s build.grade
I’ve defined a task to execute all the steps conveniently:
task create {
dependsOn ':projectA:bundles'
dependsOn ':projectB:bundles'
dependsOn ':updatesite:updateSite'
}
This seems to work very fine so far, and I can entirely rely on the (awesome) bnd-platform plugin! In case of any improvement suggestions feel free to let me know!
from bnd-platform.
Related Issues (20)
- create eclipse plugin HOT 2
- Support for Gradle 3/4 HOT 3
- Create 1.6 release and publish 1.7 snapshot? HOT 4
- "Could not retrieve POM" spam HOT 2
- SSL issues with cloudfront.net when trying to download Eclipse HOT 4
- Avoid 'Require-Capability' header? HOT 2
- Generated update site does not work HOT 3
- OptionalImport not working HOT 2
- feature.xml does not contain all dependencies HOT 2
- Setting buildDir does not work HOT 2
- fetchSources = true adds source bundles to feature HOT 11
- Getting java.util.NoSuchElementException on updateSite goal HOT 3
- Generated updatesite not working due to missing filters HOT 2
- Gradle 6 Incompatibility HOT 8
- extracting Bundle-License from pom.xml does not work HOT 1
- Not all bundles are downloaded HOT 2
- Default location of eclipseMirror no longer available HOT 7
- Add new releases to Gradle Plugin Portal HOT 1
- bndtools < 5.3 may create invalid ZIP file extra fields (jar loading exceptions with recent JRE versions) HOT 5
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bnd-platform.