Hi,

the problem is that the files to exclude are not in sr/main/resources but in
src/main/webapp/WEB-INF.
The resource excludes from the build phase do not seem to have any effect
there.
The idea was indeed to have a profile to create a war file that could be
used on our JBoss server instead of the local jetty.
I guess we 'll need to remove it manually from the war file.
I don't see other options.

Kind Regards,



2010/2/4 Karan <karan1...@gmail.com>

> Hi,
>
> I was also facing the same problem,
>
> ended up using different profiles,
>
> <profile>
>             <id>local</id>
>             <activation>
>                 <activeByDefault>true</activeByDefault>
>             </activation>
>             <build>
>                 <resources>
>                     <resource>
>                         <directory>src/main/resources</directory>
>                         <excludes>
>                             <exclude>*.xml</exclude>
>                         </excludes>
>                     </resource>
> <resources>
> ....
>
>
>
>
>
> On 4 February 2010 10:28, Luke Java Developer <
> some.java.develo...@gmail.com> wrote:
>
>> Hello,
>>
>> i am trying to use the maven war plugin version 2.1.beta-1 and performing
>> a configuration like this:
>>
>>       <plugin>
>>         <groupId>org.apache.maven.plugins</groupId>
>>         <artifactId>maven-war-plugin</artifactId>
>>         <version>2.1-beta-1</version>
>>
>>         <configuration>
>>           <webResources>
>>             <resource>
>>               <filtering>true</filtering>
>>               <directory>${basedir}/src/main/webapp/WEB-INF</directory>
>>               <targetPath>WEB-INF</targetPath>
>>               <excludes>
>>                <exclude>**/jetty/**</exclude>
>>                <exclude>**/jetty-web-default.xml</exclude>
>>                <exclude>**/jetty-web-secured.xml</exclude>
>>               </excludes>
>>             </resource>
>>           </webResources>
>>
>>
>>  <filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
>>         </configuration>
>>        </plugin>
>>
>>
>> I want to exclude the jetty files which are under our project folder
>> project/src/main/webapp/WEB-INF.
>> However this does not seem to work. The folder jetty and the two other
>> excluded files that were specified always make it to the final war file.
>> The filtering seems to work fine though.
>>
>> This plugin configuration is part of a root pom, that is extended by my
>> war project. So the actual configuration is not in my project but in the pom
>> of the root that it is extending (so it works for all our projects). I don't
>> know if this changes anything. We are defining all our plugins this way and
>> this works fine. I don't think that is the issue.
>>
>> I also tried to define the excludes as a comma separated list, but then
>> the war plugin fails to run, because it can not convert a String to a List
>> (i don't have the exact message anymore).
>> I tried this because in the code of the AbstractWarMojo I something like
>> this:
>>
>> /**
>>      * The comma separated list of tokens to exclude when copying content
>>      * of the warSourceDirectory.
>>      *
>>      * @parameter alias="excludes"
>>      */
>>     private String warSourceExcludes;
>>
>> But I don't have any experience in plugin development, so I'm probably
>> confusing some things here.
>>
>> How can i get my excludes to work?
>>
>>
>>
>>
>>
>>
>

Reply via email to