You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by Reto Bachmann-Gmür <re...@apache.org> on 2013/09/08 16:03:45 UTC

Launchers/Fetaures/Bundlelists

Hi

Currently we create our launchers using the maven assembly plugin.

I see the following advantages of our approach:
- Version of artifacts using maven mechanism (dependency management, IDE
support)
- Mvn URIs for bundle allowing easy updates from maven repo

And disadvantages:
- It's not possible to have list of the bundles for particular features
- configuration quite hard

An alternative would be the sling launchpad plugin
Advantages:
- Partial bundle lists to group features
- Used in Stanbol and Sling allowing to mix and match partial bundlelists
with these projects

Disadvantages
- unresolvable sling-uris for bundles
- propertary bundlelist format not offering the same comfort as maven
dependencies

Yet another approach would be to create a launcher using Karaf
Advantages:
- Integrates with many karaf based applications
- Karaf feature sets can be created from maven dependencies
- Features can be added at runtime

Disadvantages:
- A Karaf distribution is not a self-executable jar
- Compatibility issues to investigate, notably with regards of
authentication/JAAS policy and the clerezza shell

Just what came to my mind, thoughts would be greatly appreciated.

Cheers,
Reto

Re: Launchers/Fetaures/Bundlelists

Posted by Minto van der Sluis <mi...@xup.nl>.
Hi Reto,

Gave it try but the created features.xml it too limited for me. I miss
dependencies (the common section in my hand crafted version).

Unfortunately I lack the time to combine the generated features.xml with
my hand crafted one to give it a try.

Regards,

Minto

Op 11-9-2013 12:13, Reto Bachmann-Gmür schreef:
> On Wed, Sep 11, 2013 at 10:21 AM, Reto Bachmann-Gmür <re...@wymiwyg.com>wrote:
>
>>>  @Minto do you happen to have already such feature generating poms that
>>> could be used to try out the tweaked plugin version?
>>>
>>> I do have a pom but it does not generate a features.xml. My features.xml
>>> for Clerezza was had crafted. Another note is that I am using karaf 2.3.2
>>> for which the maven features plugin was still a separate plugin (not part
>>> of karaf-maven-plugin).
>>>
> Assuming that features.xml format is compatible across the karaf versions,
> could you try out the feature file created by provisioning/rdf?
>
> Cheers,
> Reto
>


-- 
ir. ing. Minto van der Sluis
Software innovator / renovator
Xup BV

Mobiel: +31 (0) 626 014541


Re: Launchers/Fetaures/Bundlelists

Posted by Reto Bachmann-Gmür <re...@wymiwyg.com>.
On Wed, Sep 11, 2013 at 10:21 AM, Reto Bachmann-Gmür <re...@wymiwyg.com>wrote:

>
>>  @Minto do you happen to have already such feature generating poms that
>> could be used to try out the tweaked plugin version?
>>
>> I do have a pom but it does not generate a features.xml. My features.xml
>> for Clerezza was had crafted. Another note is that I am using karaf 2.3.2
>> for which the maven features plugin was still a separate plugin (not part
>> of karaf-maven-plugin).
>>
>
Assuming that features.xml format is compatible across the karaf versions,
could you try out the feature file created by provisioning/rdf?

Cheers,
Reto

Re: Launchers/Fetaures/Bundlelists

Posted by Reto Bachmann-Gmür <re...@wymiwyg.com>.
On Wed, Sep 11, 2013 at 9:19 AM, Minto van der Sluis <mi...@xup.nl> wrote:

