mavenjbossfusefuseesbfabric8

automate deployment after making changes on fuse project


I'm using jBoss Fuse I created a fuse project on windows (as a machine for developement) and I deployed it by fabric8 on a linux machine (Centos) as a server (it's running right now) if followed these steps to deploy it:

  1. I copied the project from the windows machine to linux machine
  2. I did a maven install
  3. I did maven fabric8 deploy, it generated a profile
  4. I assigned that profile to a child container i created before

My question is: when I make changes on the application on windows and I want to apply these changes to the deployed app on the server, what should I do ? knowing that I don't want to stop the deployed app? Is there any other way to deploy the application directly from the windows to a remote server (Centos on my case) Thanks


Solution

  • You can edit your pom.xml adding the following configuration

    <distributionManagement>
     <repository>
        <id>fabric8.vm</id>
        <name>Fabric Maven</name>
        <url>http://<vm ip>:<port, default 8181>/maven/upload</url>
      </repository>
    </distributionManagement>
    

    Then you can use the command for deploy into your VM

    mvn clean deploy
    

    If your VM network settings is of type "NAT", you have to do a port forward from your host machine to the vm (virtual box -> settings -> network tab -> port forward then create a new rule IP host: 127.0.0.1, host port: 9000, guest IP 10.0.2.15 guest port: 8181) then you can use the url <url>http://localhost:9000/maven/upload</url>