Hello all,
I'd like to launch my CXF based application into a web server (Tomcat
for instance, or any other if needed) just by moving a WAR file into
webapps directory and deploying with server's manager, so that a user
of my app can deploy it without Maven or else dev tool. I have
generated a WAR file from my application which I usually deploy with
maven command (after having used "mvn install" command) :
mvn -Pserver
The "mvn war:war" command has generated a WAR file with all classes
and libraries used, but it contains a /WEB-INF/web.xml file with
following :
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<display-name>Archetype Created Web Application</display-name>
</web-app>
A /META-INF/MANIFEST.MF file :
Manifest-Version: 1.0
Created-By: Apache Maven
Built-By: rflores
Build-Jdk: 1.6.0_0
A /META-INF/application.xml file :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>ProticPortWeb</display-name>
</application>
etc.
I never have used a WAR file in order to deploy an application on a
web server so I'm not really well-skilled with this technology, but I
expect it should provoke some problems with the used of Jetty light
server (actually implemented in a Server.java class like the example
"restul_http_binding" shows). So I have few questions :
- If I want to use a HTTP server to easily deploy my app by moving the
WAR in /webapps's Tomcat like directory, it seems that I have to
configure the WAR with one ore several XML files (what file,
MANIFEST.MF ? Application.xml ? web.xml ? Each one ?) instead of using
Server.java class like example above (class which I would remove I
think ?), so that the HTTP server knows the services to deploy, am I
true ?
- If I'm wrong, does Jetty server can be launched as this by the other
web server without removing the Server.java class ?
- A Maven oriented question (I should post it on Maven's user list I
think) : Maven WAR plugin can generate a WAR file from maven project,
but deploying files (the ones I have shown above) do not contain
information about deployment for the server, does Maven can generate
it from adding information into pom.xml ?
Does one of you knows an easy way to deploy my app without Maven
commands ? Thanks.
--
Raphaƫl F.