Re: Karaf assembly plugin property edits erasing properties

2018-06-08 Thread Jean-Baptiste Onofré
Sorry I meant prepend because it could change the reading of the property.

It seems like a regression in 4.2.0.

I created https://issues.apache.org/jira/browse/KARAF-5781

On the other hand, I also created
https://issues.apache.org/jira/browse/KARAF-5782 to verify the create
kar goal behavior.

I gonna work on this during the week end.

Regards
JB

On 08/06/2018 17:29, Alex Soto wrote:
> Append?  No, I've never seen this documented anywhere, can you point me
> to a documentation resource where this is mentioned/illustrated?
> 
> Best regards,
> Alex soto
> 
> 
> 
> 
>> On Jun 8, 2018, at 8:52 AM, Jean-Baptiste Onofré > > wrote:
>>
>> Did you set append on the edit ?
>>
>> Regards
>> JB
>>
>> On 07/06/2018 21:47, Alex Soto wrote:
>>> Hello,
>>>
>>> Using Karaf 4.2.0, I want to update a property in my custom
>>> distribution. So I add file /src/main/karaf/assembly-property-edits.xml/
>>> with: 
>>>
>>>    
>>>    org.ops4j.pax.web.cfg
>>>    put
>>>    org.osgi.service.http.port
>>>    8182
>>>    
>>>
>>>
>>> The result is:
>>>
>>>    #Modified by org.apache.karaf.tools.utils.KarafPropertiesFile
>>>    #Thu Jun 07 15:39:28 EDT 2018
>>>    org.osgi.service.http.port=8182
>>>
>>>
>>>
>>> The issue is that it erased all other properties.  Normally, this file
>>> has the following:
>>>
>>>    org.osgi.service.http.port=8181
>>>    javax.servlet.context.tempdir=${karaf.data}/pax-web-jsp
>>>    org.ops4j.pax.web.config.file=${karaf.etc}/jetty.xml
>>>
>>>
>>>
>>> Is this the expected behavior?   How can I preserve the rest of the
>>> properties and modify just one?
>>>
>>> Best regards,
>>> Alex soto
>>>
>>>
>>
>> -- 
>> Jean-Baptiste Onofré
>> jbono...@apache.org 
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
> 

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


Re: execute only at first startup?

2018-06-08 Thread David Jencks
Well, you have to store the initialization state in some data somewhere :-)  
Now we have 3 or 4 ideas:

I think the simplest solution is going to be with BundleContext.getDataFile:
getDataFile 


you could put the logic in a bundle activator or possibly in a DS component 
activate method.

Create a file in the bundle private data area when the initialization completes 
and check for its existence before the initialization.

David Jencks

> On Jun 7, 2018, at 10:56 PM, Christian Schneider  
> wrote:
> 
> How about storing the fact that the initialization is done in the data?
> 
> I have seen this with liquibase.
> Liquibase is a tool that manages database updates. It stores the version of 
> the installed data in a table. 
> So when you install a new version it can do the necessary updates and then 
> stores the new version.
> 
> Best
> Christian
> 
> Am Fr., 8. Juni 2018 um 03:42 Uhr schrieb Max Spring  >:
> Not sure I understand your notion of "service changed" :-)
> I use the term "service" in a colloquial sense. I don't mean "OSGi service".
> 
> Let me try it that way:
> 
> My release build produces a self-contained tarball of the entire code of my 
> service.
> My "devops" automation (in Jenkins) deploys the tarball on a test VM together 
> with the production data.
> 
> After this deployment, the very first time the Karaf container starts up, I 
> want to run some initialization logic.
> But only this very first time. Any subsequent Karaf container start up should 
> not do this initialization any more.
> 
> -Max
> 
> 
> On 06/07/2018 05:48 PM, Leschke, Scott wrote:
> > You mean the logic should only execute if the service is "changed", but not 
> > in the case where the service is stopped and restarted?
> > 
> > -Original Message-
> > From: Max Spring [mailto:m2spr...@springdot.org 
> > ]
> > Sent: Thursday, June 07, 2018 7:40 PM
> > To: user@karaf.apache.org 
> > Subject: execute only at first startup?
> > 
> > I've got a Karaf-based service.
> > Whenever I deploy a new revision of my service, I need to execute some code 
> > only at the very first startup.
> > I have this first-time functionality available as a Karaf command which I 
> > currently run manually each time right after startup after a new deployment.
> > I'd like to automate this.
> > 
> > I'm thinking of using a marker file somewhere to indicate "first startup".
> > I'd have a new bundle checking for this file when it starts up. When it 
> > detect the file, the bundle executes my business logic initialization and 
> > then deletes the marker file.
> > 
> > Or, is there something better for this scenario?
> > 
> > -Max
> > 
> 
> 
> -- 
> -- 
> Christian Schneider
> http://www.liquid-reality.de 
> 
> Computer Scientist
> http://www.adobe.com 
> 



