You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2007/08/22 15:02:30 UTC

[jira] Created: (FELIX-343) Add "additional-Resource" option

Add "additional-Resource" option
--------------------------------

                 Key: FELIX-343
                 URL: https://issues.apache.org/jira/browse/FELIX-343
             Project: Felix
          Issue Type: Improvement
          Components: Maven Bundle Plugin
    Affects Versions: 1.0.0
            Reporter: Carsten Ziegeler
         Attachments: patch.txt

The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.

Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:

- If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
- If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
- if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
- if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Commented: (FELIX-343) Add "additional-Resource" option

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

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

Stuart, the same idea crossed my mind, but in the end, I still think it all sounds sucky because there is this underlying assumption that the bundle developer is aware of all of these hidden defaults and can make intelligent decisions about whether or not to override them.

Regardless, if we are going to do it, I am more in favor modifying Include-Resource to support it, rather than adding another property. You could just embed the flag right into the Include-Resource property, like:

    <Include-Resource>${default-resources},my/resources</Include-Resource>

Then the plugin could expand the default resources when present before passing it to BND. At least this makes it explicit and somewhat obvious what is going on. However, I don't want to sound like I like this idea. I think it is a band-aid on an ugly issue.

> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Work started: (FELIX-343) Add "additional-Resource" option

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

Work on FELIX-343 started by Stuart McCulloch.

> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>            Assignee: Stuart McCulloch
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Assigned: (FELIX-343) Add "additional-Resource" option

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

Stuart McCulloch reassigned FELIX-343:
--------------------------------------

    Assignee: Stuart McCulloch

> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>            Assignee: Stuart McCulloch
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Commented: (FELIX-343) Add "additional-Resource" option

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

Stuart McCulloch commented on FELIX-343:
----------------------------------------

well, we can always add an info message to let people know what's happening (like it does at the moment wrt. overriding)

how about:

   <Include-MavenResources>true</Include-MavenResources>

with true as the default (when false then maven resources are not included)

one concern I have with the name is that we might want to stress it's a flag, not a list like Include-Resource - other choices are:

   <Add-MavenResources>true</Add-MavenResources>

   <Combine-MavenResources>true</Combine-MavenResources>

   <Maven-Resources>true</Maven-Resources>

WDYT?  any better names for the flag / opinions on the default :)



> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Commented: (FELIX-343) Add "additional-Resource" option

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

Stuart McCulloch commented on FELIX-343:
----------------------------------------

