rdf4j
rdf4j copied to clipboard
OSGI issues with 5.0.0-M1 build
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.1.0:run (enrich-main-artifact-with-provider-configuration-files) on project rdf4j-runtime-osgi: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /home/jenkins/agent/workspace/rdf4j-deploy-release-ossrh/tools/runtime-osgi/build.xml:5: src '/home/jenkins/agent/workspace/rdf4j-deploy-release-ossrh/tools/runtime-osgi/target/serviceResources/raw/raw-service-resources.jar' doesn't exist.
[ERROR] around Ant part ...
This can be reproduced on the develop branch with:
mvn clean
mvn package -Passembly -DskipTests
An workaround is to use mvn install first:
mvn clean
mvn install -DskipTests
mvn package -Passembly -DskipTests
This is still an issue. It used to work without having to first call mvn install.
We could also use a bnd based build like: https://github.com/komma/komma/tree/master/bundles/vendor/net.enilink.bundles.rdf4j
We could also use a bnd based build like: https://github.com/komma/komma/tree/master/bundles/vendor/net.enilink.bundles.rdf4j
I have basically no experience with OSGI so I also don’t know that bnd based build is. From looking at the bnd file in the link it seems a lot simpler than what we are currently doing.
If you can contribute a fix based on bnd I would be very grateful :)
It is not that different from the current approach. The Felix Maven Bundle Plugin just uses bnd under the hood. But I think we can get rid of ant by using the assembly plugin and simplify a bit by directly using the bnd-maven-plugin.
An even better approach could be to just add correct OSGi manifests to the individual artifacts as mentioned in #4079 and drop the runtime-osgi artifact.
I'll take a look within the next days.