rdf4j icon indicating copy to clipboard operation
rdf4j copied to clipboard

OSGI issues with 5.0.0-M1 build

Open hmottestad opened this issue 2 years ago • 5 comments

[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 ...... @ 4:173 in /home/jenkins/agent/workspace/rdf4j-deploy-release-ossrh/tools/runtime-osgi/target/antrun/build-main.xml

hmottestad avatar Aug 10 '23 07:08 hmottestad

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

hmottestad avatar Aug 10 '23 16:08 hmottestad

This is still an issue. It used to work without having to first call mvn install.

hmottestad avatar Aug 19 '23 12:08 hmottestad

We could also use a bnd based build like: https://github.com/komma/komma/tree/master/bundles/vendor/net.enilink.bundles.rdf4j

kenwenzel avatar Sep 07 '23 08:09 kenwenzel

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 :)

hmottestad avatar Sep 07 '23 09:09 hmottestad

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.

kenwenzel avatar Sep 07 '23 09:09 kenwenzel