Hi Richard,

Not sure what the problem could be offhand. Are you using the pre-3.0 
codebase, or is this a customized version of 1.8?  Is there any code you 
can share?

A few hints on "debugging" POM or dependency issues..

1) Sometimes looking at the "effective POM" may help..

mvn help:effective-pom

This command will output the actual full POM that Maven sees 
(essentially a combination of the default POM + any parent POMs + the 
project POM). It will be large output though, but you may want to look 
closely to be sure that the dependencies you added look correct (i.e. 
correct version, etc) in this POM.  As Graham mentioned, if you aren't 
very explicit about version numbers, Maven may assume the wrong version 
-- this effective POM should show you what version Maven is assuming you 
want

2) If you are running the same command, and this issue is only happening 
on a single server, it is possible your local Maven cache 
(~/.m2/repository/) could be to blame.  In situations where Maven 
doesn't know what version you want, it will often (always?) default to 
what version is sitting in your local cache (even if there is a newer 
version in Maven Central).  So, as another debugging tool, you could 
delete (or temporarily move) your ~/.m2/repository/ folder. This will 
obviously cause Maven to re-download all dependencies. Watching the 
Maven log as it re-downloads all your dependencies can be eye opening, 
especially if it begins to download some unexpected transitive dependency.

Those are the only ideas I have off the top of my head.  Graham's 
suggestions are also great. I've also been bitten many times by the two 
things he mentions that you need to watch out for.

Finally... I know someone mentioned this, but the new 
"[src]/dspace/modules/additions/" module in DSpace 3.0 is the new 
recommended way to do this sort of thing. So, you could also copy that 
model's setup & try and use it.

https://github.com/DSpace/DSpace/tree/master/dspace/modules/additions
https://wiki.duraspace.org/display/DSDOC3x/Advanced+Customisation#AdvancedCustomisation-Additionsmodule

- Tim

On 11/21/2012 4:44 AM, Richard Jones 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

Reply via email to