You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Costin Leau (JIRA)" <ji...@apache.org> on 2007/09/26 17:12:50 UTC

[jira] Created: (FELIX-380) provide configuration.properties in the framework.jar by default

provide configuration.properties in the framework.jar by default
----------------------------------------------------------------

                 Key: FELIX-380
                 URL: https://issues.apache.org/jira/browse/FELIX-380
             Project: Felix
          Issue Type: Improvement
          Components: Framework
    Affects Versions: 1.0.0
            Reporter: Costin Leau


Even when using just the framework felix as an embedded library, it is helpful to have the default configuration.properties (which specifies the packages) loaded automatically and present in the jar.
The configuration could be overwritten at startup so clients that want different packages can do that while clients that do not interact with this aspect can have a resonable default loaded for them (which is our case = Spring OSGi).

Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (FELIX-380) provide configuration.properties in the framework.jar by default

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall reassigned FELIX-380:
-------------------------------------

    Assignee: Richard S. Hall

> provide configuration.properties in the framework.jar by default
> ----------------------------------------------------------------
>
>                 Key: FELIX-380
>                 URL: https://issues.apache.org/jira/browse/FELIX-380
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: 1.0.0
>            Reporter: Costin Leau
>            Assignee: Richard S. Hall
>
> Even when using just the framework felix as an embedded library, it is helpful to have the default configuration.properties (which specifies the packages) loaded automatically and present in the jar.
> The configuration could be overwritten at startup so clients that want different packages can do that while clients that do not interact with this aspect can have a resonable default loaded for them (which is our case = Spring OSGi).
> Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-380) provide configuration.properties in the framework.jar by default

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart McCulloch updated FELIX-380:
-----------------------------------

    Attachment: FELIX_380_20071016.txt

Here's a suggested patch (FELIX_380_20071016.txt) to centralize the JRE package lists.

Basic idea:
 - config.properties holds the primary JRE package lists
 - default.properties uses BND macros to include these lists
 - include config.properties in the BND instructions (to get the package lists)
 - use ${dollar} to protect early expansion of certain properties
 - define <dollar>$</dollar> in the BND instructions

I've tried this with trunk and it appears to work ok

btw, ignore the "target/classes/default.properties" file, as this isn't processed by BND.
it's just been copied across by Maven - look at the one in the actual bundle jar instead

> provide configuration.properties in the framework.jar by default
> ----------------------------------------------------------------
>
>                 Key: FELIX-380
>                 URL: https://issues.apache.org/jira/browse/FELIX-380
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: 1.0.0
>            Reporter: Costin Leau
>            Assignee: Richard S. Hall
>         Attachments: FELIX_380_20071016.txt
>
>
> Even when using just the framework felix as an embedded library, it is helpful to have the default configuration.properties (which specifies the packages) loaded automatically and present in the jar.
> The configuration could be overwritten at startup so clients that want different packages can do that while clients that do not interact with this aspect can have a resonable default loaded for them (which is our case = Spring OSGi).
> Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-380) provide configuration.properties in the framework.jar by default

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530467 ] 

Richard S. Hall commented on FELIX-380:
---------------------------------------

After thinking about this with Costin, I agree it could be possible to do something reasonable. Effectively, we could embed a stripped down config.properties file in our launcher (i.e., main.jar), but have main.jar still search for "conf/config.properties". If it finds the file, it uses the file contents as the configuration properties, otherwise it uses the embedded config.properties file.

Does that seem like a reasonable approach?

If so, what should be in the embedded config.properties file? Just the framework exported packages? Or framework exported and JRE packages? I assume no "auto" properties.

> provide configuration.properties in the framework.jar by default
> ----------------------------------------------------------------
>
>                 Key: FELIX-380
>                 URL: https://issues.apache.org/jira/browse/FELIX-380
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: 1.0.0
>            Reporter: Costin Leau
>
> Even when using just the framework felix as an embedded library, it is helpful to have the default configuration.properties (which specifies the packages) loaded automatically and present in the jar.
> The configuration could be overwritten at startup so clients that want different packages can do that while clients that do not interact with this aspect can have a resonable default loaded for them (which is our case = Spring OSGi).
> Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-380) provide configuration.properties in the framework.jar by default

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531987 ] 

Richard S. Hall commented on FELIX-380:
---------------------------------------

I have added support for a bare-bones default.properties resource file that gets loaded if the actual config.properties file cannot be found.

I have one reservation about this approach, now we have two places in Felix where we need to maintain a list of JRE packages (i.e., in config.properties and default.properties). It would be nicer if we only had to maintain these properties once. Anyone have any good ideas on how to accomplish that?

> provide configuration.properties in the framework.jar by default
> ----------------------------------------------------------------
>
>                 Key: FELIX-380
>                 URL: https://issues.apache.org/jira/browse/FELIX-380
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: 1.0.0
>            Reporter: Costin Leau
>
> Even when using just the framework felix as an embedded library, it is helpful to have the default configuration.properties (which specifies the packages) loaded automatically and present in the jar.
> The configuration could be overwritten at startup so clients that want different packages can do that while clients that do not interact with this aspect can have a resonable default loaded for them (which is our case = Spring OSGi).
> Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (FELIX-380) provide configuration.properties in the framework.jar by default

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Costin Leau (JIRA) wrote:
> Thanks - is there any maven repo where I can get the snapshot?
> I've tried http://people.apache.org/repo/m2-snapshot-repository/org/apache/felix/ but that one doesn't seem to be updated.
>   

We haven't pushed one yet...I just tried to push a new snapshot, but I 
was unable to due to a Maven issue...I will try to get to it later.