Re: Karaf assembly plugin property edits erasing properties

2018-06-08 Thread Francois Papon
Ok, sorry for the understanding.

François Papon
fpa...@apache.org
Open3m - https://www.open3m.io

Le 08/06/2018 à 20:52, Alex Soto a écrit :
> I understand “extend” will append the value to the existing property,
> not what I am looking for, but I tried, and still didn’t work, i.e.,
> same result.
>
> Best regards,
> Alex soto
>
>
>
>
>> On Jun 8, 2018, at 12:46 PM, Francois Papon
>> mailto:francois.pa...@openobject.fr>>
>> wrote:
>>
>> Mmm weird, because I used "extend" and it appended in the end of the
>> property file.
>>
>> Can you try ?
>>
>> François Papon
>> fpa...@apache.org
>> Open3m - https://www.open3m.io
>> Le 08/06/2018 à 19:54, Alex Soto a écrit :
>>> Hi François, JB mentioned “append” but I do not see any “append” in
>>> your example.
>>> As I indicated in my original post, I am using
>>> put but all other properties in the file are
>>> being removed.
>>>
>>> Best regards,
>>> Alex soto
>>>
>>>
>>>
>>>
 On Jun 8, 2018, at 11:43 AM, Francois Papon
 >>> > wrote:

 Hi Alex,

 Here an example :

 >>> xmlns="http://karaf.apache.org/tools/property-edits/1.0.0";>
  
   
     config.properties
     put
     karaf.framework
     equinox
   
   
     config.properties
     extend
     org.osgi.framework.system.capabilities
     my-magic-capability
   
   
     config.properties
     extend
     some-other-list
     my-value-goes-first
     
  
   


 François Papon
 fpa...@apache.org
 Open3m - https://www.open3m.io
 Le 08/06/2018 à 19:29, Alex Soto a écrit :
> Append?  No, I've never seen this documented anywhere, can you
> point me to a documentation resource where this is
> mentioned/illustrated?
>
> Best regards,
> Alex soto
>
>
>
>
>> On Jun 8, 2018, at 8:52 AM, Jean-Baptiste Onofré > > wrote:
>>
>> Did you set append on the edit ?
>>
>> Regards
>> JB
>>
>> On 07/06/2018 21:47, Alex Soto wrote:
>>> Hello,
>>>
>>> Using Karaf 4.2.0, I want to update a property in my custom
>>> distribution. So I add
>>> file /src/main/karaf/assembly-property-edits.xml/
>>> with: 
>>>
>>>    
>>>    org.ops4j.pax.web.cfg
>>>    put
>>>    org.osgi.service.http.port
>>>    8182
>>>    
>>>
>>>
>>> The result is:
>>>
>>>    #Modified by org.apache.karaf.tools.utils.KarafPropertiesFile
>>>    #Thu Jun 07 15:39:28 EDT 2018
>>>    org.osgi.service.http.port=8182
>>>
>>>
>>>
>>> The issue is that it erased all other properties.  Normally,
>>> this file
>>> has the following:
>>>
>>>    org.osgi.service.http.port=8181
>>>    javax.servlet.context.tempdir=${karaf.data}/pax-web-jsp
>>>    org.ops4j.pax.web.config.file=${karaf.etc}/jetty.xml
>>>
>>>
>>>
>>> Is this the expected behavior?   How can I preserve the rest of the
>>> properties and modify just one?
>>>
>>> Best regards,
>>> Alex soto
>>>
>>>
>>
>> -- 
>> Jean-Baptiste Onofré
>> jbono...@apache.org 
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>

>>>
>>
>



Re: Karaf assembly plugin property edits erasing properties

2018-06-08 Thread Alex Soto
I understand “extend” will append the value to the existing property, not what 
I am looking for, but I tried, and still didn’t work, i.e., same result.

Best regards,
Alex soto




