Skip to end of metadata
Go to start of metadata

Seam projects in IDEA

    This document describes how the IDEA project can be configured to deploy the Seam applications to JBoss. One of Seam sample projects - Booking sample - is considered.

1)      Create the new IDEA project from existing sources - seam booking example.

2)      Create module libraries to include to deployed archives:

-         jboss-seam.jar  should be put to the ear file

-         'to_war' library: jars that should appear in the WEB-INF/lib folder of war

                    - jboss-seam-debug.jar

                    - jboss-seam-ui.jar

                    - jsf-facelets.jar

                    - richfaces-impl.jar

                    -  richfaces-ui.jar

-         'to_ear' library: jars that should appear in the lib folder of ear

                    - common-beanutils.jar

                    - commons-digester.jar

                    - jboss-el.jar

                    - richfaces-api.jar

-         Jars not included to deployment: jsf-api.jar, hibernate*.jar

     

1)      Adjust the facets detected in project:

    EJB facet:   

Add additional resources: persistence.xml file to META-INF folder of deployment root, import.sql and seam.properties files - to deployment root.

Select to_ear library to link via manifest and  copy files to /lib; select jboss-seam.jar to link via manifest and copy to /.


    Web facet: 

 Add additional resources: components.xml, faces-config.xml, pages.xml to WEB-INF, messages.properties - to WEB-INF/classes.
Select library to package into war: to_war library should be copied to /WEB_INF/lib. Set the web resource directory - view folder.

 .  

  javaEEApplication facet: 

Include EJB and Web facets into ear; set the context root and module names properly. Add jboss-app.xml as additional resource.Note that the application.xml is changed on facet configuring and the duplicated modules are inserted there; remove them manually from this file after configuring the facet.

On the build settings tab set the archive name to deploy or the exploded directory (note, that it should have .ear extension):

Remove JPA facet  to avoid redundant resources packaging into war.

 4) Edit the components.xml :

The core:init component should be changed as follows: 

  

5) Create JBoss run configuration:

select the jboss application server, default instance; on the Deployment page select the facet to deploy - javaEEApplication facet.

That's all. The ear that is created on deployment is the same as one built by ant in the original seam example.

  • No labels

2 Comments

  1. Anonymous

    Looks like this is Idea 7. I'm using Idea 8 and Seam 2.0.2 SP1. If I do like this in Idea 8, I don't have this line in the application.xml

    <module><ejb>jboss-seam.jar</ejb></module>

     The application.xml generated by ant has this line.

     Any idea how to package a Seam project in Idea 8?

  2. Anonymous

    Where is the "Packaging method" in Idea 8?
    I can't find it.
    Please help me to figure out how not to package specific libraries.