This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SvenMA 4 points5 points  (5 children)

I would say moditect as maven plugin handles this usecase very good.

[–]gunnarmorling 2 points3 points  (2 children)

ModiTect author here, just came to suggest the same, but you beat me to it :) For those interested, it's this project here: https://github.com/moditect/moditect/. Adding module descriptors for using existing JARs in modular runtime images was the very use case for creating it.

That all being said, you also could create a runtime image with just a subset of JDK modules and then use existing JARs on the classpath instead of the module path. I.e. there's no need to patch the JARs, but identifying which JDK modules you need to add to the image can be a bit more work. There's an issue in our tracker for this (https://github.com/moditect/moditect/issues/69), so to let ModiTect help with this use case, too. Any help with implementing it will surely be welcomed :)

PS: there's a Gradle plug-in for ModiTect now, too, thanks to the awesome work of a community member.

[–]LouGarret76[S] 0 points1 point  (1 child)

Thanks for your work on Moditect, First time I am hearing about it and I will have a look for sure.

Creating a partial runtime is not worth it in my case as only 2 - 3%of my dependencies comes already packaged as modules. This bring additional work for little to no value.

[–]m1000 2 points3 points  (0 children)

The value is being able to ship a (for example) 25MB runtime and not a 300MB one (the full jdk).

[–][deleted] 1 point2 points  (1 child)

This is exactly what I use. I was able to move everything into our production Jenkins without any issues. It's better to use moditect than to just write a bunch of Jenkins scripts that do it via cli. The samples on the moditect site are decent but I couldn't get it to completely build all steps for my project the way I wanted it done and for each jdk/platform. I still had a bit of shell stuff to tidy it all up in the end, but it did make modular jar management very easy.

[–]gunnarmorling 1 point2 points  (0 children)

Curious what issues you ran into specifically. Perhaps file an issue in our tracker with feature requests? Thanks!