> On Jun 8, 2018, at 12:46 PM, Francois Papon  
> wrote:
> 
> Mmm weird, because I used "extend" and it appended in the end of the property 
> file.
> 
> Can you try ?
> François Papon
> fpa...@apache.org 
> Open3m - https://www.open3m.io 
> Le 08/06/2018 à 19:54, Alex Soto a écrit :
>> Hi François, JB mentioned “append” but I do not see any “append” in your 
>> example.
>> As I indicated in my original post, I am using put 
>> but all other properties in the file are being removed.
>> 
>> Best regards,
>> Alex soto
>> 
>> 
>> 
>> 
>>> On Jun 8, 2018, at 11:43 AM, Francois Papon >> > wrote:
>>> 
>>> Hi Alex,
>>> 
>>> Here an example :
>>> 
>>> http://karaf.apache.org/tools/property-edits/1.0.0"; 
>>> >
>>>  
>>>   
>>> config.properties
>>> put
>>> karaf.framework
>>> equinox
>>>   
>>>   
>>> config.properties
>>> extend
>>> org.osgi.framework.system.capabilities
>>> my-magic-capability
>>>   
>>>   
>>> config.properties
>>> extend
>>> some-other-list
>>> my-value-goes-first
>>> 
>>>  
>>>   
>>> 
>>> 
>>> François Papon
>>> fpa...@apache.org 
>>> Open3m - https://www.open3m.io 
>>> Le 08/06/2018 à 19:29, Alex Soto a écrit :
 Append?  No, I've never seen this documented anywhere, can you point me to 
 a documentation resource where this is mentioned/illustrated?
 
 Best regards,
 Alex soto
 
 
 
 
> On Jun 8, 2018, at 8:52 AM, Jean-Baptiste Onofré  > wrote:
> 
> Did you set append on the edit ?
> 
> Regards
> JB
> 
> On 07/06/2018 21:47, Alex Soto wrote:
>> Hello,
>> 
>> Using Karaf 4.2.0, I want to update a property in my custom
>> distribution. So I add file /src/main/karaf/assembly-property-edits.xml/
>> with: 
>> 
>>
>>org.ops4j.pax.web.cfg
>>put
>>org.osgi.service.http.port
>>8182
>>
>> 
>> 
>> The result is:
>> 
>>#Modified by org.apache.karaf.tools.utils.KarafPropertiesFile
>>#Thu Jun 07 15:39:28 EDT 2018
>>org.osgi.service.http.port=8182
>> 
>> 
>> 
>> The issue is that it erased all other properties.  Normally, this file
>> has the following:
>> 
>>org.osgi.service.http.port=8181
>>javax.servlet.context.tempdir=${karaf.data}/pax-web-jsp
>>org.ops4j.pax.web.config.file=${karaf.etc}/jetty.xml
>> 
>> 
>> 
>> Is this the expected behavior?   How can I preserve the rest of the
>> properties and modify just one?
>> 
>> Best regards,
>> Alex soto
>> 
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbono...@apache.org 
> http://blog.nanthrax.net 
> Talend - http://www.talend.com 
 
>>> 
>> 
> 



Re: Karaf assembly plugin property edits erasing properties

2018-06-08 Thread Francois Papon
Mmm weird, because I used "extend" and it appended in the end of the
property file.

Can you try ?

François Papon
fpa...@apache.org
Open3m - https://www.open3m.io

Le 08/06/2018 à 19:54, Alex Soto a écrit :
> Hi François, JB mentioned “append” but I do not see any “append” in
> your example.
> As I indicated in my original post, I am using
> put but all other properties in the file are
> being removed.
>
> Best regards,
> Alex soto
>
>
>
>
>> On Jun 8, 2018, at 11:43 AM, Francois Papon
>> mailto:francois.pa...@openobject.fr>>
>> wrote:
>>
>> Hi Alex,
>>
>> Here an example :
>>
>> > xmlns="http://karaf.apache.org/tools/property-edits/1.0.0";>
>>  
>>   
>>     config.properties
>>     put
>>     karaf.framework
>>     equinox
>>   
>>   
>>     config.properties
>>     extend
>>     org.osgi.framework.system.capabilities
>>     my-magic-capability
>>   
>>   
>>     config.properties
>>     extend
>>     some-other-list
>>     my-value-goes-first
>>     
>>  
>>   
>>
>>
>> François Papon
>> fpa...@apache.org
>> Open3m - https://www.open3m.io
>> Le 08/06/2018 à 19:29, Alex Soto a écrit :
>>> Append?  No, I've never seen this documented anywhere, can you point
>>> me to a documentation resource where this is mentioned/illustrated?
>>>
>>> Best regards,
>>> Alex soto
>>>
>>>
>>>
>>>
 On Jun 8, 2018, at 8:52 AM, Jean-Baptiste Onofré >>> > wrote:

 Did you set append on the edit ?

 Regards
 JB

 On 07/06/2018 21:47, Alex Soto wrote:
