How to package a Seam project in Idea 8?

I'm using 8890 and Seam 2.0.2 SP1.

I created an Idea project so that the output ear directory is exactly like the directory generated with running ant deploy in seam.dir/examples/registration.

The ant deploy generated directory has the structure in the attached fig 1.

The fig 2 ( without the red lines) shows what I can achieve (the structure of an ear application and the Idea-generated application.xml) with Idea. The fig 2 with the red lines shows what I want. I can make Idea add the jboss-seam.ear to the root directory of the ear application by adding a library (which contains jboss-seam.jar only) to the 'EJB' facet of my ear application, but I don't know how to tell Idea that the jboss-seam.jar should be an ejb (i.e. I cannot make Idea write the red line in the application.xml file).

I can add the red line in the application.xml to that file manually. But when I did that and deployed the ear application to JBoss 4.2.3.GA, there was a warning that there might be 2 SeamPhaseListener instances installed (the SeamPhaseListener is declared in the faces-config.xml in the META-INF of jboss-seam.jar). And when I run the ear application, there were some exceptions.

If I copy the exploded ear application to jboss-4.2.3.GA/server/default/deploy and run JBoss outside Idea, there is no warning nor exception. So the way I add the red line manually to the application.xml might not be an Idea way to do.

What should I do?



Attachment(s):
fig1.png
fig2.png
6 comments
Comment actions Permalink

There is no way to add a EJB module containing in a jar-file. So you need to add the jboss-seam.jar as a library and edit the application.xml manually
exactly as you did. The problem with the duplicated listener instances seems to be caused by JBoss plugin.

I'm using 8890 and Seam 2.0.2 SP1.

I created an Idea project so that the output ear directory is exactly like the directory generated with running ant deploy in seam.dir/examples/registration.

The ant deploy generated directory has the structure in the attached fig 1.

The fig 2 ( without the red lines) shows what I can achieve (the structure of an ear application and the Idea-generated application.xml) with Idea. The fig 2 with the red lines shows what I want. I can make Idea add the jboss-seam.ear to the root directory of the ear application by adding a library (which contains jboss-seam.jar only) to the 'EJB' facet of my ear application, but I don't know how to tell Idea that the jboss-seam.jar should be an ejb (i.e. I cannot make Idea write the red line in the application.xml file).

I can add the red line in the application.xml to that file manually. But when I did that and deployed the ear application to JBoss 4.2.3.GA, there was a warning that there might be 2 SeamPhaseListener instances installed (the SeamPhaseListener is declared in the faces-config.xml in the META-INF of jboss-seam.jar). And when I run the ear application, there were some exceptions.

If I copy the exploded ear application to jboss-4.2.3.GA/server/default/deploy and run JBoss outside Idea, there is no warning nor exception. So the way I add the red line manually to the application.xml might not be an Idea way to do.

What should I do?


------------------------------------------------------------------------


------------------------------------------------------------------------



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Thank you for confirming that I did the correct thing.

So, could anybody fix the JBoss plugin please? I really like Idea and don't want to use Eclipse + JBoss Tools for Seam projects.

0
Comment actions Permalink

I can hardly imagine that the JBoss plugin could cause something here.
It simply passes the deployment target to JBoss, and JBoss is
responsible of doing anything meaningful with it. The plugin doesn't
even look at the content of the deployment target.

But if you still think that the JBoss plugin is causing any harm then
please file an issue here http://www.jetbrains.net/jira/browse/JEEAS and
attach a sample project with exact steps how to reproduce the problem.

--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com

0
Comment actions Permalink

Ah! On the way filing a jira with a detailed description, I know where the problem is. It's the MANIFEST.MF generated by Idea.

+Manifest-Version: 1.0
Class-Path: jboss-seam.jar
Created-By: IntelliJ IDEA+

According to the ear package generated by Seam, jboss-seam.jar should not be in the classpath.

So, how can I tell Idea not to put jboss-seam.jar in the classpath in the MANIFEST.MF file of the ejb module?

0
Comment actions Permalink

Instead of using a library to get the jboss-seam.jar at the correct location just add the jar
file as an "additional resource" in the Deployment Descriptor section.

Thai Dang Vu wrote:

Ah! On the way filing a jira with a detailed description, I know where the problem is. It's the MANIFEST.MF generated by Idea.

+Manifest-Version: 1.0
Class-Path: jboss-seam.jar
Created-By: IntelliJ IDEA+

According to the ear package generated by Seam, jboss-seam.jar should not be in the classpath.

So, how can I tell Idea not to put jboss-seam.jar in the classpath in the MANIFEST.MF file of the ejb module?

0
Comment actions Permalink

In the cold weather, the UGG boots are considered as the best shoes.More and more people like wearing the UGG boots such as the http://sell-ugg.com/UGG-Classic-Metallic-5812/c9/index.html.With its development ,the UGG boots have lauched different kinds of boots into the fashion market,including the http://uggboots-euro.com/UGG-Classic-Short-Boots/c3/index.html and the http://uggboots-euro.com/UGG-Women%27s-ighkoo/c23/index.html.However,in the fashion world,if you want to be more attractive and elegant,the beautiful shoes are not enough.You have to choose the best stylish handbag to match your shoes.Therefor,the designer replica handbags are very necessary.If you want to buy the best designer cheap handbags,i would like to introduce two famous brand handbags to you.I think there must be one handbag is your favorite.One is the famous brand http://www.famousbrandbag.com/Versace/c40/index.html,the other is the Ferragamo Handbags.Both of them are the famous brand in the world.Their quality are very good.

---
Original message URL: http://www.jetbrains.net/devnet/message/5254941#5254941

0

Please sign in to leave a comment.