>  See below,
>
> Regards,
>
> Minto
>
> Op 10-9-2013 22:21, Reto Bachmann-Gmür schreef:
>
> On Mon, Sep 9, 2013 at 1:49 PM, Reto Bachmann-Gmür <re...@wymiwyg.com>wrote:
>
>> I suggest to create svn folders:
>>
>>  - provisioning/sling
>> - provisioning/karaf
>>
>>  with partialbundlelists respective features. Ideally we could then
>> later get the karaf-maven-plugin to produce partial bundlelists too or
>> unify the things in another way. But given the usage of clerezza features
>> both in a sling-launcher as well as in a karaf environment I think it makes
>> sense to provide both.
>>
>
>  Started creating a partialbundlelist I found it very tedious to type
> dependencies without the support of the IDE so I decided to go straight for
> the better approach and tweak the karaf-maven-plugin to gnerated the
> partail bundlelists.
>
>  In /trunk/provisioning/tools/karaf-maven-plugin/ there is now a version
> of the plugin that has the addional createSlingPartialBundleList
> configuration param.
>
>  It can be used like this (modified version from what the
> karaf-feature-archetype created):
>
> <build>
>         <pluginManagement>
>             <plugins>
>                 <plugin>
>
> <groupId>org.apache.clerezza.provisionig.tooling</groupId>
>                     <artifactId>karaf-maven-plugin</artifactId>
>                     <version>3.0.0.RC1</version>
>                     <extensions>true</extensions>
>                 </plugin>
>             </plugins>
>         </pluginManagement>
>         <plugins>
>             <plugin>
>                 <groupId>org.apache.clerezza.provisionig.tooling</groupId>
>                 <artifactId>karaf-maven-plugin</artifactId>
>                 <configuration>
>                     <startLevel>50</startLevel>
>                     <aggregateFeatures>true</aggregateFeatures>
>                     <resolver>(obr)</resolver>
>                     <checkDependencyChange>true</checkDependencyChange>
>                     <failOnDependencyChange>false</failOnDependencyChange>
>                     <logDependencyChanges>true</logDependencyChanges>
>
> <overwriteChangedDependencies>true</overwriteChangedDependencies>
>
> <includeTransitiveDependency>false</includeTransitiveDependency>
>
> <createSlingPartialBundleList>true</createSlingPartialBundleList>
>                 </configuration>
>             </plugin>
>         </plugins>
>     </build>
>
>  I checked out the sling-launchpad side of things and I hope (and think
> that) I haven't broken the karaf side.
>
> Are you sure a change like this will be accepted by the karaf community?
> When looking from a puristic perspective I can image them not being
> interested in sling based artifacts.
>

I can't be sure of course. I think denying it would have less to do with
purism tahn with locking up. If not we can keep it where it is. The sling
plugin also produces both formats but I prefer the karaf plugin.


>
>
>  Tomorrow I'll start creating some features in  /trunk/provisioning
> (thinking at rdf-core, rdf-jena, rdf-scala, shell).
>
>  @Minto do you happen to have already such feature generating poms that
> could be used to try out the tweaked plugin version?
>
> I do have a pom but it does not generate a features.xml. My features.xml
> for Clerezza was had crafted. Another note is that I am using karaf 2.3.2
> for which the maven features plugin was still a separate plugin (not part
> of karaf-maven-plugin).
>

Ok.

Reto

Re: Launchers/Fetaures/Bundlelists

Posted by Minto van der Sluis <mi...@xup.nl>.
See below,

Regards,

Minto

Op 10-9-2013 22:21, Reto Bachmann-Gmür schreef:
> On Mon, Sep 9, 2013 at 1:49 PM, Reto Bachmann-Gmür <reto@wymiwyg.com
> <ma...@wymiwyg.com>> wrote:
>
>     I suggest to create svn folders:
>
>     - provisioning/sling
>     - provisioning/karaf
>
>     with partialbundlelists respective features. Ideally we could then
>     later get the karaf-maven-plugin to produce partial bundlelists
>     too or unify the things in another way. But given the usage of
>     clerezza features both in a sling-launcher as well as in a karaf
>     environment I think it makes sense to provide both.
>
>
> Started creating a partialbundlelist I found it very tedious to type
> dependencies without the support of the IDE so I decided to go
> straight for the better approach and tweak the karaf-maven-plugin to
> gnerated the partail bundlelists.
>
> In /trunk/provisioning/tools/karaf-maven-plugin/ there is now a
> version of the plugin that has the addional
> createSlingPartialBundleList configuration param.
>
> It can be used like this (modified version from what the
> karaf-feature-archetype created):
>
> <build>
>         <pluginManagement>
>             <plugins>
>                 <plugin>
>                    
> <groupId>org.apache.clerezza.provisionig.tooling</groupId>
>                     <artifactId>karaf-maven-plugin</artifactId>
>                     <version>3.0.0.RC1</version>
>                     <extensions>true</extensions>
>                 </plugin>
>             </plugins>
>         </pluginManagement>
>         <plugins>
>             <plugin>
>                 <groupId>org.apache.clerezza.provisionig.tooling</groupId>
>                 <artifactId>karaf-maven-plugin</artifactId>
>                 <configuration>
>                     <startLevel>50</startLevel>
>                     <aggregateFeatures>true</aggregateFeatures>
>                     <resolver>(obr)</resolver>
>                     <checkDependencyChange>true</checkDependencyChange>
>                     <failOnDependencyChange>false</failOnDependencyChange>
>                     <logDependencyChanges>true</logDependencyChanges>
>                    
> <overwriteChangedDependencies>true</overwriteChangedDependencies>
>                    
> <includeTransitiveDependency>false</includeTransitiveDependency>
>                    
> <createSlingPartialBundleList>true</createSlingPartialBundleList>
>                 </configuration>
>             </plugin>
>         </plugins>
>     </build>
>
> I checked out the sling-launchpad side of things and I hope (and think
> that) I haven't broken the karaf side.
Are you sure a change like this will be accepted by the karaf community?
When looking from a puristic perspective I can image them not being
interested in sling based artifacts.
>
> Tomorrow I'll start creating some features in  /trunk/provisioning
> (thinking at rdf-core, rdf-jena, rdf-scala, shell).
>
> @Minto do you happen to have already such feature generating poms that
> could be used to try out the tweaked plugin version?
I do have a pom but it does not generate a features.xml. My features.xml
for Clerezza was had crafted. Another note is that I am using karaf
2.3.2 for which the maven features plugin was still a separate plugin
(not part of karaf-maven-plugin).
>
> Cheers,
> Reto


-- 
ir. ing. Minto van der Sluis
Software innovator / renovator
Xup BV

Mobiel: +31 (0) 626 014541


Re: Launchers/Fetaures/Bundlelists

Posted by Reto Bachmann-Gmür <re...@wymiwyg.com>.
On Mon, Sep 9, 2013 at 1:49 PM, Reto Bachmann-Gmür <re...@wymiwyg.com> wrote:

> I suggest to create svn folders:
>
> - provisioning/sling
> - provisioning/karaf
>
> with partialbundlelists respective features. Ideally we could then later
> get the karaf-maven-plugin to produce partial bundlelists too or unify the
> things in another way. But given the usage of clerezza features both in a
> sling-launcher as well as in a karaf environment I think it makes sense to
> provide both.
>

Started creating a partialbundlelist I found it very tedious to type
dependencies without the support of the IDE so I decided to go straight for
the better approach and tweak the karaf-maven-plugin to gnerated the
partail bundlelists.

In /trunk/provisioning/tools/karaf-maven-plugin/ there is now a version of
the plugin that has the addional createSlingPartialBundleList configuration
param.

It can be used like this (modified version from what the
karaf-feature-archetype created):

<build>
        <pluginManagement>
            <plugins>
                <plugin>

