> We (as Maven developers) will have to use Java 11 to build plugins but
> not be able to use Java 11 features in the code.
> That sounds frustrating to me :)
> Or I don't understand the change you are trying to propose?

Not at all. This is how I did it at work.
This already removes a lot of frustration because it removes some
complexity from the build.



Am Di., 14. Nov. 2023 um 09:01 Uhr schrieb Olivier Lamy <ol...@apache.org>:
>
> oh right, sorry I didn't read correctly.
> Do you want to build with Java 11 as a minimum but limit to the usage of Java 
> 8?
> What is the point?
> We (as Maven developers) will have to use Java 11 to build plugins but
> not be able to use Java 11 features in the code.
> That sounds frustrating to me :)
> Or I don't understand the change you are trying to propose?
>
> My confusion was I read let's make java 11 as a minimum for plugins.
> Which sounds a good change to me.
> That's why I was thinking about some bytecode enforcer rule to check
> plugins bytecode and not only dependencies so users stucked with Java
> 8 can add such rule.
>
>
> On Tue, 14 Nov 2023 at 17:45, Olivier Lamy <ol...@apache.org> wrote:
> >
> > Hi
> > Do we have a bytecode enforcer rule but for plugins?
> > That would help users who are eventually stuck with Java 8 and so cannot 
> > upgrade plugins going to be 11 required.
> >
> >
> >
> > Cheers
> > Olivier
> >
> >
> > On Tue, 14 Nov 2023 at 5:38 am, Karl Heinz Marbaise <khmarba...@gmx.de> 
> > wrote:
> >>
> >> Hi,
> >>
> >> currently we have already the build requirements for Maven Core at JDK11+
> >>
> >> So in consequence I would suggest to lift the minimum requirement for
> >> building plugins to JDK11.
> >>
> >> That means also we can use "--release 8" option
> >> (<maven.compiler.release>8</maven.compiler.release>) instead of
> >> source/target which is not correct based on the warnings we get like:
> >> "[WARNING] bootstrap class path not set in conjunction with -source 8"
> >> which we get in all plugins based on the configuration in maven parent
> >> using this:
> >>
> >>      <javaVersion>8</javaVersion>
> >>      <maven.compiler.source>1.${javaVersion}</maven.compiler.source>
> >>      <maven.compiler.target>1.${javaVersion}</maven.compiler.target>
> >>
> >> which is not correct because we don't use animalsniffer anymore.
> >>
> >> So my suggestion is to lift the JDK build requirements to JDK11...
> >> and use the <maven.compiler.release>8</maven.compiler.release> which
> >> will prevent the warning. Also brings us back the safety net which
> >> animal-sniffer was before.
> >>
> >>
> >> Later on version of maven-parent (v42?) should change the whole
> >> configuration (there are some related parts like maven-pmd-plugin,
> >> maven-enforcer-plugin (enforce-byte-code max)..also toolchain-plugin...
> >>
> >> Furthermore we could get rid of the profile for JDK11+ related to
> >> spotless-maven-plugin ...
> >>
> >> Based on the upgrade to maven-parent v41 we could also enhance the build
> >> pipelines to build on JDK21
> >>
> >> WDYT?
> >>
> >> Kind regards
> >> Karl Heinz Marbaise
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> >> For additional commands, e-mail: dev-h...@maven.apache.org
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to