flowable / flowable-engine

A compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.
https://www.flowable.org
Apache License 2.0
8.01k stars 2.63k forks source link

Broken OSGi bundle wiring and build #3844

Closed pavelhoral closed 9 months ago

pavelhoral commented 9 months ago

Describe the bug

Current build on main is broken so I am creating this issue to have a place for a discussion how to tackle it. The issue is probably caused by recent changes that broke bundle wiring and introduced unwanted Import-Package declarations.

One example of such package dependency (that gets picked up by bndtool) is org.flowable.common.engine.impl.aot.FlowableMyBatisRuntimeHints that uses classes from org.apache.ibatis.javassist.util.proxy package that is not being exported by mybatis bundle.

ERROR: Bundle flowable-osgi [77] Error starting reference:file:target/classes (org.osgi.framework.BundleException: Unable to resolve flowable-osgi [77](R 77.0): missing requirement [flowable-osgi [77](R 77.0)] osgi.wiring.package; (&(osgi.wiring.package=org.flowable.common.engine.impl.javax.el)(version>=7.1.0)(!(version>=8.0.0))) [caused by: Unable to resolve org.flowable.common.engine.impl [15](R 15.0): missing requirement [org.flowable.common.engine.impl [15](R 15.0)] osgi.wiring.package; (osgi.wiring.package=org.apache.ibatis.javassist.util.proxy)] Unresolved requirements: [[flowable-osgi [77](R 77.0)] osgi.wiring.package; (&(osgi.wiring.package=org.flowable.common.engine.impl.javax.el)(version>=7.1.0)(!(version>=8.0.0)))])
org.osgi.framework.BundleException: Unable to resolve flowable-osgi [77](R 77.0): missing requirement [flowable-osgi [77](R 77.0)] osgi.wiring.package; (&(osgi.wiring.package=org.flowable.common.engine.impl.javax.el)(version>=7.1.0)(!(version>=8.0.0))) [caused by: Unable to resolve org.flowable.common.engine.impl [15](R 15.0): missing requirement [org.flowable.common.engine.impl [15](R 15.0)] osgi.wiring.package; (osgi.wiring.package=org.apache.ibatis.javassist.util.proxy)] Unresolved requirements: [[flowable-osgi [77](R 77.0)] osgi.wiring.package; (&(osgi.wiring.package=org.flowable.common.engine.impl.javax.el)(version>=7.1.0)(!(version>=8.0.0)))]
    at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4398)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
    at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1566)

Expected behavior

OSGi bundles should not depend on non-OSGi packages and tests should pass.

Additional context

I am sure you are looking into this as well as this causes pipeline on main to fail. However as external person I wanted to have a place where I can write my own observations. Originally discussed here https://github.com/flowable/flowable-engine/pull/3843#issuecomment-1933039617 .