Skip to content

Commit

Permalink
[MCOMPILER-426] add flag to enable-preview java compiler feature (#98)
Browse files Browse the repository at this point in the history
* [MCOMPILER-426] add flag to enable-preview java compiler feature
* use plexus-compiler 2.11.1 version

Signed-off-by: Olivier Lamy <olamy@apache.org>
  • Loading branch information
olamy authored Mar 7, 2022
1 parent 1de8c91 commit 6795b0f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ under the License.
! The following property is used in the integration tests MCOMPILER-157
-->
<mavenPluginPluginVersion>3.5</mavenPluginPluginVersion>
<plexusCompilerVersion>2.11.0</plexusCompilerVersion>
<plexusCompilerVersion>2.11.1</plexusCompilerVersion>

<groovyVersion>2.4.21</groovyVersion>
<groovyEclipseCompilerVersion>3.7.0</groovyEclipseCompilerVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@ public abstract class AbstractCompilerMojo
@Parameter( property = "maven.compiler.parameters", defaultValue = "false" )
private boolean parameters;


/**
* Set to <code>true</code> to Enable preview language features of the java compiler
* @since 3.10.1
*/
@Parameter( property = "maven.compiler.enablePreview", defaultValue = "false" )
private boolean enablePreview;

/**
* Set to <code>true</code> to show messages about what the compiler is doing.
*/
Expand Down Expand Up @@ -695,6 +703,8 @@ public void execute()

compilerConfiguration.setParameters( parameters );

compilerConfiguration.setEnablePreview( enablePreview );

compilerConfiguration.setVerbose( verbose );

compilerConfiguration.setShowWarnings( showWarnings );
Expand Down

0 comments on commit 6795b0f

Please sign in to comment.