10 Replies Latest reply on Jul 17, 2002 6:51 PM by David Jencks

    Redeploying exploded WAR?

    Rickard Öberg Newbie

      I have managed to deploy an exploded WAR file, by pointing the URLDirectoryScanner to a directory whose name is suffixed by ".war". I have not been able to redeploy it however. The debug messages suggest that updating web.xml should redeploy it, but that's not working. Any ideas? I've read through the deployer code, but couldn't find what's wrong, or if there are any settings to take note of.

      Using 3.0.0/Jetty.

      /Rickard

        • 1. Re: Redeploying exploded WAR?
          Rickard Öberg Newbie

          I just downloaded the 3.1.0 CVS snapshot, and the URLDirectoryScanner is gone. The remaining scanner, URLDirectoryScanner, did not like exploded directories (it tried to deploy index.html), so what then? How do I deploy and redeploy exploded WAR files?

          • 2. Re: Redeploying exploded WAR?
            Adrian Brock Master

            I can't say that I've tried the directory scanner.
            The default URLDeploymentScanner works or me providing
            you specify the parent directory of the exploded WAR.

            Regards,
            Adrian

            • 3. Re: Redeploying exploded WAR?
              marc fleury Master

              fuck me... prove you are THE rickard oberg :)

              • 4. Re: Redeploying exploded WAR?
                marc fleury Master

                I will even answer that one for you (just in case you are my Rickard Oberg). Name your directory something.war/

                • 5. Re: Redeploying exploded WAR?
                  marc fleury Master

                  Oh wait you are talking about redeploy... hmmmmm that should work if not it is a bug

                  • 6. Re: Redeploying exploded WAR?
                    Rickard Öberg Newbie

                    (yeah yeah, it's me, ;-)

                    Anyway, what seems to happen is that if I point the scanner to the parent directory it will deploy all directories in there, and I just want it to deploy this particular one. Which is what the URLDirectoryScanner used to provide, but now that's gone (and even that one didn't allow for redeploy).

                    It seems so close. The dir scanner could deploy a particular exploded directory, and it even set the right watch URL (i.e. to the web.xml file), but when I touched that file nothing happened.

                    If this could work JBoss will be very nice to use for development. Otherwise it's back to the painful "redeploy the whole EAR" thing.

                    BTW, is there a way to *explicitly* tell JBoss to redeploy it? Some client tool to invoke? That would work too, even better really.

                    I tried looking in the docs, and also searching the forums, but came up empty.

                    /Rickard, who-I-guess-should-know-this-but-don't

                    • 7. Re: Redeploying exploded WAR?
                      marc fleury Master

                      > (yeah yeah, it's me, ;-)

                      prove it, what are you working on now :)

                      > It seems so close. The dir scanner could deploy a
                      > particular exploded directory, and it even set the
                      > right watch URL (i.e. to the web.xml file), but when
                      > I touched that file nothing happened.

                      That's a bug. File it.

                      > BTW, is there a way to *explicitly* tell JBoss to
                      > redeploy it? Some client tool to invoke? That would
                      > work too, even better really.

                      hmmm right now there is the MainDeployer interface of course, you might want to take a look at that, but other than that I agree that we should make the individual deployment an MBean and have it support a "redeploy" operation. You might want to take a look at the "DeploymentInfo" which is the internal representation of the deployment. This guy should be in the navigation of the MBean stuff so you could just click on the subdeployment and click on "redeploy" as opposed to entering the URL everytime (and I don't know that the support for exploded subURLs really works).

                      > /Rickard, who-I-guess-should-know-this-but-don't

                      :) nah, just keep the QA coming and the ideas. You know we like your ideas around here.

                      • 8. Re: Redeploying exploded WAR?
                        Rickard Öberg Newbie

                        > prove it, what are you working on now :)

                        AOP and a CM system :-)

                        > hmmm right now there is the MainDeployer interface of
                        > course, you might want to take a look at that, but
                        > other than that I agree that we should make the
                        > individual deployment an MBean and have it support a
                        > "redeploy" operation. You might want to take a look
                        > at the "DeploymentInfo" which is the internal
                        > representation of the deployment. This guy should be
                        > in the navigation of the MBean stuff so you could
                        > just click on the subdeployment and click on
                        > "redeploy" as opposed to entering the URL everytime
                        > (and I don't know that the support for exploded
                        > subURLs really works).

                        As long as the URL is the same I don't care, because Ant will be doing the clicking.

                        /Rickard

                        • 10. Re: Redeploying exploded WAR?
                          David Jencks Master

                          in particular, try the main deployer redeploy (String) op. It works to redeploy a .war inside a deployed exploded .ear. You can use this from the web jmx interface or through ant. I've been finding the ant task really handy to include in build scripts.