[ 
http://issues.apache.org/jira/browse/FELIXM2-10?page=comments#action_12447692 ] 
            
Richard S. Hall commented on FELIXM2-10:
----------------------------------------

I struggled with the Include-Resource header, thinking that it wasn't needed 
then deciding that it was. The issue is that the plugin will only include what 
you tell it to include. Thus, it doesn't make a difference what Maven does with 
resources, if you haven't included them via the plugin, then they will not be 
included in the resulting JAR file, unless there just happens to be overlap 
between the resources copied by Maven and the packages you have told the plugin 
to include.

Right off the top of my head, I don't see a clean way to integrate these two 
and my advice is not to use Maven resource copying at all with the plugin. The 
issue is that the plugin and Maven just deal with resources differently.

Maven copies the resources to the target/classes/ directory into the 
appropriate place in the hierarchy, but the plugin does not, it just places 
them directly into the JAR file. Thus, any copying that Maven performs is 
largely wasted, unless it is copied into packages that are listed on the 
Export-Package or Private-Package instructions for the plugin...in this case, 
then the plugin will see the copied resources and copy them too.


> maven-bundle-plugin: Failures if src or parts of it are missing
> ---------------------------------------------------------------
>
>                 Key: FELIXM2-10
>                 URL: http://issues.apache.org/jira/browse/FELIXM2-10
>             Project: Felix M2 Plugin
>          Issue Type: Bug
>            Reporter: Felix Meschberger
>         Assigned To: Timothy Bennett
>         Attachments: FELIXM2-10.diff
>
>
> When using the maven-bundle-plugin to build bundles from existing jar files, 
> three issues exist:
>    * If nothing is copied into the project output directory (target/classes), 
> the folder does not exist and the BundlePlugin.getClassPath fails for the 
> line "new Jar(".", outputDirectory)"
>    * If no resources exist, an exception is logged for the missing 
> src/main/resources folder. I suggest to only place a default 
> Include-Resources header if the src/main/resources folder exists.
>    * If no maven build phase generates output the target folder does not 
> exist at the time the BundlePluing.execute method tries to write the JAR File.
> I will attach a patch for the three issues.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to