> Hello,
>
> Using Karaf 4.2.0, I want to update a property in my custom
> distribution. So I add
> file /src/main/karaf/assembly-property-edits.xml/
> with: 
>
>    
>    org.ops4j.pax.web.cfg
>    put
>    org.osgi.service.http.port
>    8182
>    
>
>
> The result is:
>
>    #Modified by org.apache.karaf.tools.utils.KarafPropertiesFile
>    #Thu Jun 07 15:39:28 EDT 2018
>    org.osgi.service.http.port=8182
>
>
>
> The issue is that it erased all other properties.  Normally, this file
> has the following:
>
>    org.osgi.service.http.port=8181
>    javax.servlet.context.tempdir=${karaf.data}/pax-web-jsp
>    org.ops4j.pax.web.config.file=${karaf.etc}/jetty.xml
>
>
>
> Is this the expected behavior?   How can I preserve the rest of the
> properties and modify just one?
>
> Best regards,
> Alex soto
>
>

 -- 
 Jean-Baptiste Onofré
 jbono...@apache.org 
 http://blog.nanthrax.net
 Talend - http://www.talend.com
>>>
>>
>



Re: Karaf assembly plugin property edits erasing properties

2018-06-08 Thread Alex Soto
Hi François, JB mentioned “append” but I do not see any “append” in your 
example.
As I indicated in my original post, I am using put but 
all other properties in the file are being removed.

Best regards,
Alex soto




> On Jun 8, 2018, at 11:43 AM, Francois Papon  
> wrote:
> 
> Hi Alex,
> 
> Here an example :
> 
> http://karaf.apache.org/tools/property-edits/1.0.0"; 
> >
>  
>   
> config.properties
> put
> karaf.framework
> equinox
>   
>   
> config.properties
> extend
> org.osgi.framework.system.capabilities
> my-magic-capability
>   
>   
> config.properties
> extend
> some-other-list
> my-value-goes-first
> 
>  
>   
> 
> 
> François Papon
> fpa...@apache.org 
> Open3m - https://www.open3m.io 
> Le 08/06/2018 à 19:29, Alex Soto a écrit :
>> Append?  No, I've never seen this documented anywhere, can you point me to a 
>> documentation resource where this is mentioned/illustrated?
>> 
>> Best regards,
>> Alex soto
>> 
>> 
>> 
>> 
>>> On Jun 8, 2018, at 8:52 AM, Jean-Baptiste Onofré >> > wrote:
>>> 
>>> Did you set append on the edit ?
>>> 
>>> Regards
>>> JB
>>> 
>>> On 07/06/2018 21:47, Alex Soto wrote:
 Hello,
 
 Using Karaf 4.2.0, I want to update a property in my custom
 distribution. So I add file /src/main/karaf/assembly-property-edits.xml/
 with: 
 

org.ops4j.pax.web.cfg
put
org.osgi.service.http.port
8182

 
 
 The result is:
 
#Modified by org.apache.karaf.tools.utils.KarafPropertiesFile
#Thu Jun 07 15:39:28 EDT 2018
org.osgi.service.http.port=8182
 
 
 
 The issue is that it erased all other properties.  Normally, this file
 has the following:
 
org.osgi.service.http.port=8181
javax.servlet.context.tempdir=${karaf.data}/pax-web-jsp
org.ops4j.pax.web.config.file=${karaf.etc}/jetty.xml
 
 
 
 Is this the expected behavior?   How can I preserve the rest of the
 properties and modify just one?
 
 Best regards,
 Alex soto
 
 
>>> 
>>> -- 
>>> Jean-Baptiste Onofré
>>> jbono...@apache.org 
>>> http://blog.nanthrax.net 
>>> Talend - http://www.talend.com 
>> 
> 



Re: Karaf assembly plugin property edits erasing properties

