On 10/13/10 9:37 AM, Craig Ganoe wrote:
> 
> On Oct 13, 2010, at 8:34 AM, Vidar Ramdal wrote:
>> On Wed, Oct 13, 2010 at 1:33 PM, Craig Ganoe <[email protected]> wrote:
>>>
>>> Is there an "easy" way for me to make modifications to the embedded
>>> Jackrabbit repository that gets bundled with the standalone Sling?
>>>
>>> I've built Sling from the latest code, and I've built a modified
>>> version of
>>> Jackrabbit 2.1.1 (which is what it looked like Sling uses) separately. I
>>> don't see where Sling gets its embedded Jackrabbit though.
>>>
>>> All I'm trying to do is get a version of Jackrabbit into Sling where the
>>> ObservationManager's Event.getIdentifer() method is functional via RMI.
>>> Jackrabbit has currently left these unimplemented for RMI.
>>>
>>> Thanks for any input on how to do this.
>>
>> I guess you will have to build your own version of
>> jackrabbit-jcr-rmi.jar (if that's what you need to get the method
>> exposed via RMI).
> 
> Already did that, and have the jar. It also looks like what I built was
> also installed in some kind of repository off my home directory (hoping
> this is useful later):
> .m2/repository/org/apache/jackrabbit/jackrabbit-jcr-rmi/2.1.1/jackrabbit-jcr-rmi-2.1.1.jar

You would be better off modifying the version to indicate that it's
patched. First, delete the patched version you installed in your local
Maven repository, then modify the jackrabbit-jcr-rmi POM file to have a
unique version (2.1.1-psu-1 would be my suggestion). Then re-run mvn
install.

> 
> 
>> Then you would have to roll your own version of the bundle Sling
>> Jackrabbit Embedded Repository
>> (org.apache.sling.jcr.jackrabbit.server), where the only modification
>> you need is to include your jackrabbi-jcr-rmi.jar instead of the
>> standard one. A simple change in the pom.xml should be enough.
> 
> Right, but I know nothing about Maven and pom files, and it looks like
> there is far more than one pom.xml file in the Sling source tree. Seems
> like there are at least two references to "jackrabbit-jcr-rmi" in
> pom.xml files:
> 
> bundles/jcr/jackrabbit-server/pom.xml
> bundles/jcr/base/pom.xml
> 
> Both of which have:
>         <dependency>
>             <groupId>org.apache.jackrabbit</groupId>
>             <artifactId>jackrabbit-jcr-rmi</artifactId>
>             <version>2.0.0</version>
>             <scope>provided</scope>
>         </dependency>
> 
> If the change to the pom.xml file is "simple", care to explain that
> part? Apparently I got the hard part.
> 
Actually, Vidar got this second part wrong. As of 2.0,
jackrabbit-jcr-rmi is an OSGi bundle and, as such, is just included into
the Sling JAR/WAR. So the actual file to patch is
/launchpad/builder/src/main/bundles/list.xml

That said, you really would be well-served by learning a bit about
Maven. You don't need to be a master, but reading the first few chapters
of either
http://www.sonatype.com/books/mvnex-book/reference/public-book.html or
http://www.sonatype.com/books/mvnref-book/reference/public-book.html
would pay dividends.

Justin

Reply via email to