3

I have my Java project in a Hg repository. How can I use this code or convert to Git repo to be able to deploy on Cloud Control?

Is there an Option for me to use a .war file to Deploy instead of the entire file structure upload and compile? If so, would it matter if the war file was built using Tomcat server or Glass-fish server?

Your help in answering these question will be a valuable information for me. Appreciate your help in advance.

Best Regards.

Abdullah.M
  • 61
  • 7

1 Answers1

3

If you want to keep all mercurial branches, tags and history use fast-export. Otherwise just create git repository from scratch:

git init; git add . ; git commit -am "Initial commit"

Deploying prebuilt war file is not the recommended way. You should push to the repository (via git or cctrlapp) and let cloudControl platform take care of the build process. Anyway you can still use Maven to download the war file. You can find some examples here.

Apart from this you have to provide an embedded jetty or tomcat runner and specify start command in Procfile:

Jetty:

web: java -jar target/dependency/jetty-runner.jar --port $PORT target/YOU_WAR.war

Tomcat:

web: java -jar target/dependency/webapp-runner.jar --port $PORT target/YOUR_WAR.war

Keep in mind that war file should be built independently of any application servers.

Community
  • 1
  • 1
mkorszun
  • 4,461
  • 6
  • 28
  • 43