Search code examples
mavenspring-mvcintellij-ideacloudwar

Why *.war file is not unpack inside cloud webapps when deploy?


I am trying to create a spring-MVC project by using “IntelliJ IDEA”. I have created a .war file in this project. To send the war file inside Google Cloud I used “fileZilla”. My expectation is the war file should unpack/extract by automatically, once I do drag and drop war file from local PC to the cloud using fileZilla. In meanwhile, I run my spring-MVC program in browser by running:

143.9.xxx.xxx:8080/nameOfProgramme  

It should work. However, when I try to tranfer .war file from local to cloud, the .war file does not unpack. I have tried to run in terminal by using unzip nameOfProgramme.war on first time it can unpack, but when i tried to upload again the same program (by delete the previous program first). It still does not work.

Any of you have idea how to solve this problem?


Solution

  • You cannot deploy a *.war file in App Engine as you do in TomCat. You can deploy a project to GOOGLE APP ENGINE:

    Using Maven (recommended)

    To deploy your app with Maven, run the following command from your project's top level directory, where the pom.xml file is located.

    If you are using the App Engine SDK-based Maven plugin, use the command:

    mvn appengine:update

    If you are using the Cloud SDK-based Maven plugin, use the command:

    mvn appengine:deploy

    .....

    Using appcfg

    To deploy your app, run the appcfg command with the update action and the directory path of your WAR file, for example:

    ./appengine-java-sdk/bin/appcfg.sh [options] update [WAR_LOCATION]
    

    ......

    See these docs for the complete instructions.