• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: War deploy; maven archetypes problems; web.xml filtering
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: War deploy; maven archetypes problems; web.xml filtering


  • Subject: Re: War deploy; maven archetypes problems; web.xml filtering
  • From: Henrique Prange <email@hidden>
  • Date: Thu, 22 Oct 2009 12:42:46 -0200

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?

Yes, but look at the web.xml <http://web.xml> file .



[1]http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#filteringDeploymentDescriptors

Cheers,

Henrique


<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";>

<!-- 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.

	NOTE: This file is normally included as the template file 'web.xml.template'.
	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>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: War deploy; maven archetypes problems; web.xml filtering
      • From: "Mr. G Brown" <email@hidden>
    • Re: War deploy; maven archetypes problems; web.xml filtering
      • From: Mr.G Brown <email@hidden>
  • Prev by Date: Re: WOSwitchComponent question
  • Next by Date: Re: WOSwitchComponent question
  • Previous by thread: Re: War deploy; maven archetypes problems; web.xml filtering
  • Next by thread: Re: War deploy; maven archetypes problems; web.xml filtering
  • Index(es):
    • Date
    • Thread