3 Replies Latest reply on Jun 3, 2010 11:38 AM by Arbi Sookazian

    seamgen in Seam 3

    Arbi Sookazian Master

      is there a prototype or similar available for Seam 3 seamgen with maven?  I'm interested as my current project is using Maven 2.x with m2e plugin in Eclipse.

        • 1. Re: seamgen in Seam 3
          Arbi Sookazian Master

          also, what about support for parent POMs and grandparent POMs for setting up a hierarchical structure like we have on our current project.

          we actually have two Seam 2.x projects that use the same common POM for a lot of libraries like RichFaces, Apache Commons, etc. that are popular and shared.

          Maven Super POM --> Common POM --> Parent POM --> module POM

          Also will it include the maven-cli-plugin (which is now a JBoss product???) as well as integration with m2e which is not supporting WTP unfortunately and seems to be buggy with 0.9.8 and 0.10.0.

          One thing I hate about m2e is the auto builds it does for all the Maven module POMs in our project (10 or so per parent POM) and you have to disable that per POM.  Really slows down your Eclipse dev experience...

          But JBT lead Max Andersen has recommended using m2e and not using mvn eclipse:eclipse.

          I haven't heard too much about what is going on right now with seamgen and Maven stuff....

          • 2. Re: seamgen in Seam 3
            Cloves Almeida Newbie

            There are some maven archetypes for Weld/CDI (Seam 3 are just modules on top of CDI) here http://seamframework.org/Documentation/WeldQuickstartForMavenUsers

            I used their skeletons to learn about the dependencies to build my own multi-project pom.xml. I just used the standard maven ear, war, ejb plugins for packaging.

            However, I still find maven a PITA for anything but the most basic lifecycles. Creating an exploded ear requires you to write a plugin! That's why I'm learning to use something saner, like Gradle.

            • 3. Re: seamgen in Seam 3
              Arbi Sookazian Master
              <project basedir="." name="cis.build.script" default="copyfacelets">
                   <!-- ********************************* BUILD TARGETS ************************************ -->
                   <target name="unzip">
                        <echo message="Base directory is ${basedir}" />     
                        <mkdir dir="${basedir}\com.echo.cis.gui.ear\target\${ear.app.name}\temp"/>
                        <unzip src="${basedir}\com.echo.cis.gui.ear\target\${ear.app.name}\${war.app.name}.war" dest="${basedir}\com.echo.cis.gui.ear\target\${ear.app.name}\temp"/>
                        <delete file="${basedir}\com.echo.cis.gui.ear\target\${ear.app.name}\${war.app.name}.war"/>
                        <mkdir dir="${basedir}\com.echo.cis.gui.ear\target\${ear.app.name}\${war.app.name}.war"/>
                        <copy todir="${basedir}\com.echo.cis.gui.ear\target\${ear.app.name}\${war.app.name}.war">
                             <fileset dir="${basedir}\com.echo.cis.gui.ear\target\${ear.app.name}\temp" />
                        <delete dir="${basedir}\com.echo.cis.gui.ear\target\${ear.app.name}\temp"/>
                   <target name="package">
                        <maven target="install" basedir="${basedir}">
                             <arg line="-f ${pom.file} -o -npu -Dmaven.test.skip=true" />
                   <target name="clean">
                        <echo message="Deleting ${basedir}\com.echo.cis.gui.ear\target\${ear.app.name}\temp directory"/>
                        <delete dir="${basedir}\com.echo.cis.gui.ear\target\${ear.app.name}\temp"/>
                        <maven target="clean" basedir="${basedir}">
                         <arg line="-f ${pom.file}" />
                   <target name="tomcat.package">
                        <maven target="install" basedir="${basedir}">
                         <arg line="-f ${pom.file} -Ptomcat" />
                   <target name="explode" depends="clean, package, unzip">
                        <mkdir dir="${jboss.home}/server/${jboss.profile}/deploy/${ear.app.name}.ear" />
                        <copy todir="${jboss.home}/server/${jboss.profile}/deploy/${ear.app.name}.ear">
                             <fileset dir="${artifact.dir}" />
                            <format property="now" pattern="MM/dd/yyyy hh:mm:ss" locale="en,US"/>  
                        <echo message="Current datetime: ${now}"/>
                        <echo message="The app can be accessed at ${final.url}" />
                   <target name="copyfacelets">
                        <copy todir="${jboss.home}/server/${jboss.profile}/deploy/${ear.app.name}.ear/${war.app.name}.war/restricted/billing">
                             <fileset refid="war.billing.view" />               
                        <copy todir="${jboss.home}/server/${jboss.profile}/deploy/${ear.app.name}.ear/${war.app.name}.war/restricted/merchant">
                             <fileset refid="war.merchant.view" />               
                        <copy todir="${jboss.home}/server/${jboss.profile}/deploy/${ear.app.name}.ear/${war.app.name}.war/restricted/assessment">
                             <fileset refid="war.assessment.view" />               
                        <copy todir="${jboss.home}/server/${jboss.profile}/deploy/${ear.app.name}.ear/${war.app.name}.war/resources/js">
                             <fileset refid="war.js" />               
                        <echo message="The app can be accessed at ${final.url}" />
                   <target name="unexplode" description="Undeploy the exploded archive">
                        <delete failonerror="no">
                             <fileset dir="${jboss.home}/server/${jboss.profile}/deploy/${ear.app.name}.ear">
                                  <exclude name="**/*.jar" />
                        <delete dir="${jboss.home}/server/${jboss.profile}/deploy/${ear.app.name}.ear" failonerror="no" />          
                   <target name="eclipse:clean">
                        <maven target="eclipse:clean" basedir="${basedir}">
                             <arg line="-f ${pom.file}" />
                   <target name="eclipse:eclipse">
                        <maven target="eclipse:eclipse" basedir="${basedir}">
                             <arg line="-f ${pom.file}" />
                   <!-- ************************************ MAVEN MACRODEF CONFIG ********************************************** -->
                   <macrodef name="maven">
                        <attribute name="target" />
                        <attribute name="basedir" />
                        <element name="args" implicit="true" optional="true" />
                             <java classname="org.codehaus.classworlds.Launcher" fork="true" dir="@{basedir}" failonerror="true">
                                       <fileset dir="${maven.dir}/boot">
                                            <include name="*.jar" />
                                       <fileset dir="${maven.dir}/bin">
                                            <include name="*.*" />
                                  <sysproperty key="classworlds.conf" value="${maven.dir}/bin/m2.conf" />
                                  <sysproperty key="maven.home" value="${maven.dir}" />
                                  <args />
                                  <arg line="@{target}" />