-
Notifications
You must be signed in to change notification settings - Fork 11
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
WIP: adds gradle build #145
Conversation
Note: Integration tests excluded
Merge branch 'master' into gradle
creates the wiring for the OSGI bundles using bnd in gradle provisions modules to karaf as individual features includes a complete and functioning build script Note: IT tests still need to be migrated
provisions modules to karaf as individual features includes a complete and functioning build script Note: IT tests still need to be migrated
@christopher-johnson I am really supportive of a move toward Gradle. Re: integration testing, there are some tricky things to sort out with this, but in the end Gradle is considerably more flexible than Maven in this regard. If you want to see how I am doing OSGi integration testing (using pax-exam) with other karaf-deployable services in Gradle, take a look here: https://gitlab.amherst.edu/acdc/repository-extension-services/blob/master/acrepo-itests/build.gradle This uses the |
I don't really know gradle, groovy, jcenter et al.; and am not really sure my mental model of how it all works is even accurate, so it's hard for me to fully understand what this PR is doing, outside of the text description. That being said, it's clear that there are many parts to this PR that aren't strictly related to a Gradle build. There are some code/configuration cleanups, it looks like the Karaf features file is now hard-coded rather than generated by the features maven plugin, etc. Would it be possible to break out bits and pieces of this PR in a manner that can be merged into master? It would be great/ideal if this PR were whittled down to just the Gradle bits, with the rest merged into master (or moved elsewhere, like perhaps the docker-compose files; I think we need to revisit the question as to whether any Docker stuff belongs in |
@acoburn @birkland thank you for the feedack.
I will be in the tech meeting tomorrow. |
I don't quite understand this part:
It ultimately produces a features file that looks like this: Individual features can be deployed individually, or one can use an "uber-feature" like not using the features plugin (and instead just manually editing a features file in the repository) is OK too. Neither way is particularly good, but if only one of them works with Gradle, then switching the way feature files are created is fine. |
I have always been unsatisfied with the available tooling for generating One thing to remember though is that once Java9 is in use, you're going to have to explicitly manage |
The hope is that because of Jigsaw's limited ambit (it's really mostly for the footprint of the Java API itself), it won't be hard to tool automation to inspect the code and develop basic graphs. 🤞 |
adds non-default client config for indexer changes broker name for listener
a73a18d
to
2abab45
Compare
adds ipv6 test in core.yml
@birkland I did not try to use the maven features plugin, but you are right, it does it correctly (for the most part). I was not aware that the One alternative to Populating a Anyway, I think it is important to know about these dependency graphs, though I would definitely prefer to have a tool just do it automatically! I may try a plugin to do features.xml in Gradle. Still not automatic, but better than manually editing XML! @acoburn thank you for the suggestion about the An alternative possibility is to build the service node as a docker container which is then deployed to a (kubernetes driven) IT test farm, where CI could process a bunch of API calls. The fact that the app is deployed in OSGI is actually irrelevant to the IT tests, imho. What is being tested is whether or not the service API(s) return the expected HTTP responses, (and for performance, the periodicity ibid) and this could/should be abstracted from the deployment implementation as much as possible. Regarding the usefulness of PaxExam, I guess that if the But, what happens when a,b and c have remotely deployed transitive dependencies (e.g. message queueing, cloud services, etc.). Is it possible (or desirable) to test this |
I submit this PR with the expectation that it will not be merged into master, but possibly into a development branch. My intent is to make building, testing of apix extensions for integration into upstream platforms (fcrepo,karaf,activemq,etc.) easier by depending on docker and gradle.
It needs a code review, and further analysis of the dependencies as there may be some unnecessary declarations.
The manifests are generated with BND (just like the maven felix plugin) and the gradle plugin reads the blueprints (hence the xerces compiler warnings), but the "Require-Capability" header seems to not work when provisioning in Karaf, so it is filtered. Getting the OSGI wiring to work was a real puzzle, but even after everything resolved, there were several undeclared blueprint feature dependencies (eg. camel-jetty, fcrepo-camel and fcrepo-service-activemq) which were hard to trace. Provisioning the modules as individual bundles is the right way to do OSGI, though with blueprint, it is a bit of a headache as Karaf will provide misleading dependency traces for injected services... Also, the IT tests do not work yet and are filtered in the build. I refactored as little as possible to make it work.
Here is a summary of the code changes:
The docker image (0.3.1-SNAPSHOT) is here . Note that this requires my fcrepo and activemq images to work with the core.yml docker-compose file in the root.