Thanks Mark, this did the trick. Doh!
(my previous name was custom-api which explains why that one mysteriously
worked...)
Cheers,
Kim
-Original Message-
From: Mark Diggory [mailto:mdigg...@gmail.com]
Sent: Tuesday, 7 April 2009 12:40 p.m.
To: Kim Shepherd
Cc: dspace-tech@lists.sourceforge.net
Subject: Re: Custom modules (overriding Dspace API)
I think you'll just want to rename your module so that it comes before
DSpace-Api alphabetically.
Mark
On Apr 6, 2009, at 5:24 PM, Kim Shepherd k...@waikato.ac.nz wrote:
Hi Mark (and others!),
Just picking up on a thread that was being discussed a few months
ago, I'm having a go at overriding some classes in org.dspace.search
and org.dspace.content by creating a custom module, to try and tidy
things up from the 'patch code in place' method I've been using to
date.
It's being built correctly, appears in the target/../lib dir (and in
WEB-INF/lib of my JSPUI webapp, once I added a dependency in my
jspui pom.xml), but my altered classes don't seem to be taking effect.
My module is called lconz-api. I've given it a version of 1.5.1.
Paths look like this:
--
dspace-1.5.1-src-release/dspace/modules/lconz-api/src/main/java/org/
dspace/content
dspace-1.5.1-src-release/dspace/modules/lconz-api/src/main/java/org/
dspace/search
My lconz-api/pom.xml looks like this:
--
project xmlns=http://maven.apache.org/POM/4.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;
modelVersion4.0.0/modelVersion
groupIdorg.dspace.modules/groupId
artifactIdlconz-api/artifactId
version1.5.1/version
packagingjar/packaging
nameDSpace :: Modules :: LCoNZ API/name
description
Changes to the API to work with LCoNZ repositories
/description
parent
groupIdorg.dspace/groupId
artifactIdmodules/artifactId
version1.5.1/version
/parent
repositories
repository
idmaven.dspace.org/snapshot/id
nameDSpace Maven Snapshot Repository/name
urlhttp://maven.dspace.org/snapshot/url
releases
enabledfalse/enabled
checksumPolicyfail/checksumPolicy
/releases
snapshots
enabledtrue/enabled
checksumPolicyfail/checksumPolicy
/snapshots
/repository
/repositories
dependencies
!-- DSpace API --
dependency
groupIdorg.dspace/groupId
artifactIdmodules/artifactId
version1.5.1/version
/parent
repositories
repository
idmaven.dspace.org/snapshot/id
nameDSpace Maven Snapshot Repository/name
urlhttp://maven.dspace.org/snapshot/url
releases
enabledfalse/enabled
checksumPolicyfail/checksumPolicy
/releases
snapshots
enabledtrue/enabled
checksumPolicyfail/checksumPolicy
/snapshots
/repository
/repositories
dependencies
!-- DSpace API --
dependency
groupIdorg.dspace/groupId
artifactIddspace-api/artifactId
/dependency
dependency
groupIdjavax.servlet/groupId
artifactIdservlet-api/artifactId
version2.3/version
scopeprovided/scope
/dependency
/dependencies
/project
I've added a line to modules/pom.xml as well:
modulelconz-api/module
I added a dependency to dspace/pom.xml:
dependency
groupIdorg.dspace.modules/groupId
artifactIdlconz-api/artifactId
version1.5.1/version
/dependency
At this stage, my jar is being built and copied to target/.../lib,
but doesn't make it into my JSPUI's WEB-INF/lib. I'm not sure if it
*needs* to be there (they are strictly dspace-api overrides, not
dspace-jspui-api), but just in case, I added the above dependency to
dspace/modules/jspui/pom.xml.
This ensures the jar ends up in WEB-INF/lib, but I'm still not
seeing my new code taking effect.
Is there anything obvious I've missed here?
I'm fairly sure I had this working (in a different source tree) when
it was first being discussed, which is even more frustrating for me ;)
Cheers,
Kim.
--
Kim Shepherd
IRR Technical Specialist
ITS Systems Development
The University of Waikato
New Zealand
DDI +64 7 838 4025
--
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech