> -----Original Message-----
> From: KARR, DAVID (ATTSI)
> Sent: Friday, November 19, 2010 9:59 AM
> To: [email protected]
> Subject: Head start with relatively simple EAR/WAR project?
> 
> I'm trying to convert a project built with Ant to Maven.  It uses CXF
> and Spring, and it builds a WAR and EAR.  My first attempt is having
> problems, probably because I'm missing some basic elements.
> 
> I've constructed the first draft of the POM, but when I run "mvn", it
> didn't appear to compile my Java sources, and the EAR it constructed
(I
> suppose I should feel fortunate that I got an EAR at all) put the jar
> dependencies in the root of the EAR.  I suppose that last issue is
> because I haven't defined "module" elements.
> 
> My Java source is in "src/main/java".
> 
> Here's my POM so far:
> ---------------------------
> <project xmlns="http://maven.apache.org/POM/4.0.0";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>MyApp</groupId>
>   <artifactId>MyApp</artifactId>
>   <version>0.0.1-SNAPSHOT</version>
>   <packaging>ear</packaging>
>   <build>
>       <defaultGoal>install</defaultGoal>
>       <plugins>
>               <plugin>
>                       <groupId>org.apache.maven.plugins</groupId>
>                       <artifactId>maven-compiler-plugin</artifactId>
>                       <version>2.3.2</version>
>             <configuration>
>                 <source>1.6</source>
>                 <target>1.6</target>
>             </configuration>
>               </plugin>
>               <plugin>
>                       <groupId>org.apache.maven.plugins</groupId>
>                       <artifactId>maven-ear-plugin</artifactId>
>                       <version>2.4.2</version>
>                       <configuration>
>                       </configuration>
>               </plugin>
>       </plugins>
>   </build>
>   <dependencies>
>     <dependency>
>       <groupId>org.apache.cxf</groupId>
>       <artifactId>cxf</artifactId>
>       <version>2.3.0</version>
>       <type>pom</type>
>     </dependency>
>     <dependency>
>       <groupId>org.springframework</groupId>
>       <artifactId>spring-beans</artifactId>
>       <version>3.0.5.RELEASE</version>
>     </dependency>
>   </dependencies>
> </project>
> ---------------------

Related to this, is it possible to have a single project that constructs
both an EAR and a WAR inside the EAR?  The few examples I can find all
have a parent project for the EAR and a subproject for the WAR.  Is that
partially why I'm having problems with this?

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to