Thanks Nick. This is the file I was referring to: https://github.com/apache/guacamole-client/blob/main/extensions/guacamole-auth-header/pom.xml
which doesn't have a Guice version. But at the root: https://github.com/apache/guacamole-client/blob/main/pom.xml I see it's 5.1.0, so I've used that (even though 7 did appear to work and run OK). That did mean the extension on its own outside the main source tree wouldn't compile though... I also realised that of course the version of maven / java I have installed to build the extension isn't really that relevant, as I'm copying the extension into the docker container to run it, so I guess that's where the mismatch was showing up. On Tue, 2 Jul 2024 at 12:40, Nick Couchman <vn...@apache.org> wrote: > On Fri, Jun 28, 2024 at 4:41 AM David Lomas <d...@pale-eds.co.uk.invalid> > wrote: > >> Thanks Nick—the errors when building the stock header extension were: >> >> [ERROR] The project org.apache.guacamole:guacamole-auth-header:1.5.4 >> (/home/test/guacamole-auth-header/pom.xml) has 1 error >> [ERROR] 'dependencies.dependency.version' for >> com.google.inject:guice:jar is missing. @ line 44, column 21 >> >> > Hmmm - almost seems like your starting point was a commit that was already > broken. > > >> and: >> >> [ERROR] COMPILATION ERROR : >> [INFO] ------------------------------------------------------------- >> [ERROR] Source option 5 is no longer supported. Use 6 or later. >> [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later. >> >> I had assumed that I needed to target the version of Java installed: >> >> > Wow, the Guacamole code has been at 8/1.8 for a couple of years, now (I > think we finally moved from 6/1.6 to 8/1.8 at Guacamole 1.4 or something > like that). > > >> $ mvn --version >> Apache Maven 3.6.3 >> Maven home: /usr/share/maven >> Java version: 11.0.23, vendor: Ubuntu, runtime: >> /usr/lib/jvm/java-11-openjdk-amd64 >> Default locale: en_GB, platform encoding: UTF-8 >> OS name: "linux", version: "5.15.0-112-generic", arch: "amd64", family: >> "unix" >> >> But having changed it to 8 / 1.8 from what you said, the extension now >> compiles and loads. >> >> > No, you need not have the target or compiler set to the same version of > Java that you have installed, it just needs to be the same or older than > you have installed. So, Java 11 can compile 11, 8, 6, etc. > > >> The pom for this extension doesn't include a version line for Guice, and >> I've 'successfully' built and loaded with version 7 using source 8 / target >> 1.8, which you seemed to suggest shouldn't work? I haven't actually tested >> that the extension is working properly, only that it loads when guac >> starts. But what version of Guice should I be using? Perhaps it's specified >> somewhere else in the main project, not in this extension? >> >> > I don't know that there's a specific Guice version that you > should/shouldn't use; just be aware that if you change it from the version > that we've got in the pom.xml file, it may cause other dependency issues. > Also, if you're using Guice 7, then I think that Java 11 or later is > required, which means you should probably set the target Java version to > 11, even if it does compile with it set to 8. > > We typically try to keep the dependencies as late as we possibly can while > maintaining some backward-compatibility - the 1.x series of Guacamole will > likely stay at Java 8 compatibility, and then we'll move to Java 11 > compatibility when we move to version 2.0, which will have some major > changes (AngularJS -> Angular, Tomcat 11, etc.). > > -Nick > >>