Hi Greg,
I've run the 'mvn clean package' command using Maven 2.2.1. Attached is the resultant
web.xml (created inside target/nowonder/WEB-INF/
web.xml). It looks normal.
What version of Maven are you using? What version of maven-war-plugin? I've tried with maven-war-plugin 2.1-alpha-2 and 2.1-beta-1. Both produced the same result.
Cheers,
Henrique
Mr. G Brown wrote:
Hi Henrique,
I attached a zip of a 2.1 archetype produced no-wonder servlet project.
if you generate the war, and look inside, you will see that the web.xml <
http://web.xml> doesn't get filtered.
And yes, the pom has <filteringDeploymentDescriptors>true</filteringDeploymentDescriptors> in it, but it doesn't seem to work.
Its easy to make you own project of course, but this is what I get with tiger/wo 5.3.3.
Thanks,
Greg
------------------------------------------------------------------------
Hi Greg and Lachlan,
Not in this case. :(
You have to configure the maven-war-plugin to filter deployment descriptors [1].
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
...
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
</configuration>
</plugin>
Isn't the latest servlet archetype adding this configuration by default?
Cheers,
Henrique
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
<!-- This
web.xml file by itself will allow you to run the corresponding
WebObjects application in a Servlet container. If you would like to
merge the WebObjects application with your existing JSP/Servlet
application, you have to merge this
web.xml with your existing
web.xml.
During the build process, the placeholders for WOROOT, LOCALROOT, WOAINSTALLROOT,
WOAppMode, WOClassPath, WOApplicationClass and WOtaglib will be replaced
with the appropriate values. Other parts of the template file may be
customized as required.
NOTE: WEBINFROOT is added to the WOClassPath at build time, but the replacement
value is replaced at runtime to be the path to the WEB-INF directory.
-->
<web-app>
<display-name>nowonder</display-name>
<context-param>
<param-name>WOJarBundle</param-name>
<param-value>YES</param-value>
<description>
Whether this app is a "true" WAR, rather than a "stub" WAR
or SSDD Note that WOROOT, LOCALROOT, WOAINSTALLROOT,
WOClassPath are ignored if this is true However, if this is
true, WOMainBundle must be set to the main bundle name
</description>
</context-param>
<context-param>
<param-name>WOMainBundle</param-name>
<param-value>nowonder</param-value>
<description>
Sets the name of the main bundle. Only used if WOJarBundle
is true
</description>
</context-param>
<!-- Indicates if application is in development or deployment mode. In development
mode, images are vended by the application directly from frameworks. In
deployment mode, images are vended by the webserver. -->
<context-param>
<param-name>WOAppMode</param-name>
<param-value>development</param-value>
</context-param>
<!-- Class name of the WOApplication subclass that defines the
WebObjects application. -->
<context-param>
<param-name>WOApplicationClass</param-name>
<param-value>
war.nowonder.app.Application
</param-value>
</context-param>
<!-- The WebObjects Servlet that interfaces between the Servlet container
world and the WebObjects world. -->
<servlet>
<servlet-name>WOServletAdaptor</servlet-name>
<servlet-class>com.webobjects.jspservlet.WOServletAdaptor</servlet-class>
<load-on-startup>5</load-on-startup>
</servlet>
<!-- URLs starting with 'WebObjects' use the WebObjects Servlet adaptor. -->
<servlet-mapping>
<servlet-name>WOServletAdaptor</servlet-name>
<url-pattern>/WebObjects/*</url-pattern>
</servlet-mapping>
</web-app>