You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Tsirkin Evgeny <ts...@gmail.com> on 2010/10/14 18:11:22 UTC

Jackrabbit,getting started

Hi list!
How do i start developing a new application using Jackrabbit?
The getting started is talking about using a standalone version but this is
clearly not what i want
for custom application,right?
The download page have 4 different downloads but here
http://jackrabbit.apache.org/standalone-server.html
I can see a note:
Note also that RMI remoting layer has not been optimized for performance, so
currently the recommendation for accessing the JCR API in performance
critical applications is to have the repository running locally in the same
process as the client application.

So, I need to embed the JCR ,that leaves me with downloading the source and
building myself?
But the src package contains a pom files for everything while i need only
the core of the
Jackrabbit (OK,maybe WebDav also,but not at this stage).
And it requires building with maven ...
So what do I need to download, how to get dependences, are there a binary
packages?
Thanks
Evgeny

Re: Jackrabbit,getting started

Posted by Tsirkin Evgeny <ts...@gmail.com>.
On Thu, Oct 14, 2010 at 8:16 PM, ChadDavis <ch...@gmail.com>wrote:

>
> I wish I could, but I don't know what to tell you.  I went through the
> same pain myself when I started working with Jackrabbit.  I would
> highly recommend that you bite the bullet and learn Maven.  If you are
> going to be doing any significant work with Jackrabbit, it's going to
> be necessary at some point.
>

Well ,then let it be.Maven I am coming!
I should especially look into "overlays" ,right?
Basically as I understand it I am going to use maven with overlay,build it
and then
I will get jars that I can just put into my lib directory?
Thanks a lot.
Evgeny

Re: Jackrabbit,getting started

Posted by ChadDavis <ch...@gmail.com>.
>
>
>>  It sounds
>> like something your interested in, ask some more questions.
>>
>
> Well,yes of course but i just want to get the job done and learning _also_
> maven is
> an unneeded overhead for me right now.
> I already have to learn JCR, learning maven _ just to build it _ is too
> much.
> (For building my java code currently I am  doing well with ant / IDE)
> So, if you can help me with some commands just to have it done.

I wish I could, but I don't know what to tell you.  I went through the
same pain myself when I started working with Jackrabbit.  I would
highly recommend that you bite the bullet and learn Maven.  If you are
going to be doing any significant work with Jackrabbit, it's going to
be necessary at some point.

Re: Jackrabbit,getting started

Posted by Tsirkin Evgeny <ts...@gmail.com>.
On Thu, Oct 14, 2010 at 6:24 PM, ChadDavis <ch...@gmail.com>wrote:

> If you are doing a web app, and you can accept the in-process
> architecture, then you can use the Maven war overlays to inherit from
> the webapp module.  It's convenient, but if you haven't used maven and
> overlays, you probably don't know what I'm talking about.


Yes.Could you please provide some commands for doing this?


>  It sounds
> like something your interested in, ask some more questions.
>

Well,yes of course but i just want to get the job done and learning _also_
maven is
an unneeded overhead for me right now.
I already have to learn JCR, learning maven _ just to build it _ is too
much.
(For building my java code currently I am  doing well with ant / IDE)
So, if you can help me with some commands just to have it done.
I will be very grateful.
Evgeny

Re: Jackrabbit,getting started

Posted by ChadDavis <ch...@gmail.com>.
If you are doing a web app, and you can accept the in-process
architecture, then you can use the Maven war overlays to inherit from
the webapp module.  It's convenient, but if you haven't used maven and
overlays, you probably don't know what I'm talking about.  It sounds
like something your interested in, ask some more questions.

Re: Jackrabbit,getting started

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Sun, Oct 17, 2010 at 3:05 PM, Tsirkin Evgeny <ts...@gmail.com> wrote:
> So, as a Jackrabbit developer ,what way would you recommend:

Whatever works best for you. If you're already familiar with one build
system, then there's no need to switch to another just to use
Jackrabbit.

BR,

Jukka Zitting

Re: Jackrabbit,getting started

Posted by Tsirkin Evgeny <ts...@gmail.com>.
Thanks Jukka,
So, as a Jackrabbit developer ,what way would you recommend:

[1] Learn to use Maven (a long way but maybe have other pluses while working

with Jackrabbit, like building from source and applying patches)

[2] Use another dependency manager.(much simpler then maven)

[3] Just use Standalone jar (that would be really quick start but can (?)
make troubles in future.

Thanks
Evgeny

Re: Jackrabbit,getting started

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Fri, Oct 15, 2010 at 6:48 AM, Tsirkin Evgeny <ts...@gmail.com> wrote:
> On Fri, Oct 15, 2010 at 1:17 AM, Rakesh Vidyadharan <ra...@sptci.com>wrote:
>> If all you are interested in is using the JCR API through JackRabbit, the
>> easiest is to include the full jar file included in the standalone
>> distribution in your classpath and use it.  No need to worry about
>> dependencies etc., since the full jar has it all.
>
> But that seems to have many unnecessary libs in it.

That's the tradeoff between the simplicity of just a single composite
package and the complexity of proper dependency management. Jackrabbit
supports both; the former through the large binaries available on the
download page, and the latter through the POM-annotated artifacts on
Maven Central. As mentioned in my other message, all modern Java
dependency management tools support the Maven Central, so you don't
really need Maven to access those jars.

> Also if ,as other pointed out, the official releases are the source/maven
> one. In that case using full standalone one will getting me into trouble
> once i want a patch.

Strictly speaking our only truly official release packages are the
source jars available on the Jackrabbit download page. However, for
convenience we also provide pre-built binaries in the form of the
deployment packages you find on our download page and the component
jars on Maven Central. For all practical purposes these are equivalent
to binaries that you could build yourself from the release sources.

> And there seems to be no way to do a custom configuration for the
> standalone jars.

You can certainly do that; see the --conf option on
http://jackrabbit.apache.org/standalone-server.html.

And if you use the standalone jar as a classpath dependency in your
own application, you can directly access the RepositoryConf and
RepositoryImpl classes from jackrabbit-core to set up a fully custom
embedded repository.

BR,

Jukka Zitting

Re: Jackrabbit,getting started

Posted by Tsirkin Evgeny <ts...@gmail.com>.
On Fri, Oct 15, 2010 at 1:17 AM, Rakesh Vidyadharan <ra...@sptci.com>wrote:

> If all you are interested in is using the JCR API through JackRabbit, the
> easiest is to include the full jar file included in the standalone
> distribution in your classpath and use it.  No need to worry about
> dependencies etc., since the full jar has it all.
>
> Rakesh


But that seems to have many unnecessary libs in it.
Also if ,as other pointed out, the official releases are the source/maven
one .
In that case using full standalone one will getting me into trouble once i
want a patch.
And there seems to be no way to do a custom configuration for the standalone
jars.
There are probably other problem but I guess there is no way you can  to do
anything
interesting with jackrabbit while not using the official release.
Thanks
Evgeny

Re: Jackrabbit,getting started

Posted by Rakesh Vidyadharan <ra...@sptci.com>.
On 14 Oct 2010, at 13:46, Tsirkin Evgeny wrote:

> On Thu, Oct 14, 2010 at 8:23 PM, Justin Edelson <ju...@justinedelson.com>wrote:
> 
>> It is not necessary to build Jackrabbit from source in order to
>> integrate it into your application. However, it is important to note
>> that the source releases are the official releases. Binary JARs are
>> made available as a convenience via the central Maven repository
>> (http://repo1.maven.org/maven2/org/apache/jackrabbit/). The core
>> repository implementation is in the module called jackrabbit-core. You
>> will need all of its dependencies as well.
>> 
>> Chad is correct that you can use Maven war overlays to pull in the
>> contents of the webapp distribution into your own project, but this
>> isn't the only way to accomplish embedding the repository.
>> 
>> Justin
> 
> 
> What's the other way?
> Evgeny

If all you are interested in is using the JCR API through JackRabbit, the easiest is to include the full jar file included in the standalone distribution in your classpath and use it.  No need to worry about dependencies etc., since the full jar has it all.

Rakesh

Re: Jackrabbit,getting started

Posted by ChadDavis <ch...@gmail.com>.
On Thu, Oct 14, 2010 at 12:46 PM, Tsirkin Evgeny <ts...@gmail.com> wrote:
> On Thu, Oct 14, 2010 at 8:23 PM, Justin Edelson <ju...@justinedelson.com>wrote:
>
>> It is not necessary to build Jackrabbit from source in order to
>> integrate it into your application. However, it is important to note
>> that the source releases are the official releases. Binary JARs are
>> made available as a convenience via the central Maven repository
>> (http://repo1.maven.org/maven2/org/apache/jackrabbit/). The core
>> repository implementation is in the module called jackrabbit-core. You
>> will need all of its dependencies as well.
>>
>> Chad is correct that you can use Maven war overlays to pull in the
>> contents of the webapp distribution into your own project, but this
>> isn't the only way to accomplish embedding the repository.
>>
>> Justin
>
>
> What's the other way?

There are lots of other ways, but I personally don't think they are
all that well documented.

Re: Jackrabbit,getting started

Posted by Rakesh Vidyadharan <ra...@sptci.com>.
On 15 Oct 2010, at 10:04, Thomas Müller wrote:

> Hi,
> 
>> +1 any non-trivial Java application requires dependency management.
> 
> -1. I think Jackrabbit is not that complicated, and one jar file would
> be enough. It would be a lot more convenient to use and develop
> Jackrabbit. Other projects that provide a similar functionality do
> have just one jar file.
> 
> Regards,
> Thomas

I have been working with JR for the past 1.5 years, and have used only the single jar file from the standalone distribution.  It is big, but avoids all the headache of configuring dependencies or adding multiple jar files to my classpath.

Rakesh

Re: Jackrabbit,getting started

Posted by Thomas Müller <th...@day.com>.
Hi,

> +1 any non-trivial Java application requires dependency management.

-1. I think Jackrabbit is not that complicated, and one jar file would
be enough. It would be a lot more convenient to use and develop
Jackrabbit. Other projects that provide a similar functionality do
have just one jar file.

Regards,
Thomas

Re: Jackrabbit,getting started

Posted by Justin Edelson <ju...@gmail.com>.
On 10/15/10 3:11 AM, Jukka Zitting wrote:
> Hi,
> 
> On Fri, Oct 15, 2010 at 6:41 AM, Tsirkin Evgeny <ts...@gmail.com> wrote:
>> Yes .I was asking about getting binary jars including all dependences into
>> my project without using maven and it seems there is no such way.
> 
> You can use Ivy, Buildr or any other build tool that supports
> dependency management. They all know how to get stuff from Maven
> Central.

+1 any non-trivial Java application requires dependency management.

> 
> Alternatively you can simply download the jars manually and add them
> to your classpath. A simple way to do that is to download the
> jackrabbit-webapp war, and take all the jar files from WEB-INF/lib.
> The only extra jar you need is the jcr-2.0.jar that can be found from
> http://jcp.org/en/jsr/summary?id=283, http://www.day.com/jsr283 or
> http://repo2.maven.org/maven2/javax/jcr/jcr/2.0/.
> 
> The full dependency tree of jackrabbit-core is quite complicated so
> using a dependency manager is recommended. This is also why we only
> publish the larger binary packages on the Jackrabbit download page;
> the smaller binaries are easier to access through Maven Central where
> they come with computer-readable dependency metadata.
> 
> BR,
> 
> Jukka Zitting


Re: Jackrabbit,getting started

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Fri, Oct 15, 2010 at 6:41 AM, Tsirkin Evgeny <ts...@gmail.com> wrote:
> Yes .I was asking about getting binary jars including all dependences into
> my project without using maven and it seems there is no such way.

You can use Ivy, Buildr or any other build tool that supports
dependency management. They all know how to get stuff from Maven
Central.

Alternatively you can simply download the jars manually and add them
to your classpath. A simple way to do that is to download the
jackrabbit-webapp war, and take all the jar files from WEB-INF/lib.
The only extra jar you need is the jcr-2.0.jar that can be found from
http://jcp.org/en/jsr/summary?id=283, http://www.day.com/jsr283 or
http://repo2.maven.org/maven2/javax/jcr/jcr/2.0/.

The full dependency tree of jackrabbit-core is quite complicated so
using a dependency manager is recommended. This is also why we only
publish the larger binary packages on the Jackrabbit download page;
the smaller binaries are easier to access through Maven Central where
they come with computer-readable dependency metadata.

BR,

Jukka Zitting

Re: Jackrabbit,getting started

Posted by Tsirkin Evgeny <ts...@gmail.com>.
On Thu, Oct 14, 2010 at 10:21 PM, Justin Edelson <ju...@gmail.com>wrote:

> On 10/14/10 2:46 PM, Tsirkin Evgeny wrote:
>
>

> >I'm not sure what you're asking here. If you are asking how to include
> the dependencies in your project, that depends upon your build tool (I'm
> guessing it isn't Maven).
>
> Justin
>

Yes .I was asking about getting binary jars including all dependences into
my project without using maven and it seems there is no such way.
Or at least there is no such way for a long run, including full war distro
is for a "Getting started" level of development only.
Evgeny

Re: Jackrabbit,getting started

Posted by Justin Edelson <ju...@gmail.com>.
On 10/14/10 2:46 PM, Tsirkin Evgeny wrote:
> On Thu, Oct 14, 2010 at 8:23 PM, Justin Edelson <ju...@justinedelson.com>wrote:
> 
>> It is not necessary to build Jackrabbit from source in order to
>> integrate it into your application. However, it is important to note
>> that the source releases are the official releases. Binary JARs are
>> made available as a convenience via the central Maven repository
>> (http://repo1.maven.org/maven2/org/apache/jackrabbit/). The core
>> repository implementation is in the module called jackrabbit-core. You
>> will need all of its dependencies as well.
>>
>> Chad is correct that you can use Maven war overlays to pull in the
>> contents of the webapp distribution into your own project, but this
>> isn't the only way to accomplish embedding the repository.
>>
>> Justin
> 
> 
> What's the other way?
> Evgeny
> 

I'm not sure what you're asking here. If you are asking how to include
the dependencies in your project, that depends upon your build tool (I'm
guessing it isn't Maven). If you are asking about acquiring the
Repository object, this is actually covered by the JSR-283 spec. There
are also some helper methods in org.apache.jackrabbit.commons.JcrUtils.

Justin

Re: Jackrabbit,getting started

Posted by Tsirkin Evgeny <ts...@gmail.com>.
On Thu, Oct 14, 2010 at 8:23 PM, Justin Edelson <ju...@justinedelson.com>wrote:

> It is not necessary to build Jackrabbit from source in order to
> integrate it into your application. However, it is important to note
> that the source releases are the official releases. Binary JARs are
> made available as a convenience via the central Maven repository
> (http://repo1.maven.org/maven2/org/apache/jackrabbit/). The core
> repository implementation is in the module called jackrabbit-core. You
> will need all of its dependencies as well.
>
> Chad is correct that you can use Maven war overlays to pull in the
> contents of the webapp distribution into your own project, but this
> isn't the only way to accomplish embedding the repository.
>
> Justin


What's the other way?
Evgeny

Re: Jackrabbit,getting started

Posted by Justin Edelson <ju...@justinedelson.com>.
It is not necessary to build Jackrabbit from source in order to
integrate it into your application. However, it is important to note
that the source releases are the official releases. Binary JARs are
made available as a convenience via the central Maven repository
(http://repo1.maven.org/maven2/org/apache/jackrabbit/). The core
repository implementation is in the module called jackrabbit-core. You
will need all of its dependencies as well.

Chad is correct that you can use Maven war overlays to pull in the
contents of the webapp distribution into your own project, but this
isn't the only way to accomplish embedding the repository.

Justin

On Thu, Oct 14, 2010 at 12:11 PM, Tsirkin Evgeny <ts...@gmail.com> wrote:
> Hi list!
> How do i start developing a new application using Jackrabbit?
> The getting started is talking about using a standalone version but this is
> clearly not what i want
> for custom application,right?
> The download page have 4 different downloads but here
> http://jackrabbit.apache.org/standalone-server.html
> I can see a note:
> Note also that RMI remoting layer has not been optimized for performance, so
> currently the recommendation for accessing the JCR API in performance
> critical applications is to have the repository running locally in the same
> process as the client application.
>
> So, I need to embed the JCR ,that leaves me with downloading the source and
> building myself?
> But the src package contains a pom files for everything while i need only
> the core of the
> Jackrabbit (OK,maybe WebDav also,but not at this stage).
> And it requires building with maven ...
> So what do I need to download, how to get dependences, are there a binary
> packages?
> Thanks
> Evgeny
>