You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Nick Arjen <ni...@yahoo.com> on 2009/03/13 11:16:00 UTC

How to package Servicea as WAR with Maven

Hi all ,

I'm new to CXF but I managed  to run my first service (java_first_pojo  sample)  with Maven , but I don't know  how can I package this application as a WAR file  to deploy on a real server like tomcat. ruining default  "maven package " lead in to  a JAR file creation not a  WAR file . Also changing the  POM  <packaging> value doesn't make correct WAR file with required format. 

There is a macrodef  called "cxfwar" available with sample  to  package  with Ant , can some one explain how can I package this application as a WAR file using Maven.. ? 


Thanks ,

nick ,


      

Re: How to package Servicea as WAR with Maven

Posted by amine amine <am...@gmail.com>.
Salam,

I think that you should create a new WAR "maven" project
because the exemple you're talking about is using maven but depend on "ANT"
"read the pom.xml and you'll find it"

so I suggest that you create a new WebApp project using maven archetype

mvn archetype:generate -DgroupId=com.mycompany.webservice.blabla
-DartifactId=AmineEx -DarchetypeArtifactId=maven-archetype-webapp

specify "if not already done"<packaging>WAR</packaging> instead of the
default JARPackaging

reuse your web.xml+beans.xml+HelloWolrd.java+HelloWorldImpl.java.

that's all!

-- 
Tigre et dragon "guardians of paradise"