<build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <webResources>
            <resource>
              <!-- exclude all resources -->
              <excludes>
                <exclude>**/*.*</exclude>
              </excludes>
            </resource>
          </webResources>
        </configuration>
http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html
does this not work for you?
Martin Gainty 
______________________________________________ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.


> From: [email protected]
> To: [email protected]
> Date: Wed, 6 Jul 2011 06:46:41 -0500
> Subject: RE: Skip Resources for War
> 
> Yeah.
> 
> 
> 
> I tried using:
> 
>             <resources>
> 
>                         <resource>
> 
>                         <directory>src/main/resources</directory>
> 
>                         <filtering>false</filtering>
> 
>                                     <excludes>
> 
>                                                 <exclude>**/*.*</exclude>
> 
>                                     </excludes>
> 
>                         </resource>
> 
> Under build tag. It does avoid copying files into target/classes directory, 
> however built War file does have them under WEB-INF/classes.
> 
> 
> 
> Using:
> 
> 
> 
> <webResources>
> 
>      <resource>
> 
>                   <directory>${basedir}/src/main/resources</directory>
> 
>                   <excludes>
> 
>                          <exclude>**/*.*</exclude>
> 
>                   </excludes>
> 
>                 </resource>
> 
>   </webResources>
> 
> 
> 
> Inside War plug-in configuration  doesn't help either.
> 
> 
> 
> Any suggestions?
> 
> 
> 
> 
> 
> Regards,
> 
> Yuvaraj
> 
> 
> 
> Yuvaraj Vanarase,
> 
> Lead Technology - Software
> 
> Phone: +91.20.40262000 Ext 2305|Mobile: +91.9850818870 | 
> http://www.synechron.com
> 
> SYNECHRON -
> 
> - Top 10 Best IT Employers for 4 consecutive years (link).
> 
> - Celebrating 10 Years!
> 
> 
> 
> -----Original Message-----
> From: Antonio Petrelli [mailto:[email protected]]
> Sent: Wednesday, July 06, 2011 3:26 PM
> To: Maven Users List
> Subject: Re: Skip Resources for War
> 
> 
> 
> 2011/7/6 Yuvaraj Vanarase <[email protected]>
> 
> 
> 
> > I have few XML files under src/main/resources. The project packging is War.
> 
> > I would like to avoid these files getting into War file.  I could exclude
> 
> > them from being part of target/classes by using resources & exclude inside
> 
> > build tag.
> 
> > Any clue how to skip them for war?
> 
> >
> 
> 
> 
> Resources in src/main/resources will be put in WEB-INF/classes and they can
> 
> be excluded like you did for Jar-packaged projects.
> 
> Did you try it? Didn't it work?
> 
> 
> 
> Antonio
                                          

Reply via email to