2018-06-08 Thread Francois Papon
Hi Alex,

Here an example :

http://karaf.apache.org/tools/property-edits/1.0.0";>
 
  
    config.properties
    put
    karaf.framework
    equinox
  
  
    config.properties
    extend
    org.osgi.framework.system.capabilities
    my-magic-capability
  
  
    config.properties
    extend
    some-other-list
    my-value-goes-first
    
 
  


François Papon
fpa...@apache.org
Open3m - https://www.open3m.io

Le 08/06/2018 à 19:29, Alex Soto a écrit :
> Append?  No, I've never seen this documented anywhere, can you point
> me to a documentation resource where this is mentioned/illustrated?
>
> Best regards,
> Alex soto
>
>
>
>
>> On Jun 8, 2018, at 8:52 AM, Jean-Baptiste Onofré > > wrote:
>>
>> Did you set append on the edit ?
>>
>> Regards
>> JB
>>
>> On 07/06/2018 21:47, Alex Soto wrote:
>>> Hello,
>>>
>>> Using Karaf 4.2.0, I want to update a property in my custom
>>> distribution. So I add file /src/main/karaf/assembly-property-edits.xml/
>>> with: 
>>>
>>>    
>>>    org.ops4j.pax.web.cfg
>>>    put
>>>    org.osgi.service.http.port
>>>    8182
>>>    
>>>
>>>
>>> The result is:
>>>
>>>    #Modified by org.apache.karaf.tools.utils.KarafPropertiesFile
>>>    #Thu Jun 07 15:39:28 EDT 2018
>>>    org.osgi.service.http.port=8182
>>>
>>>
>>>
>>> The issue is that it erased all other properties.  Normally, this file
>>> has the following:
>>>
>>>    org.osgi.service.http.port=8181
>>>    javax.servlet.context.tempdir=${karaf.data}/pax-web-jsp
>>>    org.ops4j.pax.web.config.file=${karaf.etc}/jetty.xml
>>>
>>>
>>>
>>> Is this the expected behavior?   How can I preserve the rest of the
>>> properties and modify just one?
>>>
>>> Best regards,
>>> Alex soto
>>>
>>>
>>
>> -- 
>> Jean-Baptiste Onofré
>> jbono...@apache.org 
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>



Re: Karaf assembly plugin property edits erasing properties

2018-06-08 Thread Alex Soto
Append?  No, I've never seen this documented anywhere, can you point me to a 
documentation resource where this is mentioned/illustrated?

Best regards,
Alex soto




> On Jun 8, 2018, at 8:52 AM, Jean-Baptiste Onofré  wrote:
> 
> Did you set append on the edit ?
> 
> Regards
> JB
> 
> On 07/06/2018 21:47, Alex Soto wrote:
>> Hello,
>> 
>> Using Karaf 4.2.0, I want to update a property in my custom
>> distribution. So I add file /src/main/karaf/assembly-property-edits.xml/
>> with: 
>> 
>>
>>org.ops4j.pax.web.cfg
>>put
>>org.osgi.service.http.port
>>8182
>>
>> 
>> 
>> The result is:
>> 
>>#Modified by org.apache.karaf.tools.utils.KarafPropertiesFile
>>#Thu Jun 07 15:39:28 EDT 2018
>>org.osgi.service.http.port=8182
>> 
>> 
>> 
>> The issue is that it erased all other properties.  Normally, this file
>> has the following:
>> 
>>org.osgi.service.http.port=8181
>>javax.servlet.context.tempdir=${karaf.data}/pax-web-jsp
>>org.ops4j.pax.web.config.file=${karaf.etc}/jetty.xml
>> 
>> 
>> 
>> Is this the expected behavior?   How can I preserve the rest of the
>> properties and modify just one?
>> 
>> Best regards,
>> Alex soto
>> 
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com



Re: Unresolved dependency using blueprint transaction

2018-06-08 Thread Francois Papon
You can also add the config in a feature.xml, I will create the file in
the "etc" directory when installing your feature :

        
    osgi.jdbc.driver.class=org.apache.derby.jdbc.EmbeddedDriver
    dataSourceName=jdbc/vineyard
    url=jdbc:derby:data/vineyard/derby;create=true
    

François Papon
fpa...@apache.org
Open3m - https://www.open3m.io

