Cargo Jetty should support external jetty-env.xml file

Description

By default, Jetty looks for a jetty-env.xml file in the WEB-INF directory of a web-app. However, for web application wishing to externalize their JNDI configuration, this file can (and should) by placed outside the WAR file. This file can be supplied as a command line argument when starting Jetty with start.jar. As an alternative, this file can be supplied to the Maven jetty plugin using the <jettyEnvXML> tag.

For what it is worth this tag is implemented by using the "setJettyEnvXml" method on the Jetty API class EnvConfiguration in the org.mortbay.jetty.plus.webapp package. I think approach could be used to set the jetty-env.xml location via the API, but a property is needed to supply the location of the file.

Alternatively, if the container has a configuration file specified with the name "jetty-env.xml" perhaps Cargo could detect this and hand the file location to Jetty.

Either way, it would be a great benefit for those Jetty web application wishing to externalize JNDI configuration. I do not know of any work-around.

Status

Assignee

Savas Ali Tokmen

Reporter

David H Vree

Components

Fix versions

Affects versions

1.0.3

Priority

Major