You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Pierre Bourret (JIRA)" <ji...@apache.org> on 2010/01/13 16:18:54 UTC

[jira] Created: (FELIX-1985) Whitespace sensitivity in the Include-Resource instruction.

Whitespace sensitivity in the Include-Resource instruction.
-----------------------------------------------------------

                 Key: FELIX-1985
                 URL: https://issues.apache.org/jira/browse/FELIX-1985
             Project: Felix
          Issue Type: Bug
          Components: Maven Bundle Plugin
    Affects Versions: maven-bundle-plugin-2.0.1
         Environment: Linux quartz 2.6.31-17-generic #54-Ubuntu SMP Thu Dec 10 17:01:44 UTC 2009 x86_64 GNU/Linux
            Reporter: Pierre Bourret
            Priority: Minor


With the following maven-bundle-plugin configuration :
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.0.1</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            ...
            <Include-Resource>
              {maven-resources},
              META-INF/LICENSE=LICENSE,
              META-INF/NOTICE=NOTICE
            </Include-Resource>
          </instructions>
        </configuration>
      </plugin>

I get these errors :
    [ERROR] Error building bundle org.ow2.chameleon.handies:org.ow2.chameleon.handies.ipojo-tccl-handler:bundle:0.0.1-SNAPSHOT : Input file does not exist: LICENSE~
    [ERROR] Error building bundle org.ow2.chameleon.handies:org.ow2.chameleon.handies.ipojo-tccl-handler:bundle:0.0.1-SNAPSHOT : Input file does not exist: NOTICE~
    [ERROR] Error(s) found in bundle configuration
(Note the trailing '~' at the end of the real file names)

But when I insert whitespaces around the '=' symbol (either before or after it), it works : neither error nor warning.

            <Include-Resource>
              {maven-resources},
              META-INF/LICENSE =LICENSE,
              META-INF/NOTICE= NOTICE
            </Include-Resource>

   [INFO] BUILD SUCCESSFUL

The first configuration (the one without spaces around '=') works with the 1.4.3 version of the maven-bundle-plugin.

Is this a regression ? Or maybe the syntax of the Include-Resource instruction has changed since the 1.4.3 version (may it affect other instruction too ?).

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


[jira] Commented: (FELIX-1985) Whitespace sensitivity in the Include-Resource instruction.

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

Stuart McCulloch commented on FELIX-1985:
-----------------------------------------

The trailing '~' is typically seen with duplicate entries - a recent change in how the Bnd Tool processes the instructions meant duplicate clauses are tagged with '~' which then leads to failures finding the named resource because the original path doesn't have '~'. Note that this is part of the general purpose Bnd instruction processing that was added to support merging of clauses and just has an unfortunate side effect when Include-Resource contains duplicate entries (something that only happens when Include-Resource is generated).

This was fixed for Include-Resource in FELIX-1262 which is in 2.0.1...

   http://issues.apache.org/jira/browse/FELIX-1262?focusedCommentId=12730288&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_12730288

but perhaps this fix missed a corner case involving {maven-resources} ... if this expands to also contain entries for META-INF/LICENSE etc. then you would have duplicate entries and they'd be tagged with '~' (the fix is supposed to filter out these duplicate entries before they reach the Bnd Tool). Adding spaces to the clause probably makes them different enough from the generated entries which explains why you don't see the error.



> Whitespace sensitivity in the Include-Resource instruction.
> -----------------------------------------------------------
>
>                 Key: FELIX-1985
>                 URL: https://issues.apache.org/jira/browse/FELIX-1985
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.0.1
>         Environment: Linux quartz 2.6.31-17-generic #54-Ubuntu SMP Thu Dec 10 17:01:44 UTC 2009 x86_64 GNU/Linux
>            Reporter: Pierre Bourret
>            Priority: Minor
>
> With the following maven-bundle-plugin configuration :
>       <plugin>
>         <groupId>org.apache.felix</groupId>
>         <artifactId>maven-bundle-plugin</artifactId>
>         <version>2.0.1</version>
>         <extensions>true</extensions>
>         <configuration>
>           <instructions>
>             ...
>             <Include-Resource>
>               {maven-resources},
>               META-INF/LICENSE=LICENSE,
>               META-INF/NOTICE=NOTICE
>             </Include-Resource>
>           </instructions>
>         </configuration>
>       </plugin>
> I get these errors :
>     [ERROR] Error building bundle org.ow2.chameleon.handies:org.ow2.chameleon.handies.ipojo-tccl-handler:bundle:0.0.1-SNAPSHOT : Input file does not exist: LICENSE~
>     [ERROR] Error building bundle org.ow2.chameleon.handies:org.ow2.chameleon.handies.ipojo-tccl-handler:bundle:0.0.1-SNAPSHOT : Input file does not exist: NOTICE~
>     [ERROR] Error(s) found in bundle configuration
> (Note the trailing '~' at the end of the real file names)
> But when I insert whitespaces around the '=' symbol (either before or after it), it works : neither error nor warning.
>             <Include-Resource>
>               {maven-resources},
>               META-INF/LICENSE =LICENSE,
>               META-INF/NOTICE= NOTICE
>             </Include-Resource>
>    [INFO] BUILD SUCCESSFUL
> The first configuration (the one without spaces around '=') works with the 1.4.3 version of the maven-bundle-plugin.
> Is this a regression ? Or maybe the syntax of the Include-Resource instruction has changed since the 1.4.3 version (may it affect other instruction too ?).

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


