@@ -187,7 +187,7 @@ the _add-module-info_ goal as follows:
187
187
<goal >add-module-info</goal >
188
188
</goals >
189
189
<configuration >
190
- <jvmVersion >9 </jvmVersion >
190
+ <jvmVersion >11 </jvmVersion >
191
191
<module >
192
192
<moduleInfo >
193
193
<name >com.example</name >
@@ -204,8 +204,15 @@ the _add-module-info_ goal as follows:
204
204
...
205
205
```
206
206
207
- The optional ` jvmVersion ` element allows to define for which JVM version the module descriptor should be created.
208
- When defined, the module descriptor will be put into ` META-INF/versions/${jvmVersion} ` , otherwise it will be put into the root of the final JAR.
207
+ The optional ` jvmVersion ` element allows to define which JVM version the module descriptor should target
208
+ (leveraging the concept of multi-release JARs).
209
+ When defined, the module descriptor will be put into ` META-INF/versions/${jvmVersion} ` .
210
+ The value must be ` 9 ` or greater.
211
+ The special value ` NONE ` can be used to add the descriptor to the root of the final JAR.
212
+ By default, ` 9 ` is used, i.e. module descriptors will go into ` META-INF/versions/9 ` .
213
+ This is to ensure a maximum of compatibility with older libraries scanning class files that may fail when encountering the ` module-info.class ` file
214
+ (and chances are much lower that such tool will look for class files under ` META-INF/versions/... ` ).
215
+ For tools aware of the module system the effect of having the module descriptor in the JAR root and under ` META-INF/versions/9 ` should be the same.
209
216
210
217
The following configuration options exist for the ` <module> ` configuration element:
211
218
@@ -352,7 +359,7 @@ current build will be used). Must unambiguously identify one toolchain entry of
352
359
that matches all given requirements in its ` <provides> ` configuration. This can be used for
353
360
creating runtime images on one platform (e.g. OS X) while targeting another (e.g. Linux).
354
361
* ` ignoreSigningInformation ` : Suppresses a fatal error when signed modular JARs are linked
355
- in the runtime image. The signature-related files of the signed modular JARs aren’t copied
362
+ in the runtime image. The signature-related files of the signed modular JARs aren’t copied
356
363
to the runtime image.
357
364
358
365
Once the image has been created, it can be executed by running:
0 commit comments