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 <[email protected]> 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 > >