[jira] Commented: (FELIX-1985) Whitespace sensitivity in the Include-Resource instruction.

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

Stuart McCulloch commented on FELIX-1985:
-----------------------------------------

Well, we could also be more robust in the plugin and remove the duplicates - so feel free to leave it open and I'll fix it for the next release.

> Whitespace sensitivity in the Include-Resource instruction.
> -----------------------------------------------------------
>
>                 Key: FELIX-1985
>                 URL: https://issues.apache.org/jira/browse/FELIX-1985
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.0.1
>         Environment: Linux quartz 2.6.31-17-generic #54-Ubuntu SMP Thu Dec 10 17:01:44 UTC 2009 x86_64 GNU/Linux
>            Reporter: Pierre Bourret
>            Priority: Minor
>
> With the following maven-bundle-plugin configuration :
>       <plugin>
>         <groupId>org.apache.felix</groupId>
>         <artifactId>maven-bundle-plugin</artifactId>
>         <version>2.0.1</version>
>         <extensions>true</extensions>
>         <configuration>
>           <instructions>
>             ...
>             <Include-Resource>
>               {maven-resources},
>               META-INF/LICENSE=LICENSE,
>               META-INF/NOTICE=NOTICE
>             </Include-Resource>
>           </instructions>
>         </configuration>
>       </plugin>
> I get these errors :
>     [ERROR] Error building bundle org.ow2.chameleon.handies:org.ow2.chameleon.handies.ipojo-tccl-handler:bundle:0.0.1-SNAPSHOT : Input file does not exist: LICENSE~
>     [ERROR] Error building bundle org.ow2.chameleon.handies:org.ow2.chameleon.handies.ipojo-tccl-handler:bundle:0.0.1-SNAPSHOT : Input file does not exist: NOTICE~
>     [ERROR] Error(s) found in bundle configuration
> (Note the trailing '~' at the end of the real file names)
> But when I insert whitespaces around the '=' symbol (either before or after it), it works : neither error nor warning.
>             <Include-Resource>
>               {maven-resources},
>               META-INF/LICENSE =LICENSE,
>               META-INF/NOTICE= NOTICE
>             </Include-Resource>
>    [INFO] BUILD SUCCESSFUL
> The first configuration (the one without spaces around '=') works with the 1.4.3 version of the maven-bundle-plugin.
> Is this a regression ? Or maybe the syntax of the Include-Resource instruction has changed since the 1.4.3 version (may it affect other instruction too ?).

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


[jira] Commented: (FELIX-1985) Whitespace sensitivity in the Include-Resource instruction.

Posted by "Pierre Bourret (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12799806#action_12799806 ] 

Pierre Bourret commented on FELIX-1985:
---------------------------------------

First, thanks for reacting so fast !

I have run maven with the -X flag and have noticed that the LICENSE and NOTICE files are included twice. After checking again the pom hierarchy, I've found that the parent pom of my project already contains <resource> instructions to add LICENSE and NOTICE in the project resources. So the entries in the bundle-plugin configuration are redundant. You're right !

It was my fault... Sorry to report a non-issue. I'm going to close this immediately...

