I need to access the compiler target version from within a maven plugin.
I can access the property ${maven.compiler.target}
, but that property may not be set explicitly.
I also thought about accessing the configuration of the maven-compiler-plugin
, but the Configuration object of the Plugin is always null.
But maybe there is even a better approach.
What is the recommended way to access the compiler target version from within a maven plugin?