1 Reply Latest reply on Mar 9, 2011 4:44 AM by Philippe Aubertin

    Converting a Seam EAR deployment to a WAR deployment

    Deji Mabogunje Newbie

      I currently have a Seam 2 Project (JBossAS6) deployed as an EAR.
      The Ear structure is as follows:


      -- EAR
          -- Application War
          -- Seam 2.2 Module
          -- Lib
              -- JBoss Seam UI Jar
              -- JBoss EL Jar


      I would like to now deploy this as a single WAR, what would I need to do to get this to work.


      I have removed the Seam 2.2 Module, and added all the following jars to Application War's lib folder:


        jboss-el-1.0
        jboss-seam-2.2.1.CR2
        jboss-seam-ui-2.2.1.CR2
        jsf-facelets-1.1.15.B1

        • 1. Re: Converting a Seam EAR deployment to a WAR deployment
          Philippe Aubertin Newbie

          Hi,
          To do this, I convert my project to maven2.


          Here is my pom.xml which describes my project.
          Hope this can help.




          <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>***********</groupId>
               <artifactId>***********</artifactId>
               <version>0.0.1-SNAPSHOT</version>
               <packaging>war</packaging>
               <name>emploi-pro</name>
               <description />
          
               
          
               <properties>
                    <jbpm.version>3.2.2</jbpm.version>
                    <project.version>0.0.1-SNAPSHOT</project.version>
                    <persistence-api.version>1.0</persistence-api.version>
                    <testng.version>5.8</testng.version>
                    <hibernate-commons-annotations.version>3.3.0.ga</hibernate-commons-annotations.version>
                    <jboss.embedded.version>beta3.SP9</jboss.embedded.version>
                    <ejb.api.version>3.0</ejb.api.version>
                    <jsr250-api.version>1.0</jsr250-api.version>
                    <junit.version>3.8.1</junit.version>
                    <drools.version>5.0.1</drools.version>
                    <jbpm3.version>3.2.5.SP5</jbpm3.version>
                    <seam.version>2.2.0.GA</seam.version>
                    <commons.digester.version>1.8</commons.digester.version>
                    <hibernate-validator.version>3.1.0.GA</hibernate-validator.version>
                    <javax.activation.version>1.1</javax.activation.version>
                    <hibernate-entitymanager.version>3.4.0.GA</hibernate-entitymanager.version>
                    <slf4j.version>1.4.2</slf4j.version>
                    <hibernate-annotations.version>3.4.0.GA</hibernate-annotations.version>
                    <richfaces.version>3.3.1.GA</richfaces.version>
                    <jsf.version>1.2_12</jsf.version>
                    <mvel.version>1.2.21</mvel.version>
                    <servlet.version>2.5</servlet.version>
                    <javax.el.version>1.0</javax.el.version>
                    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
                    <netbeans.hint.deploy.server>JBoss4</netbeans.hint.deploy.server>
               </properties>
          
               <build>
                    <sourceDirectory>${basedir}/src/main</sourceDirectory>
                    <outputDirectory>${basedir}/WebContent/WEB-INF/classes</outputDirectory>
                    <resources>
                         <resource>
                              <directory>${basedir}/src/hot</directory>
                              <excludes>
                                   <exclude>**/*.java</exclude>
                              </excludes>
                         </resource>
                         <resource>
                              <directory>${basedir}/src/main</directory>
                              <excludes>
                                   <exclude>**/*.java</exclude>
                              </excludes>
                         </resource>
                    </resources>
                    <plugins><!-- <plugin> <groupId>org.jboss.maven.plugins</groupId> <artifactId>maven-jbossaop-plugin</artifactId> 
                              <version>2.1.3.GA</version> <executions> <execution> <id>compile</id> <configuration> 
                              <includeProjectDependency>false</includeProjectDependency> <aoppaths> <aoppath>src/main/resources/jboss-aop.xml</aoppath> 
                              </aoppaths> </configuration> <goals> <goal>compile</goal> </goals> </execution> 
                              </executions> </plugin> -->
                         <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>
                              <artifactId>maven-war-plugin</artifactId>
                              
                              <configuration>
                                   <packagingExcludes>**/.svn/</packagingExcludes> 
                                   <warSourceDirectory>${basedir}/WebContent</warSourceDirectory>
                              </configuration>
                              
                         </plugin>
          
          
                    </plugins>
               </build>
               <dependencies><!-- <dependency> <groupId>org.jboss.maven.plugins</groupId> 
                         <artifactId>maven-jbossaop-plugin</artifactId> <version>2.1.3.GA</version> 
                         <exclusions> <exclusion> <artifactId>maven-plugin-api</artifactId> <groupId>org.apache.maven</groupId> 
                         </exclusion> <exclusion> <artifactId>maven-project</artifactId> <groupId>org.apache.maven</groupId> 
                         </exclusion> <exclusion> <artifactId>plexus-utils</artifactId> <groupId>org.codehaus.plexus</groupId> 
                         </exclusion> </exclusions> </dependency> -->
                    <dependency>
                         <groupId>au.com.bytecode</groupId>
                         <artifactId>opencsv</artifactId>
                         <version>2.2</version>
                         <type>jar</type>
                    </dependency>
                    <dependency>
                         <groupId>commons-validator</groupId>
                         <artifactId>commons-validator</artifactId>
                         <version>1.3.1</version>
                         <exclusions>
          
          
                              <exclusion>
                                   <artifactId>xml-apis</artifactId>
                                   <groupId>xml-apis</groupId>
                              </exclusion>
          
                         </exclusions>
                    </dependency>
          
                    <dependency>
                         <groupId>org.hibernate</groupId>
                         <artifactId>hibernate-validator</artifactId>
                         <version>${hibernate-validator.version}</version>
                         <scope>provided</scope>
                         <exclusions>
                              <exclusion>
                                   <artifactId>commons-collections</artifactId>
                                   <groupId>commons-collections</groupId>
                              </exclusion>
                         </exclusions>
                    </dependency>
                    <dependency>
                         <groupId>oro</groupId>
                         <artifactId>oro</artifactId>
                         <version>2.0.8</version>
                    </dependency>
          
                    <dependency>
                         <groupId>org.hibernate</groupId>
                         <artifactId>hibernate-annotations</artifactId>
                         <version>${hibernate-annotations.version}</version>
                         <scope>provided</scope>
                         <exclusions>
                              <exclusion>
                                   <artifactId>xml-apis</artifactId>
                                   <groupId>xml-apis</groupId>
                              </exclusion>
                         </exclusions>
                    </dependency>
                    <dependency>
                         <groupId>org.hibernate</groupId>
                         <artifactId>hibernate-entitymanager</artifactId>
                         <version>${hibernate-entitymanager.version}</version>
                         <scope>provided</scope>
                         <exclusions>
                              <exclusion>
                                   <artifactId>javassist</artifactId>
                                   <groupId>javassist</groupId>
                              </exclusion>
                         </exclusions>
                    </dependency>
                    <dependency>
                         <groupId>org.jboss.seam</groupId>
                         <artifactId>jboss-seam</artifactId>
                         <version>${seam.version}</version>
                         <exclusions>
                              <exclusion>
                                   <artifactId>el-api</artifactId>
                                   <groupId>javax.el</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>servlet-api</artifactId>
                                   <groupId>javax.servlet</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>javassist</artifactId>
                                   <groupId>jboss</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>dom4j</artifactId>
                                   <groupId>dom4j</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>xpp3_min</artifactId>
                                   <groupId>xpp3</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>xstream</artifactId>
                                   <groupId>xstream</groupId>
                              </exclusion>
                         </exclusions>
                    </dependency>
                    <dependency>
                         <groupId>org.jboss.seam</groupId>
                         <artifactId>jboss-seam-ui</artifactId>
                         <version>${seam.version}</version>
                         <exclusions>
                              <exclusion>
                                   <artifactId>servlet-api</artifactId>
                                   <groupId>javax.servlet</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>jboss-seam</artifactId>
                                   <groupId>org.jboss.seam</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>commons-beanutils</artifactId>
                                   <groupId>commons-beanutils</groupId>
                              </exclusion>
                         </exclusions>
                    </dependency>
                    <dependency>
                         <groupId>org.jboss.seam</groupId>
                         <artifactId>jboss-seam-ioc</artifactId>
                         <version>${seam.version}</version>
                         <exclusions>
                              <exclusion>
                                   <artifactId>servlet-api</artifactId>
                                   <groupId>javax.servlet</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>jboss-seam</artifactId>
                                   <groupId>org.jboss.seam</groupId>
                              </exclusion>
                         </exclusions>
                    </dependency>
                    <dependency>
                         <groupId>org.jboss.seam</groupId>
                         <artifactId>jboss-seam-mail</artifactId>
                         <version>${seam.version}</version>
                         <exclusions>
                              <exclusion>
                                   <artifactId>jboss-seam</artifactId>
                                   <groupId>org.jboss.seam</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>jboss-seam-ui</artifactId>
                                   <groupId>org.jboss.seam</groupId>
                              </exclusion>
                         </exclusions>
                    </dependency>
                    <dependency>
                         <groupId>org.jboss.seam</groupId>
                         <artifactId>jboss-seam-pdf</artifactId>
                         <version>${seam.version}</version>
                         <exclusions>
                              <exclusion>
                                   <artifactId>jboss-seam</artifactId>
                                   <groupId>org.jboss.seam</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>jboss-seam-ui</artifactId>
                                   <groupId>org.jboss.seam</groupId>
                              </exclusion>
                         </exclusions>
                    </dependency>
                    <dependency>
                         <groupId>org.jboss.seam</groupId>
                         <artifactId>jboss-seam-remoting</artifactId>
                         <version>${seam.version}</version>
                         <exclusions>
                              <exclusion>
                                   <artifactId>jboss-seam</artifactId>
                                   <groupId>org.jboss.seam</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>dom4j</artifactId>
                                   <groupId>dom4j</groupId>
                              </exclusion>
                         </exclusions>
                    </dependency>
                    <dependency>
                         <groupId>org.jboss.seam</groupId>
                         <artifactId>jboss-seam-excel</artifactId>
                         <version>${seam.version}</version>
                         <exclusions>
                              <exclusion>
                                   <artifactId>jboss-seam</artifactId>
                                   <groupId>org.jboss.seam</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>jboss-seam-ui</artifactId>
                                   <groupId>org.jboss.seam</groupId>
                              </exclusion>
                         </exclusions>
                    </dependency>
                    <dependency>
                         <groupId>org.jboss.seam</groupId>
                         <artifactId>jboss-seam-debug</artifactId>
                         <version>${seam.version}</version>
                         <exclusions>
                              <exclusion>
                                   <artifactId>servlet-api</artifactId>
                                   <groupId>javax.servlet</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>jboss-seam</artifactId>
                                   <groupId>org.jboss.seam</groupId>
                              </exclusion>
                         </exclusions>
                    </dependency>
                    <dependency>
                         <groupId>javax.servlet</groupId>
                         <artifactId>servlet-api</artifactId>
                         <version>${servlet.version}</version>
                         <scope>provided</scope>
                    </dependency>
                    <dependency>
                         <groupId>org.richfaces.ui</groupId>
                         <artifactId>richfaces-ui</artifactId>
                         <version>${richfaces.version}</version>
                    </dependency>
                    <dependency>
                         <groupId>org.richfaces.framework</groupId>
                         <artifactId>richfaces-api</artifactId>
                         <version>${richfaces.version}</version>
                         <scope>compile</scope>
                         <exclusions>
                              <exclusion>
                                   <artifactId>commons-logging</artifactId>
                                   <groupId>commons-logging</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>commons-collections</artifactId>
                                   <groupId>commons-collections</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>commons-beanutils</artifactId>
                                   <groupId>commons-beanutils</groupId>
                              </exclusion>
                         </exclusions>
                    </dependency>
                    <dependency>
                         <groupId>org.richfaces.framework</groupId>
                         <artifactId>richfaces-impl</artifactId>
                         <version>${richfaces.version}</version>
                         <exclusions>
                              <exclusion>
                                   <artifactId>commons-logging</artifactId>
                                   <groupId>commons-logging</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>junit</artifactId>
                                   <groupId>junit</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>jsf-api</artifactId>
                                   <groupId>javax.faces</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>servlet-api</artifactId>
                                   <groupId>javax.servlet</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>jsf-impl</artifactId>
                                   <groupId>javax.faces</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>commons-digester</artifactId>
                                   <groupId>commons-digester</groupId>
                              </exclusion>
                         </exclusions>
                    </dependency>
          
                    <dependency>
                         <groupId>javax.faces</groupId>
                         <artifactId>jsf-api</artifactId>
                         <version>${jsf.version}</version>
                         <scope>provided</scope>
                    </dependency>
                    <dependency>
                         <groupId>javax.faces</groupId>
                         <artifactId>jsf-impl</artifactId>
                         <version>${jsf.version}</version>
                         <scope>provided</scope>
                    </dependency>
                    <dependency>
                         <groupId>junit</groupId>
                         <artifactId>junit</artifactId>
                         <version>${junit.version}</version>
                         <scope>test</scope>
                    </dependency>
                    <dependency>
                         <groupId>org.testng</groupId>
                         <artifactId>testng</artifactId>
                         <version>${testng.version}</version>
                         <classifier>jdk15</classifier>
                         <scope>test</scope>
                    </dependency>
                    <dependency>
                         <groupId>org.jboss.seam.embedded</groupId>
                         <artifactId>hibernate-all</artifactId>
                         <version>${jboss.embedded.version}</version>
                         <scope>test</scope>
                    </dependency>
                    <dependency>
                         <groupId>org.jboss.seam.embedded</groupId>
                         <artifactId>jboss-embedded-all</artifactId>
                         <version>${jboss.embedded.version}</version>
                         <scope>provided</scope>
                         <exclusions>
                              <exclusion>
                                   <artifactId>jboss-deployers-client-spi</artifactId>
                                   <groupId>org.jboss.microcontainer</groupId>
                              </exclusion>
                         </exclusions>
                    </dependency>
                    <dependency>
                         <groupId>org.jboss.seam.embedded</groupId>
                         <artifactId>thirdparty-all</artifactId>
                         <version>${jboss.embedded.version}</version>
                         <scope>test</scope>
                    </dependency>
                    <dependency>
                         <groupId>org.slf4j</groupId>
                         <artifactId>slf4j-api</artifactId>
                         <version>${slf4j.version}</version>
                         <scope>test</scope>
                    </dependency>
                    <dependency>
                         <groupId>org.slf4j</groupId>
                         <artifactId>slf4j-nop</artifactId>
                         <version>${slf4j.version}</version>
                         <scope>test</scope>
                    </dependency>
                    <dependency>
                         <groupId>javax.activation</groupId>
                         <artifactId>activation</artifactId>
                         <version>${javax.activation.version}</version>
                         <scope>test</scope>
                    </dependency>
                    <dependency>
                         <groupId>javax.ejb</groupId>
                         <artifactId>ejb-api</artifactId>
                         <version>${ejb.api.version}</version>
                         <scope>provided</scope>
                         <optional>true</optional>
                    </dependency>
                    <dependency>
                         <groupId>javax.annotation</groupId>
                         <artifactId>jsr250-api</artifactId>
                         <version>${jsr250-api.version}</version>
                         <scope>provided</scope>
                         <optional>true</optional>
                    </dependency>
                    <dependency>
                         <groupId>javax.persistence</groupId>
                         <artifactId>persistence-api</artifactId>
                         <version>${persistence-api.version}</version>
                         <scope>provided</scope>
                         <optional>true</optional>
                    </dependency>
                    <dependency>
                         <groupId>org.hibernate</groupId>
                         <artifactId>hibernate-commons-annotations</artifactId>
                         <version>${hibernate-commons-annotations.version}</version>
                         <scope>provided</scope>
                         <exclusions>
                              <exclusion>
                                   <artifactId>commons-logging</artifactId>
                                   <groupId>commons-logging</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>commons-collections</artifactId>
                                   <groupId>commons-collections</groupId>
                              </exclusion>
                         </exclusions>
                         <optional>true</optional>
                    </dependency>
                    <dependency>
                         <groupId>javax.el</groupId>
                         <artifactId>el-api</artifactId>
                         <version>${javax.el.version}</version>
                         <scope>provided</scope>
                    </dependency>
                    <dependency>
                         <groupId>org.drools</groupId>
                         <artifactId>drools-compiler</artifactId>
                         <version>${drools.version}</version>
                         <scope>compile</scope>
                         <exclusions>
                              <exclusion>
                                   <artifactId>core</artifactId>
                                   <groupId>org.eclipse.jdt</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>xercesImpl</artifactId>
                                   <groupId>xerces</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>xml-apis</artifactId>
                                   <groupId>xml-apis</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>janino</artifactId>
                                   <groupId>janino</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>joda-time</artifactId>
                                   <groupId>joda-time</groupId>
                              </exclusion>
                         </exclusions>
                    </dependency>
                    <dependency>
                         <groupId>org.jbpm.jbpm3</groupId>
                         <artifactId>jbpm-jpdl</artifactId>
                         <version>${jbpm3.version}</version>
                         <exclusions>
                              <exclusion>
                                   <artifactId>commons-logging</artifactId>
                                   <groupId>commons-logging</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>ant</artifactId>
                                   <groupId>org.apache.ant</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>ant-launcher</artifactId>
                                   <groupId>org.apache.ant</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>hibernate</artifactId>
                                   <groupId>org.hibernate</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>bsh</artifactId>
                                   <groupId>bsh</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>dom4j</artifactId>
                                   <groupId>dom4j</groupId>
                              </exclusion>
                              <exclusion>
                                   <artifactId>jackrabbit-core</artifactId>
                                   <groupId>org.apache.jackrabbit</groupId>
                              </exclusion>
                         </exclusions>
                    </dependency>
                    <dependency>
                         <groupId>org.jbpm</groupId>
                         <artifactId>jbpm-jpdl</artifactId>
                         <version>${jbpm.version}</version>
                         <exclusions>
                              <exclusion>
                                   <artifactId>commons-logging</artifactId>
                                   <groupId>commons-logging</groupId>
                              </exclusion>
                         </exclusions>
                    </dependency>
                    <dependency>
                         <groupId>org.jboss.seam</groupId>
                         <artifactId>jboss-seam-rss</artifactId>
                         <version>2.2.0.GA</version>
                         <exclusions>
                              <exclusion>
                                   <artifactId>commons-collections</artifactId>
                                   <groupId>commons-collections</groupId>
                              </exclusion>
                         </exclusions>
                    </dependency>
                    <dependency>
                         <groupId>jfree</groupId>
                         <artifactId>jfreechart</artifactId>
                         <version>1.0.13</version>
                         <type>jar</type>
                         <scope>compile</scope>
                    </dependency>
               </dependencies>
          </project>