Re: [slingstart] Overriding a variable from the command line at runtime

2016-12-14 Thread Felix Meschberger
Hi I think this is a good topic to discuss on a broader level. I once implemented a function with two services configured through OSGi Configuration being able to overwritten by framework properties (aka system properties). What I did implement is a helper function which first checked the syst

Re: [slingstart] Overriding a variable from the command line at runtime

2016-12-14 Thread Carsten Ziegeler
Felix Meschberger wrote > > Am 14.12.2016 um 15:38 schrieb Carsten Ziegeler > mailto:cziege...@apache.org>>: > > Felix Meschberger wrote > > I guess this can be done with a ConfigurationPlugin transparently > > Ah ! Nice catch. And with the updated ConfigurationAdmin specification we can > be

Re: [slingstart] Overriding a variable from the command line at runtime

2016-12-14 Thread Felix Meschberger
Am 14.12.2016 um 15:38 schrieb Carsten Ziegeler mailto:cziege...@apache.org>>: Felix Meschberger wrote Hi I think this is a good topic to discuss on a broader level. I once implemented a function with two services configured through OSGi Configuration being able to overwritten by framework pr

Re: [slingstart] Overriding a variable from the command line at runtime

2016-12-14 Thread Carsten Ziegeler
Felix Meschberger wrote > Hi > > I think this is a good topic to discuss on a broader level. > > I once implemented a function with two services configured through OSGi > Configuration being able to overwritten by framework properties (aka system > properties). What I did implement is a helper

Re: [slingstart] Overriding a variable from the command line at runtime

2016-12-14 Thread Robert Munteanu
On Wed, 2016-12-14 at 14:40 +0100, Bertrand Delacretaz wrote: > On Wed, Dec 14, 2016 at 12:07 PM, Robert Munteanu > wrote: > > ...The idea is to allow the user to redefine it at runtime via > > system > > properties: > > > > java -jar ... -Dmpx.repository.home=/some/place ... > > FWIW the cranks

Re: [slingstart] Overriding a variable from the command line at runtime

2016-12-14 Thread Bertrand Delacretaz
On Wed, Dec 14, 2016 at 12:07 PM, Robert Munteanu wrote: > ...The idea is to allow the user to redefine it at runtime via system > properties: > > java -jar ... -Dmpx.repository.home=/some/place ... FWIW the crankstart launcher supports this, I've just added an example at http://svn.apache.org/r1

Re: [slingstart] Overriding a variable from the command line at runtime

2016-12-14 Thread Carsten Ziegeler
Robert Munteanu wrote > Hi, > > On Wed, 2016-12-14 at 12:57 +0100, Carsten Ziegeler wrote: >> Hi, >> >> I think what should work is to use variables/properties defined in >> the pom: >> In the prov model you have >> [variables] >>mpx.repository=${foo} >> >> in the pom you have >> >>${slin

Re: [slingstart] Overriding a variable from the command line at runtime

2016-12-14 Thread Robert Munteanu
Hi, On Wed, 2016-12-14 at 12:57 +0100, Carsten Ziegeler wrote: > Hi, > > I think what should work is to use variables/properties defined in > the pom: > In the prov model you have > [variables] >    mpx.repository=${foo} > > in the pom you have > >    ${sling.home}/repository > > > and then y

Re: [slingstart] Overriding a variable from the command line at runtime

2016-12-14 Thread Carsten Ziegeler
Hi, I think what should work is to use variables/properties defined in the pom: In the prov model you have [variables] mpx.repository=${foo} in the pom you have ${sling.home}/repository and then you set true for the slingstart maven plugin configuration. And finally you can use the mave

[slingstart] Overriding a variable from the command line at runtime

2016-12-14 Thread Robert Munteanu
Hi, I'm trying to set a 'dynamic' property in the slingstart model, based on sling.home: [variables]   mpx.repository.home=${sling.home}/repository The idea is to allow the user to redefine it at runtime via system properties: java -jar ... -Dmpx.repository.home=/some/place Is this possible us