[ https://jira.codehaus.org/browse/MJAR-169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joel Costigliola updated MJAR-169: ---------------------------------- Description: I can't get exclude to work, it is maybe my fault but I can't figure out what's wrong. I'm trying to exclude from the jar to build a zip file and a directory that are copied into target/classes for integration tests. plugin configuration {code:xml} <plugin> <artifactId>maven-jar-plugin</artifactId> <configuration> <excludes> <exclude>${project.build.outputDirectory}/webintlab-server-${project.version}-archive.zip</exclude> <exclude>${project.build.outputDirectory}/webintlab-server-${project.version}</exclude> </excludes> </configuration> </plugin> {code} effective pom extract : {code:xml} <plugin> <artifactId>maven-jar-plugin</artifactId> <version>2.4</version> <executions> <execution> <id>default-jar</id> <phase>package</phase> <goals> <goal>jar</goal> </goals> <configuration> <excludes> <exclude>C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes/webintlab-server-3.5-SNAPSHOT-archive.zip</exclude> <exclude>C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes/webintlab-server-3.5-SNAPSHOT</exclude> </excludes> </configuration> </execution> </executions> <configuration> <excludes> <exclude>C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes/webintlab-server-3.5-SNAPSHOT-archive.zip</exclude> <exclude>C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes/webintlab-server-3.5-SNAPSHOT</exclude> </excludes> </configuration> </plugin> {code} In following output extract, *directory webintlab-server-3.5-SNAPSHOT/ is added whereas plugin was configured to exclude it*. {noformat} [DEBUG] Configuring mojo org.apache.maven.plugins:maven-jar-plugin:2.4:jar from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-jar-plugin:2.4, parent: sun.misc.Launcher$AppClassLoader@6140c973] [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-jar-plugin:2.4:jar' with basic configurator --> [DEBUG] (f) classesDirectory = C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes [DEBUG] (f) defaultManifestFile = C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes\META-INF\MANIFEST.MF [DEBUG] (f) excludes = [C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes/webintlab-server-3.5-SNAPSHOT-archive.zip, C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes/webintlab-server-3.5-SNAPSHOT] [DEBUG] (f) finalName = webintlab-functional-tests-3.5-SNAPSHOT [DEBUG] (f) forceCreation = false [DEBUG] (f) outputDirectory = C:\Users\Joel\git\osintlab\webintlab-functional-tests\target [DEBUG] (f) project = MavenProject: webintlab-functional-tests:webintlab-functional-tests:3.5-SNAPSHOT @ C:\Users\Joel\git\osintlab\webintlab-functional-tests\pom.xml [DEBUG] (f) session = org.apache.maven.execution.MavenSession@41878a17 [DEBUG] (f) skipIfEmpty = false [DEBUG] (f) useDefaultManifestFile = false [DEBUG] -- end configuration -- [DEBUG] isUp2date: false (Resource with newer modification date found.) [INFO] Building jar: C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\webintlab-functional-tests-3.5-SNAPSHOT.jar [DEBUG] adding directory META-INF/ [DEBUG] adding entry META-INF/MANIFEST.MF [DEBUG] adding directory webintlab-server-3.5-SNAPSHOT/ [DEBUG] adding directory webintlab-server-3.5-SNAPSHOT/apache-activemq-5.8.0/ [DEBUG] adding directory webintlab-server-3.5-SNAPSHOT/apache-activemq-5.8.0/bin/ [DEBUG] adding directory webintlab-server-3.5-SNAPSHOT/apache-activemq-5.8.0/bin/win32 {noformat} I have tried configuring exclude section with relative path but the same behavior occured. was: I can't get exclude to work, it is maybe my fault but I can't figure out what's wrong. I'm trying to exclude from the jar to build a zip file and a directory that are copied into target/classes for integration tests. plugin configuration {code:xml} <plugin> <artifactId>maven-jar-plugin</artifactId> <configuration> <excludes> <exclude>${project.build.outputDirectory}/webintlab-server-${project.version}-archive.zip</exclude> <exclude>${project.build.outputDirectory}/webintlab-server-${project.version}</exclude> </excludes> </configuration> </plugin> {code} effective pom extract : {code:xml} <plugin> <artifactId>maven-jar-plugin</artifactId> <version>2.4</version> <executions> <execution> <id>default-jar</id> <phase>package</phase> <goals> <goal>jar</goal> </goals> <configuration> <excludes> <exclude>C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes/webintlab-server-3.5-SNAPSHOT-archive.zip</exclude> <exclude>C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes/webintlab-server-3.5-SNAPSHOT</exclude> </excludes> </configuration> </execution> </executions> <configuration> <excludes> <exclude>C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes/webintlab-server-3.5-SNAPSHOT-archive.zip</exclude> <exclude>C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes/webintlab-server-3.5-SNAPSHOT</exclude> </excludes> </configuration> </plugin> {code} In following output extract, *directory webintlab-server-3.5-SNAPSHOT/ is added whereas plugin was configured to exclude it*. I have tried relative path too, with same behavior. {noformat} [DEBUG] Configuring mojo org.apache.maven.plugins:maven-jar-plugin:2.4:jar from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-jar-plugin:2.4, parent: sun.misc.Launcher$AppClassLoader@6140c973] [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-jar-plugin:2.4:jar' with basic configurator --> [DEBUG] (f) classesDirectory = C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes [DEBUG] (f) defaultManifestFile = C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes\META-INF\MANIFEST.MF [DEBUG] (f) excludes = [C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes/webintlab-server-3.5-SNAPSHOT-archive.zip, C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes/webintlab-server-3.5-SNAPSHOT] [DEBUG] (f) finalName = webintlab-functional-tests-3.5-SNAPSHOT [DEBUG] (f) forceCreation = false [DEBUG] (f) outputDirectory = C:\Users\Joel\git\osintlab\webintlab-functional-tests\target [DEBUG] (f) project = MavenProject: webintlab-functional-tests:webintlab-functional-tests:3.5-SNAPSHOT @ C:\Users\Joel\git\osintlab\webintlab-functional-tests\pom.xml [DEBUG] (f) session = org.apache.maven.execution.MavenSession@41878a17 [DEBUG] (f) skipIfEmpty = false [DEBUG] (f) useDefaultManifestFile = false [DEBUG] -- end configuration -- [DEBUG] isUp2date: false (Resource with newer modification date found.) [INFO] Building jar: C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\webintlab-functional-tests-3.5-SNAPSHOT.jar [DEBUG] adding directory META-INF/ [DEBUG] adding entry META-INF/MANIFEST.MF [DEBUG] adding directory webintlab-server-3.5-SNAPSHOT/ [DEBUG] adding directory webintlab-server-3.5-SNAPSHOT/apache-activemq-5.8.0/ [DEBUG] adding directory webintlab-server-3.5-SNAPSHOT/apache-activemq-5.8.0/bin/ [DEBUG] adding directory webintlab-server-3.5-SNAPSHOT/apache-activemq-5.8.0/bin/win32 {noformat} > exclude settings don't seem to be taken into account > ---------------------------------------------------- > > Key: MJAR-169 > URL: https://jira.codehaus.org/browse/MJAR-169 > Project: Maven JAR Plugin > Issue Type: Bug > Affects Versions: 2.4 > Environment: Apache Maven 3.0.5 > (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 14:51:28+0100) > Maven home: C:\apache-maven-3.0.5 > Java version: 1.7.0_15, vendor: Oracle Corporation > Java home: C:\Program Files\Java\jdk1.7.0_15\jre > Default locale: fr_FR, platform encoding: UTF-8 > OS name: "windows 8", version: "6.2", arch: "amd64", family: "windows" > Reporter: Joel Costigliola > > I can't get exclude to work, it is maybe my fault but I can't figure out > what's wrong. > I'm trying to exclude from the jar to build a zip file and a directory that > are copied into target/classes for integration tests. > plugin configuration > {code:xml} > <plugin> > <artifactId>maven-jar-plugin</artifactId> > <configuration> > <excludes> > > <exclude>${project.build.outputDirectory}/webintlab-server-${project.version}-archive.zip</exclude> > > <exclude>${project.build.outputDirectory}/webintlab-server-${project.version}</exclude> > </excludes> > </configuration> > </plugin> > {code} > effective pom extract : > {code:xml} > <plugin> > <artifactId>maven-jar-plugin</artifactId> > <version>2.4</version> > <executions> > <execution> > <id>default-jar</id> > <phase>package</phase> > <goals> > <goal>jar</goal> > </goals> > <configuration> > <excludes> > > <exclude>C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes/webintlab-server-3.5-SNAPSHOT-archive.zip</exclude> > > <exclude>C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes/webintlab-server-3.5-SNAPSHOT</exclude> > </excludes> > </configuration> > </execution> > </executions> > <configuration> > <excludes> > > <exclude>C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes/webintlab-server-3.5-SNAPSHOT-archive.zip</exclude> > > <exclude>C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes/webintlab-server-3.5-SNAPSHOT</exclude> > </excludes> > </configuration> > </plugin> > {code} > In following output extract, *directory webintlab-server-3.5-SNAPSHOT/ is > added whereas plugin was configured to exclude it*. > {noformat} > [DEBUG] Configuring mojo org.apache.maven.plugins:maven-jar-plugin:2.4:jar > from plugin realm > ClassRealm[plugin>org.apache.maven.plugins:maven-jar-plugin:2.4, parent: > sun.misc.Launcher$AppClassLoader@6140c973] > [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-jar-plugin:2.4:jar' > with basic configurator --> > [DEBUG] (f) classesDirectory = > C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes > [DEBUG] (f) defaultManifestFile = > C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes\META-INF\MANIFEST.MF > [DEBUG] (f) excludes = > [C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes/webintlab-server-3.5-SNAPSHOT-archive.zip, > > C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\classes/webintlab-server-3.5-SNAPSHOT] > [DEBUG] (f) finalName = webintlab-functional-tests-3.5-SNAPSHOT > [DEBUG] (f) forceCreation = false > [DEBUG] (f) outputDirectory = > C:\Users\Joel\git\osintlab\webintlab-functional-tests\target > [DEBUG] (f) project = MavenProject: > webintlab-functional-tests:webintlab-functional-tests:3.5-SNAPSHOT @ > C:\Users\Joel\git\osintlab\webintlab-functional-tests\pom.xml > [DEBUG] (f) session = org.apache.maven.execution.MavenSession@41878a17 > [DEBUG] (f) skipIfEmpty = false > [DEBUG] (f) useDefaultManifestFile = false > [DEBUG] -- end configuration -- > [DEBUG] isUp2date: false (Resource with newer modification date found.) > [INFO] Building jar: > C:\Users\Joel\git\osintlab\webintlab-functional-tests\target\webintlab-functional-tests-3.5-SNAPSHOT.jar > [DEBUG] adding directory META-INF/ > [DEBUG] adding entry META-INF/MANIFEST.MF > [DEBUG] adding directory webintlab-server-3.5-SNAPSHOT/ > [DEBUG] adding directory webintlab-server-3.5-SNAPSHOT/apache-activemq-5.8.0/ > [DEBUG] adding directory > webintlab-server-3.5-SNAPSHOT/apache-activemq-5.8.0/bin/ > [DEBUG] adding directory > webintlab-server-3.5-SNAPSHOT/apache-activemq-5.8.0/bin/win32 > {noformat} > I have tried configuring exclude section with relative path but the same > behavior occured. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira