The new version should be easier to configure and play nicer with e.g. the Eclipse Maven plugin (I'm not using NetBeans/IntelliJ too often, but I hope this works also fine there). The new Eclipse builder configuration looks like shown in the image below:

Note: The Eclipse Maven plugin using its embedded Maven had somehow problems with the extended lifecycle of the Hotdeploy Plugin. Using an external Maven installation (2.0.10) felt not only faster but was also not having problems with it.

I've seen this behavior when the build did some sort of resource refresh (which probably included the Maven target folder), triggering itself all the time. Anything like that you might have active in your build settings?

For the source directory: Maven supports by default only one source folder (src/main/java). "Add" in this context means that the src/main/hot directory will be added to the list of folders getting compiled by the Maven compiler plugin.

Getting back to your initial problem: Is your Maven builder configured to refresh your workspace (builder refresh tab)? If so, this will most probably cause the builder to fire in a loop.

For the builder setup, I have the Java builder on, the newer version of the Maven Eclipse plugin works much better with it. It might help to:- Create a new project with the Maven Eclipse wizard and the WAR-archetype and look at the project settings- Let the Maven plugin sync your project settings with right-clicking your project and select Maven -> Update Project Configuration.

Hi, I have problem with task compiler:compile. The build-helper:add-source plugin adds files to this plugin and I can't deploy the application to the JBoss.When I remove the plugin build-helper:add-source netbeans reports error on classes in hot folder.Know somebody where make I error ?

Do you get a duplicate class error when deploying to JBoss? In case you used the linked sample POM, I just realized that the version number of the hot deploy plugin is not up to date there (should be 0.3.1). The plugin compares both output folders for compile:compile and hotdeploy:compile and skips classes present in both locations while packaging the WEB-INF/classes folder. Creating the filter patterns had a bug in a previous version.

Just update, run a clean, make sure the application is deleted from JBoss and try again.

BTW the sample POM will be deprecated in the near future. Instead, have a look at the Seam Archetype (ICEFaces support described here).

Your plug-in is really cool. Can you tell me how it can be configured for a production environment? What I am asking is how it can be configured so that the final war file doesn't have the WEB-INF/dev directory(eliminate the hot deployment).

Thank you for the follow-up. Another problem is when the maven2> hot is executed, I get exceptions because the app server tries to deploy the app before the copy process is finished. It would be nice if the application is copied somewhere in a temporary location on the server and then moved to the deploy directory.

I used the new jbsarch type and successfully built my project with mvn archetype:generate -DarchetypeCatalog=http://tinyurl.com/jbsarch and mvn package using maven 2.2.0. I now wanted to import the project into Eclipse 3.5 m2 0.98 JDK 1.6.0_15 but first of all get an error: com.ctp.seam.maven:maven-hotdeploy-plugin' does not exist or no valid version could be found. Then when I use your settings for the maven builder I get: Required goal not found: hotdeploy:explode in com.ctp.seam.maven:maven-hotdeploy-plugin:0.3.1. What am I missing? Please help.

@Bernhard: Will have to look at it. Using a Maven builder in Eclipse can be rather annoying (I got annoyed by the popups when editing XHTML files) so I also use the CLI plugin in the Seam archetype. For incremental deployments I'm usually down to less than 1 sec, which is really cool.

Has anyone played around with the Maven integration in JBoss Tools? I guess once this is final, that's more the way to go in Eclipse.

I have set the hotdeploy plugin version 0.3.1, but the classes directory still contains all classes. I think this is because of this:[WARNING] Duplicate class filtering is active but this requires hot deployable classes to be compiled first [directory /home/mvlach/skoleni/vyreseno/seamtest1/target/classes-hotdeploy does not exist].

But seamtest1 contains the main pom and the compiled classes are in directory .../seamtest1/seamtest1-webapp/target/classes-hotdeploy

I compile this by using mvn hotdeploy:exploded in the main directory. So the mvn -Pclean clean don't wokrs too.

The project is created by mvn archetype:generate -DarchetypeCatalog=http://tinyurl.com/jbsarch

It is correct that the hotdeploy:exploded goal (as well as the special clean) works only when run in the WAR module directory - imagine you have a utility JAR module which gets this goal called on (which happens when you run it in the parent POM location) - what should it do with it? So you have to run 'package' on the main module or the hotdeploy stuff in your WAR module.

I you want really fast build cycles, I'd also recomment to use the cli plugin in the WAR module: mvn cli:execute-phase and then simply 'hot' on the maven console. Runs the incremental build in usually < 1 sec.

Hmm, weird. Can you confirm - you have this result on a plain command line run without having it imported into NetBeans (Eclipse WTP compiled for some cases into src/main/webapp/WEB-INF/classes, which screws up hot deployment)- and WEB-INF/dev exists in the target output and contains the Authenticator.class?

What the plugin does is to compare the regular compiler output (target/classes) and the hot deploy output (target/classes-hotdeploy) and creating Ant patterns to exclude classes from the regular compiler output when they are present in the hot deploy output.

Can you run maven with the -X switch? Should print the exclude pattern somewhere towards the end:

Hi Thomas, Many thanks for your plugin, I have successfully used it to create a dummy webapp, and hot deployed a change to the Authenticator class. However, anytime I do perform a 'hot' deploy via the maven console, I notice that the jboss does a full reload of the war to get that change in. Is that to be expected? I ask, as I'm trying to configure seam and jboss, so that seam gui class changes can be hot deployed to jboss, but DO NOT require a full reload of the war. If you can think of a way to do that, I'd be very grateful for your comments and advice Thomas.Agains thanks for the plugin,Regards,Conor

About

Please note that this is our old blog location. New posts can be found at the official CTP blog.

The Java Competence of Cambridge Technology Partners Switzerland is harvesting all Java related topics within the company and supports actively all Solution Offerings from a technology point of view.DISCLAIMER: Blog contents express the viewpoints of their independent authors and are not reviewed for correctness or accuracy by Cambridge Technology Partners. Any opinions, comments, solutions or other commentary expressed by blog authors are not endorsed or recommended by Cambridge Technology Partners.Further the blog does not contain confidential data at all. It is strictly technology centric.