|
Hi,
My goal is to have some custom bundles that I grouped in a KAR file and want them to be available when my karaf instance boots. mykar.kar contains: mykar-features-1.0.xml mybundle1.jar mybundle2.jar Content of mykar-features-1.0.xml: <?xml version="1.0" encoding="UTF-8"?> <features> <feature name="mykar" version="1.0"> <bundle>file:mybundle1.jar</bundle> <bundle>file:mybundle2.jar</bundle> </feature> </features> The first attempt was to see what happens if I deploy the KAR file to the instance deploy folder: The KAR file contents (features file and both jars) get extracted under the instances/myinst/system folder root level, that's it. Nothing further happens :( In the log file I observe that the KarArtifactInstaller displays "Found a .kar file to deploy" and then "Installing KAR file ..." I would expect to have my bundles available, features:list do not show them. What am I missing? Using karaf 2.2.5 Thanks for any advise on this. BRs, Kris |
|
Hi Kris,
Is your Kar contains a repository folder ? To be valid, the kar should ship a Maven like structure in a repository folder. For instance: repository/groupId/artifactId/version/artifact-version.jar repository/groupId/artifactId/version/features-features.xml etc The create-kar goal in the features-maven-plugin do it for you (starting from a features XML). Regards JB On 04/19/2012 12:47 PM, kmoens wrote: > Hi, > > My goal is to have some custom bundles that I grouped in a KAR file and want > them to be available when my karaf instance boots. > > mykar.kar contains: > > mykar-features-1.0.xml > mybundle1.jar > mybundle2.jar > > Content of mykar-features-1.0.xml: > > <?xml version="1.0" encoding="UTF-8"?> > <features> > <feature name="mykar" version="1.0"> > <bundle>file:mybundle1.jar</bundle> > <bundle>file:mybundle2.jar</bundle> > </feature> > </features> > > The first attempt was to see what happens if I deploy the KAR file to the > instance deploy folder: > The KAR file contents (features file and both jars) get extracted under the > instances/myinst/system folder root level, that's it. Nothing further > happens :( > > In the log file I observe that the KarArtifactInstaller displays "Found a > .kar file to deploy" and then "Installing KAR file ..." > > I would expect to have my bundles available, features:list do not show them. > > What am I missing? > > Using karaf 2.2.5 > > Thanks for any advise on this. > > BRs, > Kris > > > > > > > -- > View this message in context: http://karaf.922171.n3.nabble.com/Kar-file-deploy-issue-tp3922678p3922678.html > Sent from the Karaf - User mailing list archive at Nabble.com. -- Jean-Baptiste Onofré [hidden email] http://blog.nanthrax.net Talend - http://www.talend.com |
|
Thanks JB,
I fixed my KAR file having the correct Maven like structure and now it is getting deployed. I had to fix my features file as well. The KarArtifactInstaller froze because of an accidental blank line at the top of the features.xml. I have another question related. In my features file I want to use the file: handler so I can point to a location on my file system that has multiple bundles. The documentation states: <bundle>file:base/bundles/spring-web-2.5.6.SEC01.jar</bundle> From the above example where should this jar be located on my windows file system? Is it something like c:\base\bundles\spring-web-2.5.6.SEC01.jar or [KARAF_HOME]\bundles\... ??? I have tried a few times to match my extracted bundles to a file location in the features file but always get: Unable to install Kar feature mykar/1.0.0 followed by java.io.FileNotFoundException: com\mycomp\bundles\reports\mybundle-1.0.0.jar (The system cannot find the path specified) Thanks in advance, Kris |
|
Hi Kris,
If you really want to use a file URL, you should use an absolute path (file:c:\\... for instance). However, my advice is more to use a Maven URL (mvn:groupId/artifactId/...) and populate the Kar file with the artifact (it's the purpose of the Kar artifact). Regards JB On 04/23/2012 10:52 AM, kmoens wrote: > Thanks JB, > > I fixed my KAR file having the correct Maven like structure and now it is > getting deployed. > I had to fix my features file as well. The KarArtifactInstaller froze > because of an accidental blank line at the top of the features.xml. > > I have another question related. > In my features file I want to use the file: handler so I can point to a > location on my file system that has multiple bundles. > > The documentation states: > <bundle>file:base/bundles/spring-web-2.5.6.SEC01.jar</bundle> > > From the above example where should this jar be located on my windows file > system? > Is it something like c:\base\bundles\spring-web-2.5.6.SEC01.jar or > [KARAF_HOME]\bundles\... ??? > > I have tried a few times to match my extracted bundles to a file location in > the features file but always get: Unable to install Kar feature mykar/1.0.0 > followed by java.io.FileNotFoundException: > com\mycomp\bundles\reports\mybundle-1.0.0.jar (The system cannot find the > path specified) > > Thanks in advance, > > Kris > > > > -- > View this message in context: http://karaf.922171.n3.nabble.com/Kar-file-deploy-issue-tp3922678p3931864.html > Sent from the Karaf - User mailing list archive at Nabble.com. -- Jean-Baptiste Onofré [hidden email] http://blog.nanthrax.net Talend - http://www.talend.com |
| Powered by Nabble | Edit this page |
