diff --git a/plexus-compilers/plexus-compiler-eclipse/src/main/java/org/codehaus/plexus/compiler/eclipse/EclipseJavaCompiler.java b/plexus-compilers/plexus-compiler-eclipse/src/main/java/org/codehaus/plexus/compiler/eclipse/EclipseJavaCompiler.java index c18128a7..04673009 100644 --- a/plexus-compilers/plexus-compiler-eclipse/src/main/java/org/codehaus/plexus/compiler/eclipse/EclipseJavaCompiler.java +++ b/plexus-compilers/plexus-compiler-eclipse/src/main/java/org/codehaus/plexus/compiler/eclipse/EclipseJavaCompiler.java @@ -151,7 +151,7 @@ public CompilerResult performCompile( CompilerConfiguration config ) { args.add( "-parameters" ); } - + if(config.isFailOnWarning()) { args.add("-failOnWarning"); @@ -184,9 +184,9 @@ public CompilerResult performCompile( CompilerConfiguration config ) String[] annotationProcessors = config.getAnnotationProcessors(); List processorPathEntries = config.getProcessorPathEntries(); List processorModulePathEntries = config.getProcessorModulePathEntries(); - - if ( ( annotationProcessors != null && annotationProcessors.length > 0 ) - || ( processorPathEntries != null && processorPathEntries.size() > 0 ) + + if ( ( annotationProcessors != null && annotationProcessors.length > 0 ) + || ( processorPathEntries != null && processorPathEntries.size() > 0 ) || ( processorModulePathEntries != null && processorModulePathEntries.size() > 0 ) ) { if ( annotationProcessors != null && annotationProcessors.length > 0 ) @@ -209,10 +209,10 @@ public CompilerResult performCompile( CompilerConfiguration config ) args.add( "-processorpath" ); args.add( getPathString( processorPathEntries ) ); } - + if ( processorModulePathEntries != null && processorModulePathEntries.size() > 0 ) { - args.add( "-processorpath" ); + args.add( "--processor-module-path" ); args.add( getPathString( processorModulePathEntries ) ); } @@ -229,6 +229,13 @@ public CompilerResult performCompile( CompilerConfiguration config ) args.add( "-classpath" ); args.add( getPathString( classpathEntries ) ); + List modulepathEntries = config.getModulepathEntries(); + if ( modulepathEntries != null && !modulepathEntries.isEmpty() ) + { + args.add( "--module-path" ); + args.add( getPathString( modulepathEntries ) ); + } + // Collect sources List allSources = new ArrayList<>(); for ( String source : config.getSourceLocations() )