2 Replies Latest reply on Nov 16, 2016 1:23 PM by José Antonio Delgado Trujillo

    Hot deployment

    José Antonio Delgado Trujillo Newbie

      I have several problems with hot deployment a web module and the adapter server for Eclipse.

       

      Inside of Eclipse i run configuration with the goals wildly:deploy.

      The adapter server doesn't see the war but i can see it in the admin console.

       

      If i change my class i can't see the change in the browser so i have to deploy again.

      Why doesn't run hot deployment??

        • 1. Re: Hot deployment
          Rob Stryker Master

          Hi Jose:

           

          In JBossTools, we don't use maven goals to deploy artifacts. First, you need to make sure you have JBossTools installed, as well as m2eclipse. When you import your project, you should import it as a maven project. The m2eclipse tools will try to convert your project into a dynamic web project, or an ear project, if possible.

           

          Next, you'll need to create a server adapter. You can do this by opening the server's view, right-clicking, and selecting new server. You'll need to locate your local server installation, and choose your profile. In this case, the defaults will all probably work for you.

           

          Once you have a server adapter created, you need to right-click your server in the server's view, and start it in debug mode. If you've already started your server via the command line, you should terminate it before doing this. Launching via the server's view is the best supported method for starting your server in debug mode.

           

          Once your server is started, you should right-click on the server adapter and select "Add / Remove Modules". From here you can add your project into your server, and it will publish it. From this moment on, any changes you make to your project's class files will be automatically applied to your application via the eclipse debugger. Any changes you make to resource files such as html files should also be immediately represented, and your breakpoints will get hit correctly. Resource files may vary, depending on who uses them and how.

           

          Any changes to a class structure will probably trigger a hotcode replace failure, and it may ask you to redeploy your module. The dialog that asks you to do so will have a button you can click to redeploy the modules.

           

          I'm not exactly sure what the maven goal wildly:deploy does. That would probably depend on your pom? I'm also not sure if it deploys via compressed archive, exploded archive, or deploys over the management port.

           

          A video or screencast of your problem will help me understand your workflow better, and suggest better options for you.

           

          Good luck!

          • 2. Re: Hot deployment
            José Antonio Delgado Trujillo Newbie

            Ok Rob i have a little mess.

             

            I have installed Jboss as tools and the Neon Eclipse has incorporated m2eclipse.

            I have been tested several frameworks for web tire (struts2, JSF and vaadin).

            Normally i create the archetype, then i modify the POM to use wildfly-maven-plugin in the bild section, the i create the war using Run as / Maven install and finally i add the war with the adapter server. That is ok with JSf and struts2 but not with vaadin.

             

            Whit your answer, i tried ti use Run as on server and select the wildfly server.

            The war is not in the folder target but is deployed in the local server and i can see it in the server adapter.

            Only one problem with the name. it adds the version at the final of the name even i use the element <finalName>${project.artifactId}</finalName>

             

            When i create a simple vaadin arquetype app and deployed with (Run as server) it runs fine the first time but then i only see forbidden in the browser.

             

            So:

            IF i deploy with Jboss as tools (Run on server) the war is only in the folder of deployment and not in the target folder of the project???

            If i deploy with Run as / maven install and then added the war with the adapter server (Is not the correct way to do it?)