Le 08/06/2018 à 19:09, Francois Papon a écrit :
> Here an example of datasource-file for Apache Derby database :
>
> osgi.jdbc.driver.class=org.apache.derby.jdbc.EmbeddedDriver
> dataSourceName=jdbc/vineyard
> url=jdbc:derby:data/vineyard/derby;create=true
>
>
> François Papon
> fpa...@apache.org
> Open3m - https://www.open3m.io
>
> Le 08/06/2018 à 18:45, Jean-Baptiste Onofré a écrit :
>> Yes, you have to install the datasource "provider".
>>
>> And then, use jdbc:ds-create that create
>> etc/org.ops4j.datasource-xxx.cfg file
>>
>> Regards
>> JB
>>
>> On 08/06/2018 16:24, ceugster wrote:
>>> Hi
>>>  I tried to follow the enterprise jdbc section of your documentation and had
>>> some time to find out, that besides 
>>>
>>> karaf@root()> feature:repo-add pax-jdbc
>>> karaf@root()> feature:install pax-jdbc
>>> karaf@root()> feature:install pax-jdbc-config
>>> karaf@root()> feature:install jdbc
>>>
>>> there should also be mentioned:
>>>
>>> karaf@root()> feature:install pax-jdbc-derby
>>>
>>> if one would try the example to create a datasource. I do not know, how I
>>> can you inform better than this way.
>>>
>>>
>>>
>>>
>>> --
>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>



Re: Unresolved dependency using blueprint transaction

2018-06-08 Thread Francois Papon
Here an example of datasource-file for Apache Derby database :

osgi.jdbc.driver.class=org.apache.derby.jdbc.EmbeddedDriver
dataSourceName=jdbc/vineyard
url=jdbc:derby:data/vineyard/derby;create=true


François Papon
fpa...@apache.org
Open3m - https://www.open3m.io

Le 08/06/2018 à 18:45, Jean-Baptiste Onofré a écrit :
> Yes, you have to install the datasource "provider".
>
> And then, use jdbc:ds-create that create
> etc/org.ops4j.datasource-xxx.cfg file
>
> Regards
> JB
>
> On 08/06/2018 16:24, ceugster wrote:
>> Hi
>>  I tried to follow the enterprise jdbc section of your documentation and had
>> some time to find out, that besides 
>>
>> karaf@root()> feature:repo-add pax-jdbc
>> karaf@root()> feature:install pax-jdbc
>> karaf@root()> feature:install pax-jdbc-config
>> karaf@root()> feature:install jdbc
>>
>> there should also be mentioned:
>>
>> karaf@root()> feature:install pax-jdbc-derby
>>
>> if one would try the example to create a datasource. I do not know, how I
>> can you inform better than this way.
>>
>>
>>
>>
>> --
>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>



Re: Unresolved dependency using blueprint transaction

2018-06-08 Thread Jean-Baptiste Onofré
Yes, you have to install the datasource "provider".

And then, use jdbc:ds-create that create
etc/org.ops4j.datasource-xxx.cfg file

Regards
JB

On 08/06/2018 16:24, ceugster wrote:
> Hi
>  I tried to follow the enterprise jdbc section of your documentation and had
> some time to find out, that besides 
> 
> karaf@root()> feature:repo-add pax-jdbc
> karaf@root()> feature:install pax-jdbc
> karaf@root()> feature:install pax-jdbc-config
> karaf@root()> feature:install jdbc
> 
> there should also be mentioned:
> 
> karaf@root()> feature:install pax-jdbc-derby
> 
> if one would try the example to create a datasource. I do not know, how I
> can you inform better than this way.
> 
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

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


Re: Unresolved dependency using blueprint transaction

2018-06-08 Thread ceugster
Hi
 I tried to follow the enterprise jdbc section of your documentation and had
some time to find out, that besides 

karaf@root()> feature:repo-add pax-jdbc
karaf@root()> feature:install pax-jdbc
karaf@root()> feature:install pax-jdbc-config
karaf@root()> feature:install jdbc

there should also be mentioned:

karaf@root()> feature:install pax-jdbc-derby

if one would try the example to create a datasource. I do not know, how I
can you inform better than this way.




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Karaf assembly plugin property edits erasing properties

2018-06-08 Thread Jean-Baptiste Onofré
Did you set append on the edit ?

Regards
JB

