>From reading the posts on this forum, it seems everyone uses Maven. So, I'm 
>probably the oddball on this subject, but I don't use it. Instead, I used 
>MyEclipse by Genuitec. If you use their IDE, you don't need to write these 
>build scripts. It might take you a bit to get used to their IDE, but, in the 
>long run, I think you'll find it faster to build projects. You simply right 
>click the project to select MyEclipse --> Add Web Project Capabilities, and it 
>adds all the folders and web.xml stuff you need in your project. When you're 
>ready to deploy it to a server, you just click the "Project Deployment" button 
>and it asks you where you want to deploy it and then it builds your war file 
>and drops it in the webapps folder of Tomcat or wheverever you specified. 

Anyway, that's one option. For $50 a year subscription to it, it has a ton of 
time-saving tools built into it. Check it out.

Ron Grimes



-----Original Message-----
From: Raphael F. [mailto:[email protected]] 
Sent: Tuesday, May 05, 2009 8:26 AM
To: [email protected]
Subject: Easy way for deploying CXF project into webserver with WAR file

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.

Reply via email to