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

Allow specifying where to put module-info #53

Closed
beikov opened this issue Apr 20, 2018 · 3 comments
Closed

Allow specifying where to put module-info #53

beikov opened this issue Apr 20, 2018 · 3 comments
Milestone

Comments

@beikov
Copy link
Contributor

beikov commented Apr 20, 2018

I have a problem that early versions of Jandex can't handle JAR files containing a module-info.class. It is fixed in newer versions, but since it is possible to put the module-info.class to META-INF/versions/9 I would rather do that to avoid forcing my users to update their dependencies. I suggest adding a new configuration parameter to add-module-info that takes the JDK version where the module-info should be put to. I can create a PR for that if you agree this is a good solution.

@gunnarmorling
Copy link
Member

Hey @beikov, welcome to the project! What you suggest sounds great, so a PR would definitely be welcome. Thanks in advance!

It also might be interesting to add different module-info.class descriptors for different versions in a multi-release JAR, I suppose that'd even work already with your proposed change, using multiple executions of the add-module-info goal.

The implementation should be straight-forward, one issue is though that ModiTect is lacking some good testing strategy (I mostly test manually by running the integration tests and inspecting their outcome). If you have any ideas for testing your change in a more automated manner, I'm all for it :)

@beikov
Copy link
Contributor Author

beikov commented Apr 20, 2018

I added a test that checks the JAR properly starts in a modular environment similar to the test you already had. We could add asserts for the contents of the JAR as well, but I think it's a good enough assert to check if the module works in the modular mode.

@beikov
Copy link
Contributor Author

beikov commented Apr 20, 2018

Could you please release another beta after merging this? 😀
I added the plugin to several projects and would like to avoid removing it again or pushing these changes to a separate branch.

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

2 participants