<groupId>org.apache.clerezza.provisionig.tooling</groupId>
                    <artifactId>karaf-maven-plugin</artifactId>
                    <version>3.0.0.RC1</version>
                    <extensions>true</extensions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.clerezza.provisionig.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <configuration>
                    <startLevel>50</startLevel>
                    <aggregateFeatures>true</aggregateFeatures>
                    <resolver>(obr)</resolver>
                    <checkDependencyChange>true</checkDependencyChange>
                    <failOnDependencyChange>false</failOnDependencyChange>
                    <logDependencyChanges>true</logDependencyChanges>

<overwriteChangedDependencies>true</overwriteChangedDependencies>

<includeTransitiveDependency>false</includeTransitiveDependency>

<createSlingPartialBundleList>true</createSlingPartialBundleList>
                </configuration>
            </plugin>
        </plugins>
    </build>

I checked out the sling-launchpad side of things and I hope (and think
that) I haven't broken the karaf side.

Tomorrow I'll start creating some features in  /trunk/provisioning
(thinking at rdf-core, rdf-jena, rdf-scala, shell).

@Minto do you happen to have already such feature generating poms that
could be used to try out the tweaked plugin version?

Cheers,
Reto

Re: Launchers/Fetaures/Bundlelists

Posted by "ajs6f@virginia.edu" <aj...@virginia.edu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes, this is true (Karaf bundles can have mn: URIs) and it's extremely helpful.

- ---
A. Soroka
The University of Virginia Library

On Sep 9, 2013, at 7:49 AM, Reto Bachmann-Gmür wrote:

> This is an advantage comparend with the sling-launcher in which the bundles has some slinginstall:... URIs. I think in karaf bundles (not just features) can have mvn-uris too.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
Comment: GPGTools - http://gpgtools.org

iQEcBAEBAgAGBQJSLbcRAAoJEATpPYSyaoIkxoIH/iRcriMQOFMcShg43NlMRqir
tdLrlRG8TtluCek9fJmhb4b5Rsiu3VbuW9zTS1s+Wr6szkikFHZrHtSRSPmyULia
mNQ1g8s/MB7/oezdjKF3XB+Pd03T/oI8S9V92XmNZe+elkXsXqhj4jXaZXPmesQ2
K9l06QuONe6MQfbXy7a5wzhZtP2E4zaquUbZrYt/+p+dyGA40rLlguddfghccuIB
QQijkRyMXwaLXOFPULNyvbN2qswJ9TXlClHhNRb9/7zHdVqac6VB4bqzXCKG9yHy
LebJN/c06k9cwLOgKjZnG7RNpf2aPlQwGEqYzI1Ey9R3l0eZZ4v5htgLTkq6ti4=
=63e3
-----END PGP SIGNATURE-----

Re: Launchers/Fetaures/Bundlelists

Posted by Reto Bachmann-Gmür <re...@wymiwyg.com>.
Hi,


On Mon, Sep 9, 2013 at 8:37 AM, Minto van der Sluis <mi...@xup.nl> wrote:

> > Currently we create our launchers using the maven assembly plugin.
> >
> > I see the following advantages of our approach:
> > - Version of artifacts using maven mechanism (dependency management, IDE
> > support)
> > - Mvn URIs for bundle allowing easy updates from maven repo
> I am not sure if I fully understand this one. Karaf features also use
> mvn URIs. Karaf's features.xml can also be used in conjuction with
> resource filtering. Like this the dependency management can still be
> done in maven pom files.
>

This is an advantage comparend with the sling-launcher in which the bundles
has some slinginstall:... URIs. I think in karaf bundles (not just
features) can have mvn-uris too.

> >
> > And disadvantages:
> > - It's not possible to have list of the bundles for particular features
> > - configuration quite hard
> >
> > An alternative would be the sling launchpad plugin
> > Advantages:
> > - Partial bundle lists to group features
> > - Used in Stanbol and Sling allowing to mix and match partial bundlelists
> > with these projects
> >
> > Disadvantages
> > - unresolvable sling-uris for bundles
> > - propertary bundlelist format not offering the same comfort as maven
> > dependencies
> >
> > Yet another approach would be to create a launcher using Karaf
> > Advantages:
> > - Integrates with many karaf based applications
> > - Karaf feature sets can be created from maven dependencies
> > - Features can be added at runtime
> >
> > Disadvantages:
> > - A Karaf distribution is not a self-executable jar
> Is this really that important? In my case it is not.
>

