File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
it/MCOMPILER-268_modulepath
main/java/org/apache/maven/plugin/compiler Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 1919def log = new File ( basedir, ' build.log' ). text
2020
2121assert log. count( " --module-path" ) == 2
22+
23+ def descriptor = java.lang.module.ModuleFinder . of(basedir. toPath(). resolve(" target/classes" )). find( " M.N" ). get(). descriptor()
24+ assert ' 1.0-SNAPSHOT' == descriptor. version(). get() as String
25+ assert ' M.N@1.0-SNAPSHOT' == descriptor. toNameAndVersion()
Original file line number Diff line number Diff line change @@ -305,6 +305,14 @@ protected void preparePaths( Set<File> sourceFiles )
305305 {
306306 modulepathElements .add ( file .getPath () );
307307 }
308+
309+ if ( compilerArgs == null )
310+ {
311+ compilerArgs = new ArrayList <String >();
312+ }
313+ compilerArgs .add ( "--module-version" );
314+ compilerArgs .add ( getProject ().getVersion () );
315+
308316 }
309317 catch ( IOException e )
310318 {
You can’t perform that action at this time.
0 commit comments