Hi Achim,

the BOM approach was also my first choice. Unfortunately I think it is not suitable. A BOM allows to define the versions for maven dependencies. It does not add any of the dependencies to the project. So with a BOM you could leave out the versions but would have to specify all the dependencies in the user bundle. What I used there instead was simply a pom with the dependencies. Using the transitive nature of dependencies this adds all dependencies of the pom to the user project. I think this is what we want to achieve.

Unfortunately the pom approach also has one weakness. For the blueprint-maven-plugin I need to add some APIs (javax.inject and pax-cdi api) as optional. This does not seem to work if they are extracted into a pom. All optional dependencies seem to be not included in the user project. So if anyone knows how to solve this it would be highly appreciated. Another way would be to configure the maven-bundle-plugin to not create Import-Package statements for these APIs. Not sure how to do this though in a generic way.

BOM and pom unfortunately both do not provide any way to add plugins to the user code. This is what I use the parent for. You are right that it does not provide much flexibility but I think it is better than a monolithic karaf boot plugin that calls all other necessary plugins. One reason is that a parent is more transparent. So the user can look into the parent and easily understand what it does. A parent is also a nice template
for the more advanced user to create his own parent.

I am still not familiar with profiles. I will check out and try your code to understand how it works.

I agree with you that we want to achieve a light weight deployment for karaf boot. What I had in mind is to add an option to the karaf-maven-plugin to create a distribution with static deployment. So you specify the features as you do now but the plugin then would not add the features as boot features but instead do all resolution at build time and deploy all bundles using startup.properties. This should even allow to start without the feature service or without the shell if people want that.

So in general I think our goals are nicely aligned. We now just have to find and agree on a good way to reach them.

Christian

On 17.12.2015 01:03, Achim Nierbeck wrote:
Hi,

once more, I still think and I think I convinced JB on this point, Parent
POMs are a bad way to start with just to create your own application, this
is where BOMs (Bill Of Material) plays in much more nicely. Especially if
you want to combine different aspects. Like DS plus Web for example, now
you would need two Parents, which isn't possible.

Now regarding Provisioning and features. I wouldn't go with features, cause
the tend to be
bloated in comparison to the small footprint we want to have with
karaf-boot.

That's why I proposed long time ago to use profiles.
My first steps no that can be found at the project in JBs GitHub account.
It's the profiles branch. [1]
In this we'll have the profiles attached to the BOMs and therefore it could
be extracted through a specialized Mojo (already worked on that) to merge
all those profiles into one to create a custom Karaf on the fly.

regards, Achim

[1] - https://github.com/jbonofre/karaf-boot/tree/profiles



2015-12-16 22:33 GMT+01:00 Christian Schneider <[email protected]>:

Probably not .. I just did not yet change it :-)
Will fix it.

Christian

2015-12-16 22:03 GMT+01:00 Tim Jones <[email protected]>:

Hi Christian, looks good, one minor, is the package name supposed to be
org.apache.aries.jpa.example.tasklist.*blueprint*.impl?Tim



--
View this message in context:

http://karaf.922171.n3.nabble.com/karaf-boot-Added-a-DS-sample-with-Servlet-and-JPA-and-slightly-different-setup-tp4044335p4044358.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.



--
--
Christian Schneider
http://www.liquid-reality.de
<
https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de
Open Source Architect
http://www.talend.com
<
https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com




--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

Reply via email to