[
https://issues.apache.org/jira/browse/MJAR-101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17957185#comment-17957185
]
Matthias Bünger commented on MJAR-101:
--------------------------------------
This project has moved from Jira to GitHub Issues. This issue was migrated to
[apache/maven-jar-plugin#278|https://github.com/apache/maven-jar-plugin/issues/278].
> excluding files from jar doesn't work completely well
> -----------------------------------------------------
>
> Key: MJAR-101
> URL: https://issues.apache.org/jira/browse/MJAR-101
> Project: Maven JAR Plugin (Moved to GitHub Issues)
> Issue Type: Bug
> Affects Versions: 2.2
> Environment: Windows XP, JDK 1.5
> Reporter: Patrizio Munzi
> Priority: Major
> 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 was sent by Atlassian Jira
(v8.20.10#820010)