Reputation: 397
With JLink, I'm able to build my application with a tiny JVM. For now, the build is monolithic: all the java modules are melt inside one file (which can be extracted with jimage):
jlinkImage/
└──lib/
└──modules
Now, I'd like to make incremental builds: when I deploy my application, I would like to only upload modules that changed since the last release.
Can JLink be configured to export the different java modules in separated files?
e.g.
jlinkImage/
└──lib/
└── moduleA
└── moduleB
└── moduleC
Upvotes: 3
Views: 344
Reputation: 397
After a deeper look on this question:
A rough answer is no. This is not the purpose of JLink, it only serve to build a tight JRE.
However, the JRE produced by JLink can still be extended with external modules. Here a simple way to separate modules in different files:
jlink --add-modules java.base,java.xml --output minimalJre
minimalJre/
└──modules/
└── moduleA
└── moduleB
└── moduleC
bin/java -p modules/ <other args>
Upvotes: 1