A simpler version, for anyone who needs it, is just this: # This patch file was generated by NetBeans IDE # It uses platform neutral UTF-8 encoding and \n newlines. --- a/pom.xml +++ b/pom.xml @@ -336,10 +336,8 @@ <version>3.1</version> </requireMavenVersion> <requireJavaVersion> - <version>[1.7,12)</version> - <message>Requires at least Java 7, and - Java versions higher than 11 cannot - build Java 6 bytecode</message> + <version>[1.7,)</version> + <message>Requires at least Java 7.</message> </requireJavaVersion> </rules> </configuration> -- Randolph M. Fritz || +1 206 659-8617 || rmfri...@gmail.com
On Mon, Jul 6, 2020 at 9:38 PM Randolph Fritz <rmfri...@gmail.com> wrote: > Thank you! That led me right to the problem. The Maven plugin > configuration in the parent specifically forbids a Java version higher than > 11. Since my target is JDK 9, I don’t care about JDK 6 bytecode anyway, so > I relaxed that rule and it built fine. > > Diff: > > # This patch file was generated by NetBeans IDE > # It uses platform neutral UTF-8 encoding and \n newlines. > --- a/pom.xml > +++ b/pom.xml > @@ -229,8 +229,8 @@ > <!-- fails with maven 3.6.0 on jdk 6, works with 3.2.1, > 3.5.0 and 3.5.2 --> > <configuration> > <showDeprecation>true</showDeprecation> > - <target>1.6</target> > - <source>1.6</source> > + <target>9</target> > + <source>9</source> > <encoding>UTF-8</encoding> > <!-- > https://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html > --> > <executable>${jdk.path}/bin/javac</executable> > @@ -325,6 +325,7 @@ > <plugins> > <plugin> > <artifactId>maven-enforcer-plugin</artifactId> > + <version>3.0.0-M3</version> > <executions> > <execution> > <goals> > @@ -336,10 +337,8 @@ > <version>3.1</version> > </requireMavenVersion> > <requireJavaVersion> > - <version>[1.7,12)</version> > - <message>Requires at least Java > 7, and > - Java versions higher than 11 > cannot > - build Java 6 > bytecode</message> > + <version>[1.7,)</version> > + <message>Requires at least Java > 7</message> > </requireJavaVersion> > </rules> > </configuration> > > > > -- > Randolph > > On Jul 6, 2020, at 8:29 PM, Tilman Hausherr <thaush...@t-online.de> wrote: > > Could you try to set a newer version for > > maven-enforcer-plugin > > > in the parent pom.xml? 3.0.0-M3 is the one we're using for the trunk. > 1.4.1 is the previous one, really. > > Tilman > > Am 07.07.2020 um 01:15 schrieb Randolph M. Fritz: > > I'm using Netbeans 12.0 and OpenJDK 13. I have downloaded the pdfbox 2.20 > examples, but when I try to build them, I get a complaint: > > --- maven-enforcer-plugin:1.4.1:enforce (default) @ pdfbox-examples --- > Rule 1: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with > message: > Requires at least Java 7, and Java versions higher than 11 cannot build > Java 6 bytecode > > Is there some option I can set (I have tried quite a few) that will make > these build in my environment, or do I just have to use the trunk version > of pdfbox? > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org > For additional commands, e-mail: users-h...@pdfbox.apache.org > > >