6 Replies Latest reply on Jul 7, 2010 1:40 AM by rob.stryker

    Automatic "touch" of web.xml after build

    trincao

      Hello,

       

      I've configured an eclipse webapp project with Jboss Tools for exploded deployment using "Project Archives" and I'd like to have it automatically touch web.xml descriptor after every build. What is the best way to do this?

       

      Thanks in advance!

      Goncalo

        • 1. Re: Automatic "touch" of web.xml after build
          rob.stryker

          There is currently no way to do this in project archives. Only regular wtp-project deployment automatically touches xml files.          

          1 of 1 people found this helpful
          • 2. Re: Automatic "touch" of web.xml after build
            trincao

            :/ too bad, I believe it would be a nice feature.

            Thanks for the help!

            • 3. Re: Automatic "touch" of web.xml after build
              dgolovin

              Feel free to create this feature request in our JIRA https://jira.jboss.org/browse/JBIDE.

               

              As a workaround I would suggest to write a simple ant build.xml witch would use touch task to touch your *.xml files or certan ones. Add ant builder with this build.xml into list of builders in project properties. Do not forget setup right options for refresh tab in ant builder configuration dialog.

              • 4. Re: Automatic "touch" of web.xml after build
                maxandersen

                touching web.xml (or any descriptors) automatically after every build is really an antipattern we should not enforce...most times it should be enough to simply update the right files - touching the descriptors on every build would trigger too many restarts IMO

                • 5. Re: Automatic "touch" of web.xml after build
                  trincao

                  Hi. Thanks for the feedback.

                  But what do you mean by "update the right files"?

                   

                  Maybe it's better with an example. Let's say I have a session bean to update. Is it possible to just reload the class file of the session bean in JBoss AS?

                   

                  Cheers.

                  Gonçalo

                  • 6. Re: Automatic "touch" of web.xml after build
                    rob.stryker

                    What Max is saying is that restarting the module every single time you save a changed class file is too much overhead and will slow you down. It is not a good suggested use-case to restart the module after every single publish.

                     

                    There is currently no way for standard EJBs to hot-swap changed class files, and so you're right in that a full publish is needed... but the user should be required to do that himself, because if after every single 'save' the module was restarted, it could slow down your development substantially.

                     

                    Of course I can see your argument to the contrary, if every time you wanted to reload the classes you had to by-hand go 'full publish' the module. However as of now, this is not possible. Sorry.