1
votes

My application uses ant to build jars for every modules and creates a .war including all the modules jar in Jboss/deployment folder.

Problem : Now for every small change in any .java file, I have to run

ant deploy.all

command to build the new .jar of that module and add it in .war. After that I have to restart my Jboss server to deploy the war with new changes.

This costs double the time for any task completion and we cannot freely play with the code with fear of repeating this whole process everytime.

Is there any way I can directly make changes in target files and it will auto deployed on Jboss for every little changes. PS - Currently my target files are just .class files in the jars that I built and consolidated in .war to deploy on JBoss.

Using:

  • JBoss 6.4

  • Ant 1.9.4

2

2 Answers

0
votes

We cant change class files on the fly. On updating class files either you have to redeploy application or restart server instance. Only web pages can be changed at run time,without application redeploy or server restart. In this situation I think its good to separate each module. To define the interdependency between modules you can make use of few configuration files like jboss-all.xml. jboss-web.xml

0
votes

You can directly copy paste the WAR file to deployment folder if you are using standalone mode. There is no need to restart the EAP instance.

You can also copy paste exploded war file to deployment directory, but in that case, you have to enable deployment scanner for exploded contents from CLI or management console.