Update Maven Java project properties
Apache 2.0The Java version is determined by several project properties, including:
java.versionjdk.versionjavaVersionjdkVersionmaven.compiler.sourcemaven.compiler.targetmaven.compiler.releasemaven.compiler.testSourcemaven.compiler.testTargetmaven.compiler.testReleaserelease.version
Properties of any other name are updated too when the maven-compiler-plugin source, target, release, testSource, testTarget or testRelease configuration of this pom, or of a pom it inherits from, resolves to them. A property whose value is only a reference to another property, such as <maven.compiler.release>${custom.release}</maven.compiler.release>, has the referenced property updated instead, so that anything else using it stays in sync. Each property is updated in the pom of the project that defines it, or overridden in the topmost pom of the project when it is inherited from outside of it.
If none of these properties are in use and the maven compiler plugin is not otherwise configured, adds the maven.compiler.release property.
org. openrewrite. maven. UpdateMavenProjectPropertyJavaVersionRequired
The Java version to upgrade to.
mod run . --recipe= org. openrewrite. maven. UpdateMavenProjectPropertyJavaVersion \
-P version=11Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.