-> richard

>   
>> provide configuration.properties in the framework.jar by default
>> ----------------------------------------------------------------
>>
>>                 Key: FELIX-380
>>                 URL: https://issues.apache.org/jira/browse/FELIX-380
>>             Project: Felix
>>          Issue Type: Improvement
>>          Components: Framework
>>    Affects Versions: 1.0.0
>>            Reporter: Costin Leau
>>            Assignee: Richard S. Hall
>>         Attachments: FELIX_380_20071016.txt
>>
>>
>> Even when using just the framework felix as an embedded library, it is helpful to have the default configuration.properties (which specifies the packages) loaded automatically and present in the jar.
>> The configuration could be overwritten at startup so clients that want different packages can do that while clients that do not interact with this aspect can have a resonable default loaded for them (which is our case = Spring OSGi).
>> Thanks.
>>     
>
>   

[jira] Commented: (FELIX-380) provide configuration.properties in the framework.jar by default

Posted by "Costin Leau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537218 ] 

Costin Leau commented on FELIX-380:
-----------------------------------

Thanks - is there any maven repo where I can get the snapshot?
I've tried http://people.apache.org/repo/m2-snapshot-repository/org/apache/felix/ but that one doesn't seem to be updated.

> provide configuration.properties in the framework.jar by default
> ----------------------------------------------------------------
>
>                 Key: FELIX-380
>                 URL: https://issues.apache.org/jira/browse/FELIX-380
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: 1.0.0
>            Reporter: Costin Leau
>            Assignee: Richard S. Hall
>         Attachments: FELIX_380_20071016.txt
>
>
> Even when using just the framework felix as an embedded library, it is helpful to have the default configuration.properties (which specifies the packages) loaded automatically and present in the jar.
> The configuration could be overwritten at startup so clients that want different packages can do that while clients that do not interact with this aspect can have a resonable default loaded for them (which is our case = Spring OSGi).
> Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-380) provide configuration.properties in the framework.jar by default

Posted by "Karl Pauls (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532020 ] 

Karl Pauls commented on FELIX-380:
----------------------------------

What about a simple <<include>> possibility in the config reading process?

> provide configuration.properties in the framework.jar by default
> ----------------------------------------------------------------
>
>                 Key: FELIX-380
>                 URL: https://issues.apache.org/jira/browse/FELIX-380
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: 1.0.0
>            Reporter: Costin Leau
>            Assignee: Richard S. Hall
>
> Even when using just the framework felix as an embedded library, it is helpful to have the default configuration.properties (which specifies the packages) loaded automatically and present in the jar.
> The configuration could be overwritten at startup so clients that want different packages can do that while clients that do not interact with this aspect can have a resonable default loaded for them (which is our case = Spring OSGi).
> Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-380) provide configuration.properties in the framework.jar by default

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532099 ] 

Richard S. Hall commented on FELIX-380:
---------------------------------------

I had a, perhaps, simpler idea.

Couldn't we just define these properties in our parent POM (or some logical place) and simply have property substitution performed by Maven/bundleplugin?

> provide configuration.properties in the framework.jar by default
> ----------------------------------------------------------------
>
>                 Key: FELIX-380
>                 URL: https://issues.apache.org/jira/browse/FELIX-380
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: 1.0.0
>            Reporter: Costin Leau
>            Assignee: Richard S. Hall
>
> Even when using just the framework felix as an embedded library, it is helpful to have the default configuration.properties (which specifies the packages) loaded automatically and present in the jar.
> The configuration could be overwritten at startup so clients that want different packages can do that while clients that do not interact with this aspect can have a resonable default loaded for them (which is our case = Spring OSGi).
> Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-380) provide configuration.properties in the framework.jar by default

Posted by "Costin Leau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531330 ] 

Costin Leau commented on FELIX-380:
-----------------------------------

I think the JRE should be exported since this is what most people expect. Currently in Spring/OSGi we just include the JRE packages and org.osgi.framework.system.packages (i.e. the minimal usable framework).
As a comparison this is what the other platforms (Equinox, Knopflerfish) offer as well.

> provide configuration.properties in the framework.jar by default
> ----------------------------------------------------------------
>
>                 Key: FELIX-380
>                 URL: https://issues.apache.org/jira/browse/FELIX-380
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: 1.0.0
>            Reporter: Costin Leau
>
> Even when using just the framework felix as an embedded library, it is helpful to have the default configuration.properties (which specifies the packages) loaded automatically and present in the jar.
> The configuration could be overwritten at startup so clients that want different packages can do that while clients that do not interact with this aspect can have a resonable default loaded for them (which is our case = Spring OSGi).
> Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FELIX-380) provide configuration.properties in the framework.jar by default

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall resolved FELIX-380.
-----------------------------------

    Resolution: Fixed

I think this issue can be resolved now after Stuart's patch. Costin, you can feel free to close this issue if you determine that it will meet your needs.

> provide configuration.properties in the framework.jar by default
> ----------------------------------------------------------------
>
>                 Key: FELIX-380
>                 URL: https://issues.apache.org/jira/browse/FELIX-380
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: 1.0.0
>            Reporter: Costin Leau
>            Assignee: Richard S. Hall
>         Attachments: FELIX_380_20071016.txt
>
>
> Even when using just the framework felix as an embedded library, it is helpful to have the default configuration.properties (which specifies the packages) loaded automatically and present in the jar.
> The configuration could be overwritten at startup so clients that want different packages can do that while clients that do not interact with this aspect can have a resonable default loaded for them (which is our case = Spring OSGi).
> Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.