On 07/06/2018 21:47, Alex Soto wrote:
> Hello,
> 
> Using Karaf 4.2.0, I want to update a property in my custom
> distribution. So I add file /src/main/karaf/assembly-property-edits.xml/
> with: 
> 
> 
>     org.ops4j.pax.web.cfg
>     put
>     org.osgi.service.http.port
>     8182
> 
> 
> 
> The result is:
> 
> #Modified by org.apache.karaf.tools.utils.KarafPropertiesFile
> #Thu Jun 07 15:39:28 EDT 2018
> org.osgi.service.http.port=8182
> 
> 
> 
> The issue is that it erased all other properties.  Normally, this file
> has the following:
> 
> org.osgi.service.http.port=8181
> javax.servlet.context.tempdir=${karaf.data}/pax-web-jsp
> org.ops4j.pax.web.config.file=${karaf.etc}/jetty.xml
> 
> 
> 
> Is this the expected behavior?   How can I preserve the rest of the
> properties and modify just one?
> 
> Best regards,
> Alex soto
> 
> 

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


Re: Karaf assembly plugin property edits erasing properties

2018-06-08 Thread SvS
Hi Alex,

I have similar problems. In my opinion, it is not the expected behavior.
Older versions work as you would like. I am using the old version of the
karaf-maven plugin (4.0.10).

See  this

  
post.

I will see if I can do anything with it.



-
Regards,
SvS
--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: Any plans for supporting JDK 11 ?

2018-06-08 Thread Francois Papon
Hi Serge,

This is a great news, thanks for using Apache Karaf :)


François Papon
fpa...@apache.org
Open3m - https://www.open3m.io

Le 08/06/2018 à 13:07, Serge Huber a écrit :
> Thanks a lot for all this information. I had some questions about JDK
> 11 support and you've given lots of details that I will be able to
> relay internally.
>
> And of course thanks a lot for all the hard work, I wish I could
> contribute more :) 
>
> cheers,
>   Serge... 
>
> ps : for those of us who don't know we now use Apache Karaf in all our
> server products and love it !
>
>
>   Serge Huber
>   CTO & Co-Founder
>
>
>   T +41 22 361 3424
>   9 route des Jeunes | 1227 Acacias | Switzerland
>   jahia.com 
>   SKYPE | LINKEDIN  | TWITTER
>    | VCARD
>   
>     
>
>   > JOIN OUR COMMUNITY  to evaluate, get trained
>   and to discover why Jahia is a leading User Experience Platform
>   (UXP) for Digital Transformation.
>
>
> On Fri, Jun 8, 2018 at 12:48 AM, Freeman Fang  > wrote:
>
> Please see the patch and my comment on KARAF-5764, I think we need
> more change to support java11 in KARAF.
>
> As XBean also embed asm source, so we need a new XBean release
> which build against ASM6.2, as well as a new easymock release.
>
> Besides, Since JDK11, those modules get removed from JDK
>
> * java.corba — CORBA
>  * java.transaction — The subset of the Java Transaction API defined by 
> Java SE to support CORBA Object Transaction Services
>  * java.activation — JavaBeans Activation Framework
>  * java.xml.bind — Java Architecture for XML Binding (JAXB)
>  * java.xml.ws  — Java API for XML Web Services 
> (JAX-WS), Web Services Metadata for the Java Platform, and SOAP with 
> Attachments for Java (SAAJ)
>  * java.xml.ws.annotation — The subset of the JSR-250 Common Annotations 
> defined by Java SE to support web services
>
>
> So I think we don't need to use --patch-module for those APIs
> which already get removed. What we do is just use normal bundle
> for those APIs, or if we really need those API in boot stage we
> can put those in $KARAF_HOME/lib/boot folder, so far we need jaxb
> and activation in lib/boot/folder as features.core need those.
>
> [1]https://issues.apache.org/jira/browse/KARAF-5764
> 
>
> Cheers
> -
> Freeman(Yue) Fang
>
> Red Hat, Inc. 
> FuseSource is now part of Red Hat
>
>
>
>> On Jun 8, 2018, at 1:37 AM, Jean-Baptiste Onofré > > wrote:
>>
>> Hi Serge,
>>
>> I just submitted Aries Proxy Impl 1.1.2 with ASM 6.2 this morning,
>> bringing support of Java 9, 10, 11.
>>
>> As soon as the vote passed, I will update in Karaf. The purpose is to
>> include this for Karaf 4.2.1 (planned next week), in order to give us
>> time to test.
>> Before 4.2.1, I have also to work on Pax Web (7.1.1) supporting Jetty
>> 9.4.10 supporting new Java version as well.
>>
>> So, to summarize, 4.2.1 should support Java 10 & 11, thanks to
>> the ASM
>> 6.2 update + Aries Proxy + Pax Web/Jetty update (all Jira are created
>> and in my bucket).
>>
>> Regards
>> JB
>>
>> On 07/06/2018 17:35, Serge Huber wrote:
>>> Hello,
>>>
>>> With the upcoming release of JDK 11 (planned for September), I was
>>> wondering what the plans for supporting it looked like ? Are we
>>> expecting any kind of blocking problems ? Should be simpler than
>>> JDK 9 I
>>> think. 
>>>
>>> I didn't follow the JDK 10 support, did that involve any problems ?
>>>
>>> cheers,
>>>   Serge... 
>>
>> -- 
>> Jean-Baptiste Onofré
>> jbono...@apache.org 
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>
>



