Version 8

    JBoss Seam and Maven 2

     

    JBoss Seam, by default, is set up to compile, package, and deploy using Ant. Many developers, however, would like to use Maven 2 to build their application. In order to make the process of configuring Maven to correctly build a Seam project easier, Lunar Logic has created a Maven Archetype that will create an empty Seam project that compiles and packages using Maven 2.

     

    The instructions for obtaining and using the archetype are located on the Lunar Logic Blog.

     

    The instructions don't work quite as advertised, you can, however, download the archetype and install into the local maven2 repos by hand using 'mvn install'.

     

    Also, I am working with the publisher to determine how to find a plugin that is used by the archetype called 'jboss-as-maven2-plugin'.  Currently, you can create a new project, but it fails on any mvn command because it cannot locate this plugin.

     

    Seam and Maven - archetype and SeamGen like application

     

    You can also try Seam Maven integration by SoftEU. It provides few archetypes and Maven profiles for easier dependencies and SeamGen like application.

     

     

    Script for creating a local maven 2 repo from a seam distribution

     

    Usage:

    cd [seam-home]
    mvnseam [seam-version]
    

     

    mvnseam:

    #!/bin/bash
    # Run from the seam directory
    JARS=$(ls *.jar)
    for JAR in $JARS
    do
            NAME=$(echo $JAR|cut -c1-$(expr $(expr length $JAR) - 4))
            mvn install:install-file -Dfile=$JAR -DgroupId=seam -DartifactId=$NAME -Dversion=$1 -DgeneratePom=true -Dpackaging=jar
    done
    cd lib
    JARS=$(ls *.jar)
    for JAR in $JARS
    do
            NAME=$(echo $JAR|cut -c1-$(expr $(expr length $JAR) - 4))
            mvn install:install-file -Dfile=$JAR -DgroupId=seam.lib -DartifactId=$NAME -Dversion=$1 -DgeneratePom=true -Dpackaging=jar
    done