> Whitespace sensitivity in the Include-Resource instruction.
> -----------------------------------------------------------
>
>                 Key: FELIX-1985
>                 URL: https://issues.apache.org/jira/browse/FELIX-1985
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.0.1
>         Environment: Linux quartz 2.6.31-17-generic #54-Ubuntu SMP Thu Dec 10 17:01:44 UTC 2009 x86_64 GNU/Linux
>            Reporter: Pierre Bourret
>            Priority: Minor
>
> With the following maven-bundle-plugin configuration :
>       <plugin>
>         <groupId>org.apache.felix</groupId>
>         <artifactId>maven-bundle-plugin</artifactId>
>         <version>2.0.1</version>
>         <extensions>true</extensions>
>         <configuration>
>           <instructions>
>             ...
>             <Include-Resource>
>               {maven-resources},
>               META-INF/LICENSE=LICENSE,
>               META-INF/NOTICE=NOTICE
>             </Include-Resource>
>           </instructions>
>         </configuration>
>       </plugin>
> I get these errors :
>     [ERROR] Error building bundle org.ow2.chameleon.handies:org.ow2.chameleon.handies.ipojo-tccl-handler:bundle:0.0.1-SNAPSHOT : Input file does not exist: LICENSE~
>     [ERROR] Error building bundle org.ow2.chameleon.handies:org.ow2.chameleon.handies.ipojo-tccl-handler:bundle:0.0.1-SNAPSHOT : Input file does not exist: NOTICE~
>     [ERROR] Error(s) found in bundle configuration
> (Note the trailing '~' at the end of the real file names)
> But when I insert whitespaces around the '=' symbol (either before or after it), it works : neither error nor warning.
>             <Include-Resource>
>               {maven-resources},
>               META-INF/LICENSE =LICENSE,
>               META-INF/NOTICE= NOTICE
>             </Include-Resource>
>    [INFO] BUILD SUCCESSFUL
> The first configuration (the one without spaces around '=') works with the 1.4.3 version of the maven-bundle-plugin.
> Is this a regression ? Or maybe the syntax of the Include-Resource instruction has changed since the 1.4.3 version (may it affect other instruction too ?).

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


[jira] Commented: (FELIX-1985) Whitespace sensitivity in the Include-Resource instruction.

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

Stuart McCulloch commented on FELIX-1985:
-----------------------------------------

If you run with "mvn -X" you'll get a load of debug (pipe it to a file) including the exact instructions the bundleplugin passes on to the Bnd Tool (ie. after processing) which you can check to see if it does contain any duplicate Include-Resource clauses.

> Whitespace sensitivity in the Include-Resource instruction.
> -----------------------------------------------------------
>
>                 Key: FELIX-1985
>                 URL: https://issues.apache.org/jira/browse/FELIX-1985
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.0.1
>         Environment: Linux quartz 2.6.31-17-generic #54-Ubuntu SMP Thu Dec 10 17:01:44 UTC 2009 x86_64 GNU/Linux
>            Reporter: Pierre Bourret
>            Priority: Minor
>
> With the following maven-bundle-plugin configuration :
>       <plugin>
>         <groupId>org.apache.felix</groupId>
>         <artifactId>maven-bundle-plugin</artifactId>
>         <version>2.0.1</version>
>         <extensions>true</extensions>
>         <configuration>
>           <instructions>
>             ...
>             <Include-Resource>
>               {maven-resources},
>               META-INF/LICENSE=LICENSE,
>               META-INF/NOTICE=NOTICE
>             </Include-Resource>
>           </instructions>
>         </configuration>
>       </plugin>
> I get these errors :
>     [ERROR] Error building bundle org.ow2.chameleon.handies:org.ow2.chameleon.handies.ipojo-tccl-handler:bundle:0.0.1-SNAPSHOT : Input file does not exist: LICENSE~
>     [ERROR] Error building bundle org.ow2.chameleon.handies:org.ow2.chameleon.handies.ipojo-tccl-handler:bundle:0.0.1-SNAPSHOT : Input file does not exist: NOTICE~
>     [ERROR] Error(s) found in bundle configuration
> (Note the trailing '~' at the end of the real file names)
> But when I insert whitespaces around the '=' symbol (either before or after it), it works : neither error nor warning.
>             <Include-Resource>
>               {maven-resources},
>               META-INF/LICENSE =LICENSE,
>               META-INF/NOTICE= NOTICE
>             </Include-Resource>
>    [INFO] BUILD SUCCESSFUL
> The first configuration (the one without spaces around '=') works with the 1.4.3 version of the maven-bundle-plugin.
> Is this a regression ? Or maybe the syntax of the Include-Resource instruction has changed since the 1.4.3 version (may it affect other instruction too ?).

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