Re: Any plans for supporting JDK 11 ?

2018-06-08 Thread Serge Huber
Thanks a lot for all this information. I had some questions about JDK 11
support and you've given lots of details that I will be able to relay
internally.

And of course thanks a lot for all the hard work, I wish I could contribute
more :)

cheers,
  Serge...

ps : for those of us who don't know we now use Apache Karaf in all our
server products and love it !

Serge Huber
CTO & Co-Founder
T +41 22 361 3424
9 route des Jeunes | 1227 Acacias | Switzerland
jahia.com 
SKYPE | LINKEDIN  | TWITTER
 | VCARD



> JOIN OUR COMMUNITY  to evaluate, get trained and
to discover why Jahia is a leading User Experience Platform (UXP) for
Digital Transformation.

On Fri, Jun 8, 2018 at 12:48 AM, Freeman Fang 
wrote:

> Please see the patch and my comment on KARAF-5764, I think we need more
> change to support java11 in KARAF.
>
> As XBean also embed asm source, so we need a new XBean release which build
> against ASM6.2, as well as a new easymock release.
>
> Besides, Since JDK11, those modules get removed from JDK
>
> * java.corba — CORBA
>  * java.transaction — The subset of the Java Transaction API defined by Java 
> SE to support CORBA Object Transaction Services
>  * java.activation — JavaBeans Activation Framework
>  * java.xml.bind — Java Architecture for XML Binding (JAXB)
>  * java.xml.ws — Java API for XML Web Services (JAX-WS), Web Services 
> Metadata for the Java Platform, and SOAP with Attachments for Java (SAAJ)
>  * java.xml.ws.annotation — The subset of the JSR-250 Common Annotations 
> defined by Java SE to support web services
>
>
> So I think we don't need to use --patch-module for those APIs which
> already get removed. What we do is just use normal bundle for those APIs,
> or if we really need those API in boot stage we can put those in
> $KARAF_HOME/lib/boot folder, so far we need jaxb and activation in
> lib/boot/folder as features.core need those.
>
> [1]https://issues.apache.org/jira/browse/KARAF-5764
>
> Cheers
> -
> Freeman(Yue) Fang
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
>
>
>
> On Jun 8, 2018, at 1:37 AM, Jean-Baptiste Onofré  wrote:
>
> Hi Serge,
>
> I just submitted Aries Proxy Impl 1.1.2 with ASM 6.2 this morning,
> bringing support of Java 9, 10, 11.
>
> As soon as the vote passed, I will update in Karaf. The purpose is to
> include this for Karaf 4.2.1 (planned next week), in order to give us
> time to test.
> Before 4.2.1, I have also to work on Pax Web (7.1.1) supporting Jetty
> 9.4.10 supporting new Java version as well.
>
> So, to summarize, 4.2.1 should support Java 10 & 11, thanks to the ASM
> 6.2 update + Aries Proxy + Pax Web/Jetty update (all Jira are created
> and in my bucket).
>
> Regards
> JB
>
> On 07/06/2018 17:35, Serge Huber wrote:
>
> Hello,
>
> With the upcoming release of JDK 11 (planned for September), I was
> wondering what the plans for supporting it looked like ? Are we
> expecting any kind of blocking problems ? Should be simpler than JDK 9 I
> think.
>
> I didn't follow the JDK 10 support, did that involve any problems ?
>
> cheers,
>   Serge...
>
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
>
>