Hi,
On 22/11/12 15:02, Andrea Schweer wrote:
> On 22/11/12 01:55, Richard Jones wrote:
>> The issue, though, seems to be with the transitive
>> dependencies - they are not being pulled into either the offline lib
>> or the webapps, which is baffling me. Not least because it works fine
>> in my dev environment, but not in the live environment.
> I've run into this as well but have no idea why it's happening or what
> to do about it. I added my dependency to the dspace-api pom (1.8.2) so
> that it gets pulled into [dspace]/lib and also into the lib dirs of the
> web applications. Dependencies of my artifact don't get pulled into
> [dspace]/lib nor into eg [dspace]/webapps/xmlui/WEB-INF/lib, just like
> for Richard.
Adding <scope>provided</scope> to the dspace-api dependency in the
custom module appears to resolve the issue. I assume maven behaves like
this to avoid problems with circular dependencies.
As in, my dspace-api pom declares a dependency on a custom module. The
custom module declares a dependency on dspace-api and also on some
external libraries. When the dspace-api dependency in the custom
module's pom is like this, the external libraries aren't pulled in when
I rebuild dspace:
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-api</artifactId>
<version>1.8.2</version>
</dependency>
But when the dependency is set up like this instead, everything works as
expected:
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-api</artifactId>
<version>1.8.2</version>
<scope>provided</scope>
</dependency>
Since I never intend to use my custom module by itself, I guess the
"provided" scope makes sense since the dspace-api jar will in fact be
provided wherever the custom module is used.
cheers,
Andrea
--
Dr Andrea Schweer
IRR Technical Specialist, ITS Information Systems
The University of Waikato, Hamilton, New Zealand
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel