Hi.

I've been working with Maven and Struts2 to put together a web
application, and I noticed something odd. With the POM below, I end up
with two copes of tiles-def.xml and struts.xml. One is in
WEB-INF/classes where it needs to be, but the other is at the level
above, in WEB-INF. Have I done something wrong with the POM, or do
<include> elements override <exclude> elements?

<plugin>
        <artifactId>maven-war-plugin</artifactId>
        <executions>
        <execution>
                <id>WarPackaging</id>
                <!-- Defaults to running during package phase; that's
what we want, so let it. -->
                <goals>
                        <goal>${war.goal.type}</goal>
                </goals>
                <configuration>
                        <warName>${project.name}</warName>
        
<webappDirectory>${project.build.directory}\${project.name}</webappDirec
tory>
                        <webResources>
                                <!-- These resources need to go into
WEB-INF -->
                                    <resource>
        
<directory>/src/main/webapp/WEB-INF</directory>
                                        <targetPath>WEB-INF</targetPath>
                                        <filtering>true</filtering>
                                                <includes>
        
<include>*.xml</include>
                                                </includes>
                <!-- These excludes do not seem to have any effect;
these two files still end up in WEB-INF -->
                                                <excludes>
        
<exclude>struts.xml</exclude>
        
<exclude>tiles-def.xml</exclude>
                                                </excludes>
                                    </resource>
                                    <!-- The Struts 2 config files need
to be on the classpath -->
                                    <resource>
        
<directory>/src/main/webapp/WEB-INF</directory>
        
<targetPath>WEB-INF/classes</targetPath>
                                        <filtering>true</filtering>
                                                <includes>
        
<include>struts.xml</include>
        
<include>tiles-def.xml</include>
                                                </includes>
                                    </resource>
                                </webResources>
                        </configuration>
                </execution>
        </executions>
</plugin>

Thanks in advance for taking a look.
~Dan Allen

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as "KBC FP"). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided "as is", 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to