On 25 January 2018 at 13:01, Gilles <[email protected]> wrote: > On Thu, 25 Jan 2018 12:21:25 +0000, sebb wrote: >> >> On 25 January 2018 at 11:57, Gilles <[email protected]> wrote: >>> >>> On Thu, 25 Jan 2018 11:44:49 +0000, sebb wrote: >>>> >>>> >> ... >> >>>> There are two ways to compile of Java 6: >>>> >>>> Build with Java 6 >>>> Build with a later version, but use the profile: -Pjava-1.6 >>> >>> >>> >>> FTR: this does not seem to work anymore on Jenkins: Job >>> "commons-rng" had been failing for many days without notice. >> >> >> What do you mean by 'without notice'? >> - no notification to the mailing lists >> - no-one seems to care about the failures >> - something else? > > > Day "d", it worked; day "d+1" it didn't. No config change performed > by me. Remarks noted in the job description, not by me (by INFRA > people?). > >> And what is the failure? >> >> AFAICT Commons-RNG is not using Java 6 > > > Do you mean the library, or the Jenkins job (as currently configured)? > > The source code is certainly Java 6-compatible.
OK, I was fooled by the Jenkins -Pjava-1.8 setting. > A couple of days ago, I changed the Jenkins config to use JDK 8. ... > The POM directs the compiler to produce Java 6-compatible bytecode; > a local check confirmed that the class version was "50.0". Yes, but it won't necessarily detect Java7+ syntax or methods. >> so if there is a problem >> related to Jenkins it is something different from problems using >> -Pjava-1.6 which I assume also occur for local builds. > > > I suppose that Jenkins is there so that the projects can be compiled > and checked for compatibility in various consistent environments. > When configuring for Java 6, the following error occurs: > ---CUT--- > Exception in thread "main" java.lang.UnsupportedClassVersionError: > jenkins/maven3/agent/Maven35Main : Unsupported major.minor version 51.0 > ---CUT--- > > I seem to recall that newer versions of Jenkins and/or maven > required Java 7 (?). Yes, that has been noted a few times on this list. Jenkins needs Java 7+ So jobs that are targeted a Java 6 need special config e.g. with -Pjava-1.6 Again, I think that was reported on this list a few months back. > Perhaps it could work with older versions of maven (?). But > how to concile old maven with new plugins (and keep up with > "commons-parent")? Not sure what you mean here. > Gilles > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
