If they are files that are not needed in the final package, don't keep them in src/main/resources
On 27 June 2011 09:56, Guillaume Polet <guillaume.po...@gmail.com> wrote: > Ok, sorry about that but I did not see my e-mails coming back to my posting > address so I thought the e-mails had been blacklisted for some reason; I > didn't know that we don't receive the e-mails we send to the ML. > > For the second part, I do want my files within META-INF to be embedded in my > final package. However, the ones that are next to my META-INF directory > should not be included and I was unable to perform this so far. > It just seems that my inclusion pattern is not considered and it embeds > everything anyway although I specifically indicated to embed only > META-INF/**/*. > > Again sorry for the spam, it was never my intent to flood the ML. > > Cheers, > > Guillaume > > Le 27/06/2011 10:50, Stephen Connolly a écrit : >> >> Please stop reposting the same question in a different thread. This is not >> the way to get attention... even just replying to your initial question >> would be better. >> >> Includes are applied first followed by excludes to trim out the stuff you >> added in the includes... >> >> If you don't specify includes, the default is to include everything. >> >> I'm not seeing your problem myself... if you don't want the files to be >> included, then don't put the files in src/main/resources/META-INF in the >> first place >> >> if they are test resources, you should be putting them in >> src/test/resources/META-INF and that way they won't end up in the jar. >> >> if they are required files in META-INF, e.g. META-INF/MANIFEST.MF then >> don't >> create a jar create a zip instead (hint maven assembly plugin) >> >> -Stephen >> >> On 27 June 2011 09:21, Guillaume Polet<macha...@hotmail.com> wrote: >> >>> Hi All, >>> >>> >>> >>> I am working on a project were I would like to exclude all resources >>> >>> except the ones located within META-INF. After reading carefuly the >>> >>> documentation, it appears that excludes always beats includes, so >>> doing >>> >>> what would only be natural, does not work: >>> >>> <build> >>> >>> <resources> >>> >>> <resource> >>> >>> <directory>src/main/resources</directory> >>> >>> <excludes> >>> >>> <exclude>**/*</exclude> >>> >>> </excludes> >>> >>> <includes> >>> >>> <include>META-INF/**/*</include> >>> >>> </includes> >>> >>> </resource> >>> >>> </resources> >>> >>> ... >>> >>> </build> >>> >>> >>> >>> So my second guess was to do the following: >>> >>> >>> >>> <build> >>> >>> <resources> >>> >>> <resource> >>> >>> <directory>src/main/resources</directory> >>> >>> <includes> >>> >>> <include>META-INF/**/*</include> >>> >>> </includes> >>> >>> </resource> >>> >>> </resources> >>> >>> ... >>> >>> </build> >>> >>> >>> >>> but still not what I want because I end up with everything. >>> >>> --> what is the purpose of include patterns, if they embed >>> everything >>> >>> anyway? >>> >>> >>> >>> Is there a way to do what I want without having to use an additional >>> >>> resource directory? >>> >>> >>> >>> My configuration details : >>> >>> Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100) >>> >>> Maven home: D:\apache-maven-3.0.3\bin\.. >>> >>> Java version: 1.6.0_16, vendor: Sun Microsystems Inc. >>> >>> Java home: C:\Program Files\Java\jdk1.6.0_16\jre >>> >>> Default locale: fr_BE, platform encoding: Cp1252 >>> >>> OS name: "windows xp", version: "5.1", arch: "x86", family: >>> "windows" >>> >>> >>> >>> Many thanks, >>> >>> >>> >>> Guillaume >>> >>> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org