You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by James Gartner <Ja...@moodys.com> on 2012/03/29 17:02:21 UTC

Convert Virgo PLAN to Karaf Feature files

Folks,
I have a Virgo PLAN file that i am trying to convert to a Feature file.
Are there any guidelines for this? The plan file has this:
<artifact type="configuration" name="com.example.service1" version="0"/>
<artifact type="bundle" name="com.example.service1" version="1.0.0"/>


I"m a bit unsure how to convert the configuration file artifact into an item
in the feature file.
Would it be something like this:
<configfile>mvn:com.example.service1...../com.example.service1.properties</configfile>


--
View this message in context: http://karaf.922171.n3.nabble.com/Convert-Virgo-PLAN-to-Karaf-Feature-files-tp3867950p3867950.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Convert Virgo PLAN to Karaf Feature files

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

It seems to me that you might use the "config" element as shown at this link, but I welcome correction.

https://felix.apache.org/site/46-provisioning.html#4.6.Provisioning-Configurations

- ---
A. Soroka
Software & Systems Engineering :: Online Library Environment
the University of Virginia Library

On Mar 29, 2012, at 11:02 AM, James Gartner wrote:

> Folks,
> I have a Virgo PLAN file that i am trying to convert to a Feature file.
> Are there any guidelines for this? The plan file has this:
> <artifact type="configuration" name="com.example.service1" version="0"/>
> <artifact type="bundle" name="com.example.service1" version="1.0.0"/>
> 
> 
> I"m a bit unsure how to convert the configuration file artifact into an item
> in the feature file.
> Would it be something like this:
> <configfile>mvn:com.example.service1...../com.example.service1.properties</configfile>
> 
> 
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Convert-Virgo-PLAN-to-Karaf-Feature-files-tp3867950p3867950.html
> Sent from the Karaf - User mailing list archive at Nabble.com.

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

iQEcBAEBAgAGBQJPdHqlAAoJEATpPYSyaoIk8t4H/i31AKfjs2Cih9K4xHF+ImRK
kJUu/I6sHhPcPal9CGGXunJL8r4+X6yHAY8qrIVX1mePws2oysdStcquMfW2fMy5
INkou4hDkAd17ewZXWO5GEO+VmpLAH+Mk6K6JAhKQum6WEK8LLEoHRUCk/8P4apU
L2qQqw00Fhi1mcpD+Ir6NaTAlQabdYsn8L6/p/apjcbu0DTst2v/5WRXyzTvmj0B
kI6DKEhGIq4JWIcsQDvGZUXGNPx6DN6oNuR94LKDu4ruuS5nEX70X038gqVIW+As
L79NLuxIxITK4eHhxZ7ge301XXJ5pmkXeo7d5dIdnX7HquzDPFiTKv9mIE5RLZ0=
=ULUa
-----END PGP SIGNATURE-----

Re: Convert Virgo PLAN to Karaf Feature files

Posted by James Gartner <Ja...@moodys.com>.
This seems to resolve:

Orig from Virgo PLAN:
<artifact type="configuration" name="com.example.load_balancer"
version="0"/>
<artifact type="bundle" name="com.example.load_balancer" version="1.0.0"/>
Karaf Feature:

<bundle>file:C:\PATHTOFILE\com.example.load_balancer-1.0.0-SNAPSHOT.jar</bundle>
<configfile
finalname="etc/com.example.service1.properties">file:c:\PATHTOFILE\com.example.load_balancer.properties</configfile>


This seems to load into karaf, and I get that the
com.example.load_balancer.Features.xml is ACTIVE.  I see that it is
resolved, but when I do osgi:start id, and I look at the log (log:display),
I see this:

2012-03-29 22:42:40,453 | ERROR | p.load_balancer) |
ConfigurableLoadBalancer         | osgi.lb.ConfigurableLoadBalancer   64 |
154 - com.example.
load-balancer - 1.0.0.SNAPSHOT | ===== Config was removed/stopped (or not
present at start-up); will stop the bundle com.example.load-balancer =====

Any ideas as to how to go about debugging this?  This properties file is the
same as used in Virgo, and I converted another PLAN with this same type of
properties file, and that seems to be fine.

--
View this message in context: http://karaf.922171.n3.nabble.com/Convert-Virgo-PLAN-to-Karaf-Feature-files-tp3867950p3869787.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Convert Virgo PLAN to Karaf Feature files

Posted by James Gartner <Ja...@moodys.com>.
Thanks folks, yes I saw that part of the documentation,  which is why I asked
the question -- it indicates you can specify a config file, but it sounded
like it might be a special case. I wasn't sure I could use it for a general
purpose config file rather than specifying where the config file had to go
with the "finalname" attribute.
Looking at the provisioning schema, it looks like the finalname is required,
so I wasn't sure how to specify that this config file was for this
particular bundle -- how do I specify the final name for just a standard
bundle.  I certainly don't want to have to change the config file into a
list of properties.

--
View this message in context: http://karaf.922171.n3.nabble.com/Convert-Virgo-PLAN-to-Karaf-Feature-files-tp3867950p3868374.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Convert Virgo PLAN to Karaf Feature files

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

yes there is something like a config file, but also a configuration if needed.
The complete documentation about the features.xml can be found at [1]

here is a brief example of referencing a config file:
<configfile finalname="/etc/jetty.xml">mvn:org.apache.karaf/apache-karaf/2.2.5/xml/jettyconfig</configfile>

regards, Achim

[1] - http://karaf.apache.org/manual/latest-2.2.x/users-guide/provisioning.html

2012/3/29 James Gartner <Ja...@moodys.com>:
> Folks,
> I have a Virgo PLAN file that i am trying to convert to a Feature file.
> Are there any guidelines for this? The plan file has this:
> <artifact type="configuration" name="com.example.service1" version="0"/>
> <artifact type="bundle" name="com.example.service1" version="1.0.0"/>
>
>
> I"m a bit unsure how to convert the configuration file artifact into an item
> in the feature file.
> Would it be something like this:
> <configfile>mvn:com.example.service1...../com.example.service1.properties</configfile>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Convert-Virgo-PLAN-to-Karaf-Feature-files-tp3867950p3867950.html
> Sent from the Karaf - User mailing list archive at Nabble.com.



-- 

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/>