yes, unfortunately maven resolves the variable ${maven-resources} to null before it gets to the plugin :(

I think using {maven-resources} is the next best option, as it still suggests substitution - the only issue
is that {...} usually means the resources in that path will be filtered by BND (see PeterK's webpage) so
there could be some initial confusion, but nothing that couldn't be covered in the docs...

alternative forms include:   [maven-resources]   or   (maven-resources)

could even use:   %maven-resources%   (ie. windows style)   @maven-resources@   (ie. ant style)

WDYT?

> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>            Assignee: Stuart McCulloch
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Resolved: (FELIX-343) Add "additional-Resource" option

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

Stuart McCulloch resolved FELIX-343.
------------------------------------

    Resolution: Fixed

ok, I've gone with {maven-resources} for the moment, but this is real easy to change

new behaviour:

    if Include-Resource is not set, the bundleplugin sets it to be the list of maven resource paths

    if Include-Resource is set and doesn't contain {maven-resources} then it is passed unchanged
    and a warning explains the default has been overridden, and how to use {maven-resources}

    if Include-Resource is set and contains {maven-resources} then any occurrences of this string
    are replaced with the list of maven resource paths and the combined string is passed to BND


> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>            Assignee: Stuart McCulloch
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Updated: (FELIX-343) Add "additional-Resource" option

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

Carsten Ziegeler updated FELIX-343:
-----------------------------------

    Attachment: patch.txt

> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Commented: (FELIX-343) Add "additional-Resource" option

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

Carsten Ziegeler commented on FELIX-343:
----------------------------------------

Yes, I would prefer adding as well and I think this would make sense as well. The only problem I see is that people who might be familiar with BND see the Include-Resource property and are confused that the value they specify is not exactly what they have entered there - it's a minor problem but still.

Ok, so what about adding this flag and making adding the default?

> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Commented: (FELIX-343) Add "additional-Resource" option

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

Felix Meschberger commented on FELIX-343:
-----------------------------------------

I agree with the proposed flag proposal. But care should be taken to not have maven resolve the variable notation ${maven-resources} into something, which is not expected. Maybe some other notation would be needed.

Anyway, I would like to see such an extension. Thanks.

> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>            Assignee: Stuart McCulloch
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Commented: (FELIX-343) Add "additional-Resource" option

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

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

Looks okay to me. Another benefit of this approach is that it does give you some control over ordering too. If you make this change, update the documentation page, since it covers how default values are handled.

> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>            Assignee: Stuart McCulloch
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Commented: (FELIX-343) Add "additional-Resource" option

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

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

As I said, I would rather see them combined into one, like my example, since it is easier to see the relationship. I am torn on the default, since override seems to be the way Maven does it, but I guess we are breaking from Maven anyway, so it really doesn't matter. However, this is why I like having the flag be part of the Include-Resource value, because it is very clear what is going on.

> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Commented: (FELIX-343) Add "additional-Resource" option

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

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

Generally speaking, BND resource paths and Maven resource paths do not play well with each other. As previously stated in FELIX-261, I think we should be encouraging people that use this plugin to only use BND for including resources. It seems that this option is only useful for people who are using Maven resource paths, since it provides no benefit for people using Include-Resource; thus, it is ultimately encouraging people to use Maven resource paths.

Another way to look at this is that you want to change how the default value of Include-Resource is calculated...it sounds like you want it to always include the standard Maven resource paths and any specified paths are appended to the default value. I am not sure if this is how Maven handles its default values or not. However, as I understand it, the only default value is "src/main/resources" and this seems like a lot of effort to avoid typing 18 characters.


> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Commented: (FELIX-343) Add "additional-Resource" option

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

Stuart McCulloch commented on FELIX-343:
----------------------------------------

it's getting late here, so my plan is to code up a simple patch for the:

   <Include-Resource>${maven-resources},my/resources</Include-Resource>

approach tomorrow morning - any objections if I then went ahead and
committed it, or would people prefer to review the patch beforehand?

> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>            Assignee: Stuart McCulloch
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Closed: (FELIX-343) Add "additional-Resource" option

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

Carsten Ziegeler closed FELIX-343.
----------------------------------


Works for me

> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>            Assignee: Stuart McCulloch
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Work stopped: (FELIX-343) Add "additional-Resource" option

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

Work on FELIX-343 stopped by Stuart McCulloch.

> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>            Assignee: Stuart McCulloch
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Commented: (FELIX-343) Add "additional-Resource" option

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

Stuart McCulloch commented on FELIX-343:
----------------------------------------

my 2 cents:

rather than add yet another resource path property, how about adding a flag that says
whether the Include-Resource path overrides the Maven resource path, or is added to it?

that should cover both use-cases, the only question left is what to use as the default...

( I personally prefer adding as the default, but don't mind if others choose override )

> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Commented: (FELIX-343) Add "additional-Resource" option

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

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

I guess that makes more sense, but it ultimately sounds like a shortcoming of Maven in general, because if you have all of these plugins adding different defaults to the resource paths and at some point you decide to specify your own resource to include, then you will then lose all of the defaults added by these plugins. To really resolve your use-case, bundles should never use Include-Resource and only use additional-Resource so that they always get the default values, otherwise they will have to know all of the defaults of every plugin they use. Include-Resource should only be used if you know for a fact that you want to override every potential default of every plugin you use. Seems sort of sucky.

> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Commented: (FELIX-343) Add "additional-Resource" option

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

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

After this discussion, I guess it is probably okay to just commit it. Perhaps some more people will speak up on this issue during the night.

> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>            Assignee: Stuart McCulloch
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Commented: (FELIX-343) Add "additional-Resource" option

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

Stuart McCulloch commented on FELIX-343:
----------------------------------------

yes, I agree - it looks much clearer with the option inside Include-Resource.

perhaps:

   <Include-Resource>${maven-resources},my/resources</Include-Resource>

would be even clearer, as it shows it's related to maven resource paths?

it is a band-aid, but a useful one as otherwise it's harder to move certain
maven projects over to the bundle process (at least in a standard way...)

> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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


[jira] Commented: (FELIX-343) Add "additional-Resource" option

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

Carsten Ziegeler commented on FELIX-343:
----------------------------------------

If it would be just "src/main/resources" I would agree with you. But any maven plugin can add resource paths during the build, for example the scrplugin generates the service descriptor and adds a path to the generated files to the maven resources. This allows you to use the default value (without specifying the Include-Resource) and frees you from taking care which paths might be added by which plugin.
We have several of these plugins and it gets a little bit annoying to remember all paths and to add them all manually.
While I agree that this is a minor issue, I think the patch doesn't hurt as it does not change the behaviour but just provides more comfort for specific use cases.

> Add "additional-Resource" option
> --------------------------------
>
>                 Key: FELIX-343
>                 URL: https://issues.apache.org/jira/browse/FELIX-343
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven Bundle Plugin
>    Affects Versions: 1.0.0
>            Reporter: Carsten Ziegeler
>         Attachments: patch.txt
>
>
> The "Include-Resource" option is currently a all-or-nothing option which is directly forwarded to bnd. One can either use the default (the maven resource paths) or specify the whole paths oneself. In many cases it is more desirable to just provide additional paths to the default maven paths.
> Therefore I created a patch which adds an "addtional-Resource" property. The logic is as follows:
> - If Include-Resource is specified but no additional-Resource: Include-Resource is forwarded to bnd
> - If Include-Resource is specified and additional-Resource: Include-Resource+','+additionalResource is forwarded to bnd
> - if no Include-Resource is specified and no additional-Resource: maven resource paths are forwarded to bnd
> - if no Include-Resource is specified and additional-Resource is given: maven resource paths + additionalResource are forwarded to bnd.

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