Skip to content
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

conditionalpackage no longer works with Blueprint since 3.4.0 #6408

Open
modax opened this issue Dec 15, 2024 · 0 comments
Open

conditionalpackage no longer works with Blueprint since 3.4.0 #6408

modax opened this issue Dec 15, 2024 · 0 comments

Comments

@modax
Copy link

modax commented Dec 15, 2024

Hello,

I have tried to upgrade to the later bnd version in my project and I have noticed that conditionalpackage no longer works when the package in question referred only in Blueprint XML. I have not tested but I guess conditionalpackage no longer works with -plugin.

First I narrowed down the regression to version 3.4.0 and then I have git bisect'ed it to commit 7a4bc425c8d3e1c2e387c0201e18cba6a0eea435.

I attach a sample which you can use to reproduce the issue. Actually it is a modified version of maven bnd-process-conditional it test so you can easily incorporate it into source tree.

3.3.0:

mvn -q clean package -Dbnd.version=3.3.0 && \
  unzip -l target/test-bnd-process-conditional-blueprint-0.0.1-SNAPSHOT.jar | \
  grep -e com/google/common/cache/CacheBuilder.class -e com/google/common/eventbus/EventBus.class
    18643  2024-12-15 12:43   com/google/common/cache/CacheBuilder.class
     4734  2024-12-15 12:43   com/google/common/eventbus/EventBus.class

3.4.0

mvn -q clean package -Dbnd.version=3.4.0 && \
  unzip -l target/test-bnd-process-conditional-blueprint-0.0.1-SNAPSHOT.jar | \
  grep -e com/google/common/cache/CacheBuilder.class -e com/google/common/eventbus/EventBus.class

7.1.0

mvn -q clean package -Dbnd.version=7.1.0 && \
  unzip -l target/test-bnd-process-conditional-blueprint-0.0.1-SNAPSHOT.jar | \
  grep -e com/google/common/cache/CacheBuilder.class -e com/google/common/eventbus/EventBus.class

Can't confirm 100% but it is probably the case with current master branch as well.

The testcase tests both simple and factory bean but it probably only any of these is enough as it is not a root issue.

Any chance this fix could be merged to 6.x series (the last supporting Java 8) as well?

@modax modax changed the title conditionalpackage is no longer works with Blueprint since 3.4.0 conditionalpackage no longer works with Blueprint since 3.4.0 Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant