You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Dominik Süß <do...@gmail.com> on 2008/12/19 09:45:42 UTC
Maven based projects
Hi everyone,
although repositorybased development with Sling/JCR may be pretty usefull
for the first steps I am now trying to set up a maven/eclipse/svn based
development environment.
And here's my problem:
I can't find a complete documentation about how to deploy sling apps in jcr
"embedded" in bundles. As far as I did understand the conversations and code
snippets here it is possible to bundle the scripts in an osgibundle and
unpack it in jcr within the installation of the bundle. Sadly my first test
failed since my poms didn't produce valid osgi bundles or didn't put any
script in JCR.
Could anyone who has done this give me some hints which maven plugins to use
and how to set up my poms?
Best regards,
Dominik
Re: Maven based projects
Posted by Dominik Süß <do...@gmail.com>.
Ok several new questions did pop up regarding this topic.
If I didn't miss a point there is no more relation between content (or...
scripts) and bundle, so uninstalling the bundle won't have any effect on the
installed scripts. Is there any way to have content (...scripts ;)) that is
just mapped in jcr and uninstalled togehter with the bundle?
The other question I have is:
Is json the only way to define metadata for the content?
Best regards,
Dominik
On Fri, Dec 19, 2008 at 2:31 PM, Dominik Süß <do...@gmail.com>wrote:
> Thanks to both of you :)
> Sometimes its just that simple....
>
> Best regards,
> Dominik
>
>
> On Fri, Dec 19, 2008 at 10:56 AM, Bertrand Delacretaz <
> bdelacretaz@apache.org> wrote:
>
>> Hi Dominik,
>>
>> On Fri, Dec 19, 2008 at 9:45 AM, Dominik Süß <do...@gmail.com>
>> wrote:
>> > ...As far as I did understand the conversations and code
>> > snippets here it is possible to bundle the scripts in an osgibundle and
>> > unpack it in jcr within the installation of the bundle....
>>
>> Yes, that's what we call "initial content loading".
>>
>> > ...Could anyone who has done this give me some hints which maven plugins
>> to use
>> > and how to set up my poms?...
>>
>> The webloader example at [1] might be a good starting point, I have
>> explicitely split in in two bundles, one for java code and one for
>> scripting.
>>
>> The app is not terribly interesting, but you should be able to use it
>> as a starting point to build yours. One thing that you might need to
>> change is that the poms there depend on the sling parent pom, you
>> probably don't want that in your own apps.
>>
>> -Bertrand
>>
>> [1]
>> https://svn.eu.apache.org/repos/asf/incubator/sling/trunk/samples/webloader
>>
>
>
Re: Maven based projects
Posted by Dominik Süß <do...@gmail.com>.
Thanks to both of you :)
Sometimes its just that simple....
Best regards,
Dominik
On Fri, Dec 19, 2008 at 10:56 AM, Bertrand Delacretaz <
bdelacretaz@apache.org> wrote:
> Hi Dominik,
>
> On Fri, Dec 19, 2008 at 9:45 AM, Dominik Süß <do...@gmail.com>
> wrote:
> > ...As far as I did understand the conversations and code
> > snippets here it is possible to bundle the scripts in an osgibundle and
> > unpack it in jcr within the installation of the bundle....
>
> Yes, that's what we call "initial content loading".
>
> > ...Could anyone who has done this give me some hints which maven plugins
> to use
> > and how to set up my poms?...
>
> The webloader example at [1] might be a good starting point, I have
> explicitely split in in two bundles, one for java code and one for
> scripting.
>
> The app is not terribly interesting, but you should be able to use it
> as a starting point to build yours. One thing that you might need to
> change is that the poms there depend on the sling parent pom, you
> probably don't want that in your own apps.
>
> -Bertrand
>
> [1]
> https://svn.eu.apache.org/repos/asf/incubator/sling/trunk/samples/webloader
>
Re: Maven based projects
Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi Dominik,
On Fri, Dec 19, 2008 at 9:45 AM, Dominik Süß <do...@gmail.com> wrote:
> ...As far as I did understand the conversations and code
> snippets here it is possible to bundle the scripts in an osgibundle and
> unpack it in jcr within the installation of the bundle....
Yes, that's what we call "initial content loading".
> ...Could anyone who has done this give me some hints which maven plugins to use
> and how to set up my poms?...
The webloader example at [1] might be a good starting point, I have
explicitely split in in two bundles, one for java code and one for
scripting.
The app is not terribly interesting, but you should be able to use it
as a starting point to build yours. One thing that you might need to
change is that the poms there depend on the sling parent pom, you
probably don't want that in your own apps.
-Bertrand
[1] https://svn.eu.apache.org/repos/asf/incubator/sling/trunk/samples/webloader
Re: Maven based projects
Posted by Gert Vanthienen <ge...@skynet.be>.
Dominik,
We have an example on how to do this in the Apache ServiceMix code
sandbox
(http://svn.eu.apache.org/viewvc/servicemix/sandbox/gertv/smx-sling/servicemix-sling-console/).
This pom.xml will create a bundle that can be deployed on Sling. We
just added the Felix bundle plugin and configured it to load some
initial content and scripts from the src/main/resources/initial-content/
directory.
Regards,
Gert
Dominik Süß wrote:
> Hi everyone,
>
> although repositorybased development with Sling/JCR may be pretty usefull
> for the first steps I am now trying to set up a maven/eclipse/svn based
> development environment.
> And here's my problem:
> I can't find a complete documentation about how to deploy sling apps in jcr
> "embedded" in bundles. As far as I did understand the conversations and code
> snippets here it is possible to bundle the scripts in an osgibundle and
> unpack it in jcr within the installation of the bundle. Sadly my first test
> failed since my poms didn't produce valid osgi bundles or didn't put any
> script in JCR.
>
> Could anyone who has done this give me some hints which maven plugins to use
> and how to set up my poms?
>
> Best regards,
> Dominik
>
>