views:

392

answers:

1

I would like to use IntelliJ IDEA for development of JBoss Seam project. seam-gen is creating the project stub, however the stub is not complete. In particular it is not clear how to deploy such project.

First of all I had to define manually web project facelet and add libraries to its deployment definition.

The other problem was persistence.xml file. In the Seam generated project it does not exists, since Ant is using one of the persistence-dev.xml, persistence-prod.xml, persistence-test.xml files, changing its name, depending on deployment type (which is ok). Obviously I can create persistence.xml by hand, but it goes againts Seam way of development.

Finally I decided to use directly ant, which is not partucularly comfortable.

All these tweaks made me think that I am doing something wrong from the IntelliJ IDEA point of view.

What is the efficient way of configuring IntelliJ for usage with JBoss Seam (deployment, in particular)?

I am using JBoss Seam 2.1.1, Intellij 8.1.4, JBoss 4.3.3

A: 
  1. facet

I don't think you have to create any facet manually, as long as i remember IDEA always did it automatically for me...

  1. persistence.xml

If IDEA didn't grab automatically persistence-dev.xml, you can tell her to use this file and not care that it's name will change after deployment...

  1. artifact

You can still build your app using ant and create an analogical artifact in IDEA in the same location (for example exploded-archives/Project.war) - just leave "Build on make" unchecked (you want to build this artifact with ant)...

  1. deployment

now, when you create new run configuration for the jboss as, in the deployment tab you can choose your artifact... just as if it was built by IDEA

Michal