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

exporting eclipsesource package in MANIFEST.MF #11318

Closed
wants to merge 7 commits into from

Conversation

mesutcelik
Copy link

fixes #10994

The problem in #10994 is that BundlePlugin generates MANIFEST.MF export/import packages before maven-shade-plugin relocates eclipsesource classes. That makes com.hazelcast.com.eclipsesource.json not visible to OSGI because Export-Package: in MANIFEST.MF is already generated.

Apparently, hazelcast-aws is using this package for JSON Parsing and fails in OSGI environment.

There are two solutions to that

  1. Remove com.hazelcast.com.eclipsesource.json dependency on hazelcast-aws and use directly any other JSON Parser
  2. Play with the order of maven plugin executions by first creating uber jar,extracting to classes folder, generate MANIFEST.MF and create the jar again.

I have tried to implement 2nd solution but It fails in the last part of creating jar file. I just commented maven-jar-plugin and seems the rest works fine.

@Donnerbart @hasancelik any idea?
You can simply run mvn clean package -DskipTests in this PR and see com.hazelcast.com.eclipsesource.json added as Export package.

@mesutcelik
Copy link
Author

run-lab-run

@mesutcelik
Copy link
Author

verify

@mesutcelik
Copy link
Author

mesutcelik commented Sep 13, 2017

This PR makes sure that following plugins run in package phase to generate include uber jar dependencies in Export-Package of MANIFEST.MF

package phase
maven-shade-plugin creates an uber jar with its two dependencies
maven-dependency-plugin unpacks uber jar for maven-bundle-plugin
maven-bundle-plugin generates MANIFEST.MF
maven-jar-plugin creates the jar file with latest MANIFEST.MF and classes

@devOpsHazelcast
Copy link
Collaborator

Test FAILed.

@mesutcelik
Copy link
Author

run-lab-run

1 similar comment
@hasancelik
Copy link
Contributor

run-lab-run

@mesutcelik mesutcelik changed the title [WIP]exporting eclipsesource package in MANIFEST.MF exporting eclipsesource package in MANIFEST.MF Sep 14, 2017
@mesutcelik
Copy link
Author

run-lab-run

@mesutcelik
Copy link
Author

@noctarius or @jerrinot Can you guys have a look at this when you have time?

@mesutcelik
Copy link
Author

please see #10994

@mesutcelik mesutcelik closed this Sep 22, 2017
@mmedenjak mmedenjak added the Source: Internal PR or issue was opened by an employee label Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Source: Internal PR or issue was opened by an employee
Projects
None yet
4 participants