
connid - issue #6
Google app connector lacks dependencies in output jar (patch included)
The google apps connector includes an assembly configuration to create a jar file suitable for deployment in a bundle directory.
However, it does not include all external dependencies, throwing ClassNotFoundExceptions upon usage.
The supplied patch (see attachment) fixes this by adding a <dependencySet> to the assembly. It also marks two framework dependencies in pom.xml as provided (because the bundle is to be run within a framework anyway, so the framework jars will be provided by, well, the framework). Otherwise these framework jars would be included in the jar as well.
Comment #1
Posted on Aug 23, 2011 by Helpful Pandaframework and framework-internal bundles are not meant to be included in JAR bundles, by the original IdentityConnectors Framework (see http://code.google.com/p/connid/wiki/ConnectorBundles#Inside_the_Bundle_JAR): the idea is that the external application using bundles will load these two files (see http://code.google.com/p/connid/wiki/UsingConnectorsInAnApplication).
Hence the scope of the two dependencies in the pom.xml.
Besides that, I'll apply your patch for including com.google.gdata:gdata-appsforyourdomain-1.0 in the JAR bundle.
Comment #2
Posted on Aug 23, 2011 by Helpful Panda(No comment was entered for this change.)
Comment #3
Posted on Aug 23, 2011 by Helpful Panda(No comment was entered for this change.)
Comment #4
Posted on Aug 23, 2011 by Helpful PandaA new release of the GoogleApps connector - 1.3.2 - has been scheduled for publication on central maven repository: should happen in less than two hours.
Comment #5
Posted on Aug 23, 2011 by Helpful RhinoFransesco,
I'm sorry, but your change to the patch breaks the fix I proposed. By adding the '' part which only includes the dependency on gdata-appsforyourdomain, you effectively exclude all transitive dependencies of gdata-appsforyourdomain, resulting in more ClassNotFoundExceptions (5 transitive dependencies are needed by gdata-appsforyourdomain)
I see three possible fixes for this: - specify an exclude for the framework jars instead of an include for gdata-appsforyourdomain - twiddle with useTransitiveDependencies/useTransitiveFiltering (although I'm not sure this will actually fix it) - apply the whole patch I proposed, including the provided-scope for framework*
I'm not sure I understand the framework-dependencies completely. The documentation says nothing about the framework jars having to be included in the bundles, right? And it also uses the parent's classloader, so the bundle can always use the framework dependencies from its parent classloader. So I see no benefit in including the framework jars with each bundle. Please correct me if I'm wrong.
Comment #6
Posted on Aug 23, 2011 by Helpful PandaUhm, you are right about transitive dependencies, I did not consider this.
The exclude clause seems to be the right choice for me.
Comment #7
Posted on Aug 24, 2011 by Helpful PandaIt seems that your patch does the right job, sorry for not seeing this at a glance :-)
Just committed and release the new (1.3.3) version on the central maven repository in more or less a couple of hours.
Comment #8
Posted on Aug 24, 2011 by Helpful PandaThis issue was closed by revision r92.
Status: Fixed
Labels:
Type-Defect
Priority-Medium