You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Daniel McGreal <d....@gmail.com> on 2016/05/19 16:49:49 UTC

Something like maven to feature functionality, but without Karaf

Hi Karaf users!

Not strictly a Karaf based question, but I figure that Karaf users may well have experience here.

I enjoy using Karaf. One of the best bits is the ability to base my deployment model from my compile model via the karaf-maven-plugin and generation of the feature file and provision of those bundles via mvn:urls. I now need to deploy some code onto devices on which Karaf is just too big (I have ~5 megs of disk space) and would like to bring similar orchestration to Felix, solo.

Is there something similar for deploying to Felix?

Thanks!
Dan.

PS I have had a look into OSGi Subsystems and the Aries implementation and its Maven plugin. The plugin doesn’t pull in transitives (not the end of the world, but harder to manage) and I don’t yet understand how to provision the bundles from a repository but will continue this investigation if no better line of enquiry shows up.

Re: Something like maven to feature functionality, but without Karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
For the PS issue, the <javase/> plugin configuration is missing.

Regards
JB

On 05/20/2016 12:30 PM, Daniel McGreal wrote:
> Hi again,
>
> Thanks for the suggestions. I would like to investigate how minimal I
> can make Karaf.
>
> I started by generating from the karaf-assembly-arifact:4.0.5 and found
> a feature called \u2018base\u2019 which seems to be the basis for the framework.
> Can I launch a working Karaf (with my additional features) with just
> this setup? Unfortunately I couldn\u2019t work out how to pull it into the
> distribution. The ways I tried I ended up getting:
>
> [ERROR] Failed to execute goal
> org.apache.karaf.tooling:karaf-maven-plugin:4.0.5:assembly
> (default-assembly) on project distribution.llrp: Unable to build
> assembly:
> /Users/dan/Code/Agent/distribution/llrp/target/assembly/etc/config.properties
> (No such file or directory) -> [Help 1
>
> Any help appreciated!
>
> PS
> I couldn\u2019t compile the initial generation from the archetype, due to:
> [ERROR] Failed to execute goal
> org.apache.karaf.tooling:karaf-maven-plugin:4.0.5:assembly
> (default-assembly) on project distribution.llrp: Unable to build
> assembly: Unable to resolve root: missing requirement [root]
> osgi.identity; osgi.identity=bundle; type=karaf.feature; version=4.0.5;
> filter:="(&(osgi.identity=bundle)(type=karaf.feature)(version>=4.0.5))"
> [caused by: Unable to resolve bundle/4.0.5: missing requirement
> [bundle/4.0.5] osgi.identity;
> osgi.identity=org.apache.karaf.bundle.core; type=osgi.bundle;
> version="[4.0.5,4.0.5]"; resolution:=mandatory [caused by: Unable to
> resolve org.apache.karaf.bundle.core/4.0.5: missing requirement
> [org.apache.karaf.bundle.core/4.0.5] osgi.wiring.package;
> filter:="(&(osgi.wiring.package=org.apache.karaf.jaas.boot.principal)(version>=4.1.0)(!(version>=5.0.0)))"
> [caused by: Unable to resolve org.apache.karaf.jaas.boot/4.0.5: missing
> requirement [org.apache.karaf.jaas.boot/4.0.5] osgi.ee;
> filter:="(&(osgi.ee=JavaSE)(version=1.8))"]]] -> [Help 1]
>
> I\u2019m using
> Argent:distribution dan$ java -version
> java version "1.8.0_60"
> Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
> Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
>
> Removing the standard feature got me past this error.
>
>> On 20 May 2016, at 07:05, Jean-Baptiste Onofr� <jb@nanthrax.net
>> <ma...@nanthrax.net>> wrote:
>>
>> Hi Dan,
>>
>> why not using the karaf minimal distro or create a static custom
>> distro (as shown in the demo) ?
>>
>> Regards
>> JB
>>
>> On 05/19/2016 06:49 PM, Daniel McGreal wrote:
>>> Hi Karaf users!
>>>
>>> Not strictly a Karaf based question, but I figure that Karaf users
>>> may well have experience here.
>>>
>>> I enjoy using Karaf. One of the best bits is the ability to base my
>>> deployment model from my compile model via the karaf-maven-plugin and
>>> generation of the feature file and provision of those bundles via
>>> mvn:urls. I now need to deploy some code onto devices on which Karaf
>>> is just too big (I have ~5 megs of disk space) and would like to
>>> bring similar orchestration to Felix, solo.
>>>
>>> Is there something similar for deploying to Felix?
>>>
>>> Thanks!
>>> Dan.
>>>
>>> PS I have had a look into OSGi Subsystems and the Aries
>>> implementation and its Maven plugin. The plugin doesn\u2019t pull in
>>> transitives (not the end of the world, but harder to manage) and I
>>> don\u2019t yet understand how to provision the bundles from a repository
>>> but will continue this investigation if no better line of enquiry
>>> shows up.
>>>
>>
>> --
>> Jean-Baptiste Onofr�
>> jbonofre@apache.org <ma...@apache.org>
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>

-- 
Jean-Baptiste Onofr�
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Something like maven to feature functionality, but without Karaf

Posted by Daniel McGreal <d....@gmail.com>.
Hi again,

Thanks for the suggestions. I would like to investigate how minimal I can make Karaf.

I started by generating from the karaf-assembly-arifact:4.0.5 and found a feature called ‘base’ which seems to be the basis for the framework. Can I launch a working Karaf (with my additional features) with just this setup? Unfortunately I couldn’t work out how to pull it into the distribution. The ways I tried I ended up getting:

[ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.0.5:assembly (default-assembly) on project distribution.llrp: Unable to build assembly: /Users/dan/Code/Agent/distribution/llrp/target/assembly/etc/config.properties (No such file or directory) -> [Help 1

Any help appreciated!

PS
I couldn’t compile the initial generation from the archetype, due to:
[ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.0.5:assembly (default-assembly) on project distribution.llrp: Unable to build assembly: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=bundle; type=karaf.feature; version=4.0.5; filter:="(&(osgi.identity=bundle)(type=karaf.feature)(version>=4.0.5))" [caused by: Unable to resolve bundle/4.0.5: missing requirement [bundle/4.0.5] osgi.identity; osgi.identity=org.apache.karaf.bundle.core; type=osgi.bundle; version="[4.0.5,4.0.5]"; resolution:=mandatory [caused by: Unable to resolve org.apache.karaf.bundle.core/4.0.5: missing requirement [org.apache.karaf.bundle.core/4.0.5] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.apache.karaf.jaas.boot.principal)(version>=4.1.0)(!(version>=5.0.0)))" [caused by: Unable to resolve org.apache.karaf.jaas.boot/4.0.5: missing requirement [org.apache.karaf.jaas.boot/4.0.5] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.8))"]]] -> [Help 1]

I’m using
Argent:distribution dan$ java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

Removing the standard feature got me past this error.

> On 20 May 2016, at 07:05, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> 
> Hi Dan,
> 
> why not using the karaf minimal distro or create a static custom distro (as shown in the demo) ?
> 
> Regards
> JB
> 
> On 05/19/2016 06:49 PM, Daniel McGreal wrote:
>> Hi Karaf users!
>> 
>> Not strictly a Karaf based question, but I figure that Karaf users may well have experience here.
>> 
>> I enjoy using Karaf. One of the best bits is the ability to base my deployment model from my compile model via the karaf-maven-plugin and generation of the feature file and provision of those bundles via mvn:urls. I now need to deploy some code onto devices on which Karaf is just too big (I have ~5 megs of disk space) and would like to bring similar orchestration to Felix, solo.
>> 
>> Is there something similar for deploying to Felix?
>> 
>> Thanks!
>> Dan.
>> 
>> PS I have had a look into OSGi Subsystems and the Aries implementation and its Maven plugin. The plugin doesn’t pull in transitives (not the end of the world, but harder to manage) and I don’t yet understand how to provision the bundles from a repository but will continue this investigation if no better line of enquiry shows up.
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com


Re: Something like maven to feature functionality, but without Karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Dan,

why not using the karaf minimal distro or create a static custom distro 
(as shown in the demo) ?

Regards
JB

On 05/19/2016 06:49 PM, Daniel McGreal wrote:
> Hi Karaf users!
>
> Not strictly a Karaf based question, but I figure that Karaf users may well have experience here.
>
> I enjoy using Karaf. One of the best bits is the ability to base my deployment model from my compile model via the karaf-maven-plugin and generation of the feature file and provision of those bundles via mvn:urls. I now need to deploy some code onto devices on which Karaf is just too big (I have ~5 megs of disk space) and would like to bring similar orchestration to Felix, solo.
>
> Is there something similar for deploying to Felix?
>
> Thanks!
> Dan.
>
> PS I have had a look into OSGi Subsystems and the Aries implementation and its Maven plugin. The plugin doesn\u2019t pull in transitives (not the end of the world, but harder to manage) and I don\u2019t yet understand how to provision the bundles from a repository but will continue this investigation if no better line of enquiry shows up.
>

-- 
Jean-Baptiste Onofr�
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Something like maven to feature functionality, but without Karaf

Posted by Krzysztof Sobkowiak <kr...@gmail.com>.
Hi Daniel

Please try these urls

  * http://www.apache.org/dyn/closer.lua/karaf/4.0.5/apache-karaf-minimal-4.0.5.tar.gz.
  * http://www.apache.org/dyn/closer.lua/karaf/3.0.6/apache-karaf-minimal-3.0.6.tar.gz 

But the both versions support Java 7, 8 (and 6 in case of 3.0.x)

Regards
Krzysztof

On 19.05.2016 23:44, Daniel McGreal wrote:
> Thanks Achim,
> All three good points :)
>
> I knew you could customise the distribution but didn't realise it could be made smaller. Is the minimal version downloadable somewhere or I should make it via the assembly? Do you know what version would I need for Java 1.5 compatibility?
>
> Thanks, Dan. 
> On 19 May 2016, at 19:36, Achim Nierbeck <bcanhome@googlemail.com <ma...@googlemail.com>> wrote:
>
>> Hi Daniel, 
>>
>> for pure Felix it would just be the fileinstaller. 
>> Did you check if the minimal karaf is actually small enough? 
>> Another possibility would be to create custom Karafs with profiles. 
>> Just to give you some ideas to look at. :-)
>>
>> regards, Achim 
>>
>> 2016-05-19 18:49 GMT+02:00 Daniel McGreal <d.j.mcgreal@gmail.com <ma...@gmail.com>>:
>>
>>     Hi Karaf users!
>>
>>     Not strictly a Karaf based question, but I figure that Karaf users may well have experience here.
>>
>>     I enjoy using Karaf. One of the best bits is the ability to base my deployment model from my compile model via the karaf-maven-plugin and generation of the feature file and provision of those bundles via mvn:urls. I now need to deploy some code onto devices on which Karaf is just too big (I have ~5 megs of disk space) and would like to bring similar orchestration to Felix, solo.
>>
>>     Is there something similar for deploying to Felix?
>>
>>     Thanks!
>>     Dan.
>>
>>     PS I have had a look into OSGi Subsystems and the Aries implementation and its Maven plugin. The plugin doesn\u2019t pull in transitives (not the end of the world, but harder to manage) and I don\u2019t yet understand how to provision the bundles from a repository but will continue this investigation if no better line of enquiry shows up.
>>
>>
>>
>>
>> -- 
>>
>> Apache Member
>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
>> blog <http://notizblog.nierbeck.de/>
>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>
>> Software Architect / Project Manager / Scrum Master 
>>

