Hi Richard,
I'm not sure if that's a wise approach.
The way I've done it, is that to inject dependencies into every (web)
application, I add a dependencies section to the pom.xml in the modules
directory (i.e. the parent of jspui, xmlui, etc.).
And to inject dependencies into the offline 'lib' directory, I add it to
the pom.xml in the root of the binary distribution, or the 'dspace'
directory of the source distribution (i.e. the parent of the modules
directory).
I'm only adding the dependency to one JAR, and the other JAR(s) are always
being pulled in via its transitive dependencies.
Two things you should watch out for though:
1) if you have dependencies on specific versions of JARs that are also
required by DSpace, you may need to add exclusions to stop it including the
ones referenced by DSpace.
2) if you have dependencies on additional Spring modules, and don't provide
exact version numbers (e.g. you allow Maven to use a range of versions),
then Maven 3 will [probably] select the wrong version of your Spring module.
Regards,
G
On 21 November 2012 10:44, Richard Jones <[email protected]> wrote:
> Hi Folks,
>
> A little further question about this ...
>
> I have had to work around the lack of support for adding code modules
> to the core of DSpace by patching the dspace-api pom.xml file so that
> my dependencies get pulled in everywhere they are relevant. I have
> encountered a strange problem though, which I haven't been able to
> resolve:
>
> In some environments, when I mvn clean package DSpace, my code
> library's jar file gets pulled in to all the webapps and to the core
> dspace lib directory, but none of /that/ library's dependencies get
> pulled in. So, the application doesn't work because whenever my code
> calls out to another library upon which it uniquely depends, there is
> a ClassNotFound exception.
>
> Perhaps there is an exclude filter somewhere in the build system, or a
> rule which says not to pull in certain dependencies?
>
> Cheers,
>
> Richard
>
>
> On Thu, Nov 1, 2012 at 10:37 AM, Richard Jones <[email protected]>
> wrote:
> > Hi Folks,
> >
> > Great, thanks for that - I think this is probably what I want, so when
> > we move to DSpace 3.0 I'll use that approach.
> >
> > Cheers,
> >
> > Richard
> >
> > On Tue, Oct 30, 2012 at 8:52 AM, helix84 <[email protected]> wrote:
> >> Hi Richard,
> >>
> >> Kevin just added this, I think it's related to what you're asking:
> >>
> >>
> https://wiki.duraspace.org/display/DSDOC3x/Advanced+Customisation#AdvancedCustomisation-Additionsmodule
> >>
> >> The change itself came from here:
> >> https://github.com/DSpace/DSpace/pull/3
> >>
> >> Regards,
> >> ~~helix84
>
>
> ------------------------------------------------------------------------------
> Monitor your physical, virtual and cloud infrastructure from a single
> web console. Get in-depth insight into apps, servers, databases, vmware,
> SAP, cloud infrastructure, etc. Download 30-day Free Trial.
> Pricing starts from $795 for 25 servers or applications!
> http://p.sf.net/sfu/zoho_dev2dev_nov
> _______________________________________________
> Dspace-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-devel
>
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel