[
http://jira.codehaus.org/browse/MJAR-101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=131859#action_131859
]
Patrizio Munzi commented on MJAR-101:
-------------------------------------
{quote}
If you want to exclude entire directories, simply tell the plugin:
{code:xml}
<excludes>
<exclude>**/*.properties</exclude>
<exclude>xml/**</exclude>
</excludes>
{code}
will exclude the directory "xml" and all files underneath it.
{quote}
It works for me.
Issue closed
> excluding files from jar doesn't work completely well
> -----------------------------------------------------
>
> Key: MJAR-101
> URL: http://jira.codehaus.org/browse/MJAR-101
> Project: Maven 2.x Jar Plugin
> Issue Type: Bug
> Affects Versions: 2.2
> Environment: Windows XP, JDK 1.5
> Reporter: Patrizio Munzi
> Fix For: 2.2
>
> Attachments: mavenjarplugin.bug.tar.gz
>
>
> Maven Jar Plugin exclude feature seems not to work completely well.
> It actually excludes the specified files from the built jar but creates
> however the folders path into it.
> Here's my configuration:
> {code:xml}
> <excludes>
> <exclude>**/*.properties</exclude>
> <exclude>**/*.xml</exclude>
> <exclude>**/*.xsd</exclude>
> </excludes>
> {code}
> Although all the specified files are actually excluded from the deployed
> jar, the directory paths of the excluded files are still created into
> the jar.
> I mean, if I have the following files under the resources directory:
> resources/log4j.properties
> resources/xml/file.xml
> resources/xml/schema/schema.xsd
> These files won't be included in the built jar, but I'll still have the
> following path into it:
> /xml/schema/
> Find attached a simple project test case to reproduce the problem.
> - Extract it
> - Change to the main dir
> - run: mvn compile
> - run: mvn jar:jar
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira