5 Replies Latest reply on Dec 21, 2012 6:09 AM by maxandersen

    Full Publish required in Eclipse to realize changes?

    weslowsk

      Hi,

       

      When I deploy a web application to JBoss AS 7, I would like to be able to make changes in Eclipse and see them reflected in my application.

      It seems the only way this can be done is by restarting the server or right clicking on my project in the Servers view (in Eclipse) and clicking "Full Publish". I'm used to using Tomcat and just hitting the publish icon (next to the stop button) in the Servers view or turn on automatic publishing and set an appropriate interval in my server settings and have the changes published and realized at those intervals without having to click the publish icon at all.

      Is there a way to make my changes in Eclipse get realized in JBoss more like I'm used to with Tomcat?

       

      Kevin

        • 1. Re: Full Publish required in Eclipse to realize changes?
          dgolovin

          Incremental publishing should be enabled by default. Check it in Server Configuration Editor by double clicking on server isntance in Servers view expanding Publishing grop in the right top corner (see emage below)

          server-editor.png

          • 2. Re: Full Publish required in Eclipse to realize changes?
            weslowsk

            I'm aware of that setting but it doesn't work for me. Any idea why this wouldn't work for me?

             

            Here's what I needed to do to get the server just to start properly for me in Eclipse:

             

            https://community.jboss.org/message/743860#743860

             

            So, I noticed your pollers are both different from mine (web port)...because I had to change mine to get the server to start properly.

            • 3. Re: Full Publish required in Eclipse to realize changes?
              maxandersen

              Hi Kevin,

               

              Changes to html, xhtml, jsf, images and other dynamically loaded resources should take effect immediately.

               

              Changes to .class files do not get automatically reloaded by JBoss (for various reasons, mostly related to have Java classloading works and that

              if you are testing your application then triggering a reload of application/module will break your running session etc.) .

               

              We know that can be annoying and thus we introduced a "Application reload behavior" in the server section where you can setup a regular expression to

              trigger on what files you want a module restart to happen.

               

              In here the default expression is: ".jar$" which means if it sees a file ending with jar be deployed it will trigger an application reload.

               

              But it will not reload if just a single .class is changed.

               

              If you change it to ".jar$|.class$" then it will trigger a restart on every .jar/.class change.

               

              This gives a good balance since then when changing *.xhtml you do not see a forced restart.

               

              of course if you want to be truly agressive you can set the expression to ".*" and you will see restarts of your module on *every* change.

              • 4. Re: Full Publish required in Eclipse to realize changes?
                khooke

                I'm currently using JBoss Dev Studio 5.0.1GA with AS7.1.0Final and the automatical publishing even of html and jsp pages does not always happen automatically, even with the setting mentioned above set. It seems to work for some projects but not others. For projects which it is not working with, the only way to get a change to a jsp reflected on the server is to do a full publish.

                 

                Any ideas where I can look or what settings I should look at?

                • 5. Re: Full Publish required in Eclipse to realize changes?
                  maxandersen

                  Are the files actually published into the server deployments folder in exploded/unzipped form ?

                   

                  if not then AS7 won't hotredeploy.

                   

                  jsp pages AS7 does not hot compile by default - maybe that is what is causing you problems ?