-- 
Krzysztof Sobkowiak (@ksobkowiak)

JEE & OSS Architect, Integration Architect
Apache Software Foundation Member (http://apache.org/)
Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)

Re: Something like maven to feature functionality, but without Karaf

Posted by Daniel McGreal <d....@gmail.com>.
Thanks Achim,
All three good points :)

I knew you could customise the distribution but didn't realise it could be made smaller. Is the minimal version downloadable somewhere or I should make it via the assembly? Do you know what version would I need for Java 1.5 compatibility?

Thanks, Dan. 
> On 19 May 2016, at 19:36, Achim Nierbeck <bc...@googlemail.com> wrote:
> 
> Hi Daniel, 
> 
> for pure Felix it would just be the fileinstaller. 
> Did you check if the minimal karaf is actually small enough? 
> Another possibility would be to create custom Karafs with profiles. 
> Just to give you some ideas to look at. :-)
> 
> regards, Achim 
> 
> 2016-05-19 18:49 GMT+02:00 Daniel McGreal <d....@gmail.com>:
>> Hi Karaf users!
>> 
>> Not strictly a Karaf based question, but I figure that Karaf users may well have experience here.
>> 
>> I enjoy using Karaf. One of the best bits is the ability to base my deployment model from my compile model via the karaf-maven-plugin and generation of the feature file and provision of those bundles via mvn:urls. I now need to deploy some code onto devices on which Karaf is just too big (I have ~5 megs of disk space) and would like to bring similar orchestration to Felix, solo.
>> 
>> Is there something similar for deploying to Felix?
>> 
>> Thanks!
>> Dan.
>> 
>> PS I have had a look into OSGi Subsystems and the Aries implementation and its Maven plugin. The plugin doesn’t pull in transitives (not the end of the world, but harder to manage) and I don’t yet understand how to provision the bundles from a repository but will continue this investigation if no better line of enquiry shows up.
> 
> 
> 
> -- 
> 
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> 
> Software Architect / Project Manager / Scrum Master 
> 

Re: Something like maven to feature functionality, but without Karaf

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi Daniel,

for pure Felix it would just be the fileinstaller.
Did you check if the minimal karaf is actually small enough?
Another possibility would be to create custom Karafs with profiles.
Just to give you some ideas to look at. :-)

regards, Achim

2016-05-19 18:49 GMT+02:00 Daniel McGreal <d....@gmail.com>:

> Hi Karaf users!
>
> Not strictly a Karaf based question, but I figure that Karaf users may
> well have experience here.
>
> I enjoy using Karaf. One of the best bits is the ability to base my
> deployment model from my compile model via the karaf-maven-plugin and
> generation of the feature file and provision of those bundles via mvn:urls.
> I now need to deploy some code onto devices on which Karaf is just too big
> (I have ~5 megs of disk space) and would like to bring similar
> orchestration to Felix, solo.
>
> Is there something similar for deploying to Felix?
>
> Thanks!
> Dan.
>
> PS I have had a look into OSGi Subsystems and the Aries implementation and
> its Maven plugin. The plugin doesn’t pull in transitives (not the end of
> the world, but harder to manage) and I don’t yet understand how to
> provision the bundles from a repository but will continue this
> investigation if no better line of enquiry shows up.




-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master