Felix maven package plugin issue with Include-Resource statement

Problem: I create files under the target / tempo that I want to include in the final wab of the package that goes into the package phase. Here is the code snippet I'm using:

<_wab>src/main/webapp</_wab> <Include-Resource> {maven-resources},        src/main/webapp/destination=target/temp </Include-Resource> 

I would like the directories created under target / temp to be included in the destination directory structure. However, the above syntax does not include files under temp anywhere. But maven resources fall into the root location of wab.

Documentation on this page: http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html in the <Include-Resource> section. It says: "If a specific resource should be placed in a subdirectory of the jar package, use the destination form, where the first path is the destination path (including the file name if the resource is a file) and the second path is the resource to copy."

I checked and the required directories are created under target / temp before the package phase, which uses the maven-bundle-plugin. Is there something I'm missing?

I would really appreciate any help on this issue.

+4
source share
1 answer

I suppose you mean that your target path will be without src / main / webapp, because it is โ€œrelative to the root of the resulting package JAR fileโ€ and your copy resource may work better with a slash to indicate the directory for it - try if this is better for you:

 <Include-Resource>{maven-resources},destination/=target/temp/</Include-Resource> 

I have NOT tried this, but FYI works for me the following, although this is for two specific files (whereas you need a directory):

 <Include-Resource>{maven-resources},META-INF/git.properties=target/classes/META-INF/git.properties,target/classes/LICENSE</Include-Resource> 
0
source

All Articles