maven-compiler-plugin java 11 code example

Example 1: maven pom java 11

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.8.0</version>
    <configuration>
        <release>11</release>
    </configuration>
</plugin>

Example 2: maven compiler plugin for java 13

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-compiler-plugin</artifactId>
	<version>3.8.0</version>
	<configuration>
		<release>13</release>
		<compilerArgs>
			--enable-preview
		</compilerArgs>
	</configuration>
</plugin>

Example 3: maven-dependency-plugin

maven-dependency-plugin

Tags:

Misc Example