How to use auto-deploy in 8M1?

My application server is jboss as 4.2.3.GA. My web application uses JSF. I created a JSF facet in the Web facet. I'd like to be able to modify the xhtml files and see the modifications on the web browser without re-starting the jboss AS in IDEA. How could I do that?

I thought if I deployed my application in jboss in a directory structure (not a war file), I would be able to modify the xhtml files on the fly. But then the Run/Debug Configurations showed an error "Deployment source for Web facet has no valid extension". I don't like to go back to IDEA 7 because I love the code auto-completion in EL in IDEA 8.

Regards.

0
8 comments
Avatar
Permanently deleted user

Hi, you have to have "Create web module exploded directory" checked and rename the directory, e.g. myweb to myweb.war. You must not have myweb.war file in the same directory.

0
Avatar
Permanently deleted user

Thank you for your answer. Now I don't need to create a war file to deploy my application to jboss.

However, when I modify the xhtml files, save them, I have to rebuild my project so that the changes affect. Is there any way not to rebuild the project but changes in xhtml affect when the xhtml files are saved (because the time to re-deploy my app will be longer when my app grows).

0
Avatar
Permanently deleted user

Good point. I don't think IDEA can do it directly. I believe IDEA always redeploys the whole war or ear AFAIK in version 7. The problem is that most people probably use external jboss and ant to deploy everything. So nobody cares about using internal JBoss in IDEA I guess. Also maintaining project settings correct to keep internal JBoss deployment working is pain in the ass expecially if you have multimodule project and share iml files with colleagues or use Maven and/or use ant filtering in deployment descriptors.

But I think it is wrong. We should be able to use internal JBoss in development because it can bring potentially much faster development cycle. Since JBoss supports hotdeploy of single files IDEA should make this available. This would save so much time in designing UI. For example if you use Seam there is seamgen utility, which has special ant target which hotdeploys to JBoss only changed files making the UI design much faster.

Current workaround in IDEA would be to execute ant target on compile which copies changed files to JBoss. The problem is that internal JBoss uses deployment directory which is hidden from user. Maybe it would be helpful to use "Run/Generate Ant Build" from menu and extract some pieces of code from there.

0
Avatar
Permanently deleted user

Right click on the file and select 'Package File' - this will push your file in to the exploded directory

I have a macro set up for this so I can use it via keyboard shortcut.

p.s. looks like Package File has gone from the Project Explorer pane, but is still accessible in the context menu of the editor

Edited by: Ben Catherall on Aug 13, 2008 12:45 PM

0
Avatar
Permanently deleted user

Huh? I don't have a JBoss project around (currently using Tomcat only),
but as far as I remember it simply works like this:

  • use an exploded war for deployment

  • either package your single xhtml file after changing it (see context menu on right-click)

  • or simply "make" the project which will package all changed files, too


Steve Hickson wrote:

Good point. I don't think IDEA can do it directly. I believe IDEA always redeploys the whole war or ear AFAIK in version 7. The problem is that most people probably use external jboss and ant to deploy everything. So nobody cares about using internal JBoss in IDEA I guess. Also maintaining project settings correct to keep internal JBoss deployment working is pain in the ass expecially if you have multimodule project and share iml files with colleagues or use Maven and/or use ant filtering in deployment descriptors.

But I think it is wrong. We should be able to use internal JBoss in development because it can bring potentially much faster development cycle. Since JBoss supports hotdeploy of single files IDEA should make this available. This would save so much time in designing UI. For example if you use Seam there is seamgen utility, which has special ant target which hotdeploys to JBoss only changed files making the UI design much faster.

Current workaround in IDEA would be to execute ant target on compile which copies changed files to JBoss. The problem is that internal JBoss uses deployment directory which is hidden from user. Maybe it would be helpful to use "Run/Generate Ant Build" from menu and extract some pieces of code from there.

0
Avatar
Permanently deleted user

Wow I didn't know about this feature at all. Thanks :)

Now wouldn't it be cool to have it like in Eclipse to do "Package File" on file save?

Something for developers to think about.

0
Avatar
Permanently deleted user

Thanks all of you guys.

0
Avatar
Permanently deleted user

If you make sure your web module / ear module does not auto deploy on make, then you can just run make on the web module to package all the changes too.

0

Please sign in to leave a comment.