You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Oliver Jones <ol...@glance.net> on 2016/07/28 18:21:33 UTC

Custom auth provider source control?

Dear fellow squashers of avocados....

Is there a best way to handle source control for a custom authentication
provider extension?

A fork of the github tree?  A separate repo?

I've tried the separate repo approach, and found that I have to copy the
files of the that repo into the main source tree to get Maven to make my
extension jarfile.

Any suggestions?
Ollie Jones

Re: Custom auth provider source control?

Posted by Oliver Jones <ol...@glance.net>.
>
> On Fri, Jul 29, 2016 at 1:38 PM, Mike Jumper <mi...@guac-dev.org>
> wrote:
>
>> The best way to write an authentication extension is to make a
>> separate Maven project, presumably in its own repository.
>>
>
Right. And for that to work properly with the org.apache.guacamole source
code, it's necessary first to build the incubator-guacamole-client repo
using

    mvn package install

to put the necessary artifacts into your local maven ( ~/.m2/ ) cache. Then
the extension build works correctly.

I suppose at some time in the future the org.apache.guacamole artifacts
will make it to The Central Repository. But they're not there now.

Ollie Jones

Re: Custom auth provider source control?

Posted by Oliver Jones <ol...@glance.net>.
On Fri, Jul 29, 2016 at 1:38 PM, Mike Jumper <mi...@guac-dev.org>
wrote:

> The best way to write an authentication extension is to make a
> separate Maven project, presumably in its own repository.
>

OK. I'll try to sort this out. My problems may have been an artifact of the
move from glyptodon to apache.
Thanks.

Re: Custom auth provider source control?

Posted by Mike Jumper <mi...@guac-dev.org>.
On Thu, Jul 28, 2016 at 11:21 AM, Oliver Jones <ol...@glance.net> wrote:
> Dear fellow squashers of avocados....
>
> Is there a best way to handle source control for a custom authentication
> provider extension?
>
> A fork of the github tree?  A separate repo?
>

The best way to write an authentication extension is to make a
separate Maven project, presumably in its own repository. The new
project shout not be part of the main source tree. In fact, the only
case where you should do such a thing is if you intend to contribute
that extension upstream such that it's part of the main Guacamole
build.

> I've tried the separate repo approach, and found that I have to copy the
> files of the that repo into the main source tree to get Maven to make my
> extension jarfile.

This is definitely not necessary. If your project will not build
unless it's part of the Guacamole source tree, then it sounds like
something is off in your pom.xml.

The pom.xml of an extension must:

1) Depend on the same guacamole-ext used by the web application (using
scope "provided").
2) Depend on the same guacamole-common used by the web application
(this will be pulled as a transitive dependency via guacamole-ext).
3) NOT reference the parent "guacamole-client" project (this is only
needed for extensions that are intended to be part of the Guacamole
source).
4) Result in building a .jar that contains (a) your extension's
classes, (b) the classes of all non-provided dependencies (not .jars -
the classes), and (c) the extension's guac-manifest.json.

If you think the .jar should satisfy the above, a quick way to verify
would be to unzip the built .jar to see if the contents are truly what
you expect.

- Mike