Re: Maven Dependency Glitch

2019-02-12 Thread Nick Couchman
On Tue, Feb 12, 2019 at 18:32 Mike Jumper  wrote:

> On Mon, Feb 11, 2019 at 3:33 PM Nick Couchman  wrote:
>
> > After a question on the mailing list recently I decided to try to write
> an
> > extension that starts a Docker container upon login and sets up a
> > connection to the container automatically.  I decided to use the
> > docker-java client:
> >
> > https://github.com/docker-java/docker-java
> >
> > I've run into an interesting issue with this.  If I include the
> dependency
> > normally - without specifying a scope - it pulls in between 15 and 20 MB
> > (!) of dependencies - the overall size of the target file is between 18
> and
> > 20 MB.  Interestingly Guacamole fails to load this extension with an
> error
> > that the Authentication Provider class cannot be found.  It's almost as
> if
> > there is a size limitation, either overall file size in bytes, or number
> of
> > entries within the JAR, that the load chokes on.  I cannot find anywhere
> in
> > the Guacamole code where this is specified, so I'm not sure where the
> > limitation is, or if that's really the issue, but it seems that way.
> >
>
> Might the .jar be signed?
>
> Does the documentation for the docker-java client indicate that some other
> dependencies must be manually added?
>

Yeah, I bet that is it.  In fact, I remember seeing Bouncycastle get pulled
in by the Docker client as a dependency, and I seem to remember hitting an
issue with that one when building the RADIUS module.  I'll have to dig up
my notes for what to do - seems like there is a specific file that has to
be excluded, and I'll be the pom.xml from the radius authentication
extension has it in there.

I did figure out how to build the JAR for the Docker client with all
dependencies and placed that in the lib directory, and that works, as well.

-Nick


Re: Maven Dependency Glitch

2019-02-12 Thread Mike Jumper
On Mon, Feb 11, 2019 at 3:33 PM Nick Couchman  wrote:

> After a question on the mailing list recently I decided to try to write an
> extension that starts a Docker container upon login and sets up a
> connection to the container automatically.  I decided to use the
> docker-java client:
>
> https://github.com/docker-java/docker-java
>
> I've run into an interesting issue with this.  If I include the dependency
> normally - without specifying a scope - it pulls in between 15 and 20 MB
> (!) of dependencies - the overall size of the target file is between 18 and
> 20 MB.  Interestingly Guacamole fails to load this extension with an error
> that the Authentication Provider class cannot be found.  It's almost as if
> there is a size limitation, either overall file size in bytes, or number of
> entries within the JAR, that the load chokes on.  I cannot find anywhere in
> the Guacamole code where this is specified, so I'm not sure where the
> limitation is, or if that's really the issue, but it seems that way.
>

Might the .jar be signed?

Does the documentation for the docker-java client indicate that some other
dependencies must be manually added?


> Any ideas the best way to proceed with this, either any insight on the
> limitation for the file size for a Guacamole extension, or how to correctly
> generate a JAR for the Docker client that could be placed into a lib
> directory (similar to a JDBC driver) that would contain the correct
> dependencies?
>

There's definitely no size limit.

- Mike


Maven Dependency Glitch

2019-02-11 Thread Nick Couchman
After a question on the mailing list recently I decided to try to write an
extension that starts a Docker container upon login and sets up a
connection to the container automatically.  I decided to use the
docker-java client:

https://github.com/docker-java/docker-java

I've run into an interesting issue with this.  If I include the dependency
normally - without specifying a scope - it pulls in between 15 and 20 MB
(!) of dependencies - the overall size of the target file is between 18 and
20 MB.  Interestingly Guacamole fails to load this extension with an error
that the Authentication Provider class cannot be found.  It's almost as if
there is a size limitation, either overall file size in bytes, or number of
entries within the JAR, that the load chokes on.  I cannot find anywhere in
the Guacamole code where this is specified, so I'm not sure where the
limitation is, or if that's really the issue, but it seems that way.

I decided to try to specify the docker-java dependency as "provided" and
then build docker-java JAR file and put it in the Java classpath.  This
works okay for the docker-java piece, but building that JAR doesn't
generate all of the dependencies for the Docker client (e.g. Google Guava
is missing from the resulting JAR), so I get errors about missing classes.

Any ideas the best way to proceed with this, either any insight on the
limitation for the file size for a Guacamole extension, or how to correctly
generate a JAR for the Docker client that could be placed into a lib
directory (similar to a JDBC driver) that would contain the correct
dependencies?

I could use a different Docker Java client - Spotify seems to have one
available that I haven't tried, yet - but I've gotten used to the API on
this one and would rather not redo it for another client.

Thanks,
Nick