JBoss.orgCommunity Documentation
In this chapter we describe where the Seam wizard puts the generated files for both EAR and WAR deployments.
The Seam Project wizard generates projects like Eclipse WTP style in order to utilize Eclipse WTP features and to have a correct classpath. To be more precise it generates one project per artifact.
The project layout for WAR projects is:
A WAR project can only use Seam JavaBean and JPA Entity bean components; it cannot use EJB3 Session beans etc.
WAR projects are generated to enable Seam 1.2.1 war hotdeploy feature. Classes put into src/action will be deployed to WEB-INF/dev from which Seam 1.2.1 automatically will perform hotdeploy of new components.
Because of Eclipse WTP limits the hot deployed classes also existed in WEB-INF/classes, but since Seam gives WEB-INF/dev precedence it will work.
Furthermore the Seam Project wizard generates a test project that is setup to run TestNG directly against the proper libraries and server runtime libraries. When the TestNG plugin is installed you can just run your tests via Run As > TestNG Test.
In order to deploy WAR project on server, right-click on the project and select Run As > Run on Server. Studio will deploy WAR project into one web application on server to deploy folder.
The project layout for EAR projects is:
An EAR project can use the whole range of Seam components, including EJB3 Session beans.
In order to deploy EAR project on server, right-click on the project with -ear postfix and select Run As > Run on Server. Studio will take care about all modules and deploy EAR project into one enterprise application on server to deploy folder. EAR application keeps ejb and war modules of the EAR project.
If you need to rename one of the Seam Project artifacts (<project_name>, <project_name>-test, <project_name>-test or <project_name>-ejb) or any entire folder like <project_name>/WebContent, <project_name>/ejbModule, <project_name>-test/test-src, or project name in packages org.domain.<project_name>.session, org.domain.<project_name>.entity, you can do this by brining the context menu and navigating Refactor > Rename... or just pressing Shift + Alt + R under the chosen resource.
Use Refactor > Move... (or Shift + Alt + V ), if you need to move <project_name>/WebContent folder, <project_name>/ejbModule folder or <project_name>/test-src folder in the other place within the Project structure.