I don't think it's very important but it is an advantage.


>
> For my project I created a karaf distributions that needs to be
> configured after deployment. The most important configuration item is
> the location of the triplestore. I wouldn't want this to be the default
> value since it would make upgrading forget about the contents of the
> triplestore.
>

While I'll agree it should be easily configurable I also think double-click
and run is a great way to getting people started quickly. Of course
unzipping Isn't a very high bar.


> > - Compatibility issues to investigate, notably with regards of
> > authentication/JAAS policy and the clerezza shell
> My Karaf distribution also partly uses Clerezza. Attached you can find
> the Clerezza features.xml that I have created.
>
> I have to admit that I like the Karaf eco-system with support for
> clustering (Karaf Cellar) that I will most probably be using in the
> coming weeks.
>

Having clerezza features readily available in the karaf ecosystem would be
certainly an advantage. And then we could see how well a ful clerezza
distribution can be created with these features.


I suggest to create svn folders:

- provisioning/sling
- provisioning/karaf

with partialbundlelists respective features. Ideally we could then later
get the karaf-maven-plugin to produce partial bundlelists too or unify the
things in another way. But given the usage of clerezza features both in a
sling-launcher as well as in a karaf environment I think it makes sense to
provide both.

Cheers,
Reto



>
>
 >
> > Just what came to my mind, thoughts would be greatly appreciated.
> >
> > Cheers,
> > Reto
>
>

Re: Launchers/Fetaures/Bundlelists

Posted by Minto van der Sluis <mi...@xup.nl>.
Hi,

See comments below

Regards,

Minto

Op 8-9-2013 16:03, Reto Bachmann-Gmür schreef:
> Hi
>
> Currently we create our launchers using the maven assembly plugin.
>
> I see the following advantages of our approach:
> - Version of artifacts using maven mechanism (dependency management, IDE
> support)
> - Mvn URIs for bundle allowing easy updates from maven repo
I am not sure if I fully understand this one. Karaf features also use
mvn URIs. Karaf's features.xml can also be used in conjuction with
resource filtering. Like this the dependency management can still be
done in maven pom files.
>
> And disadvantages:
> - It's not possible to have list of the bundles for particular features
> - configuration quite hard
>
> An alternative would be the sling launchpad plugin
> Advantages:
> - Partial bundle lists to group features
> - Used in Stanbol and Sling allowing to mix and match partial bundlelists
> with these projects
>
> Disadvantages
> - unresolvable sling-uris for bundles
> - propertary bundlelist format not offering the same comfort as maven
> dependencies
>
> Yet another approach would be to create a launcher using Karaf
> Advantages:
> - Integrates with many karaf based applications
> - Karaf feature sets can be created from maven dependencies
> - Features can be added at runtime
>
> Disadvantages:
> - A Karaf distribution is not a self-executable jar
Is this really that important? In my case it is not.

For my project I created a karaf distributions that needs to be
configured after deployment. The most important configuration item is
the location of the triplestore. I wouldn't want this to be the default
value since it would make upgrading forget about the contents of the
triplestore.
> - Compatibility issues to investigate, notably with regards of
> authentication/JAAS policy and the clerezza shell
My Karaf distribution also partly uses Clerezza. Attached you can find
the Clerezza features.xml that I have created.

I have to admit that I like the Karaf eco-system with support for
clustering (Karaf Cellar) that I will most probably be using in the
coming weeks.

>
> Just what came to my mind, thoughts would be greatly appreciated.
>
> Cheers,
> Reto