How to set version when deploying gae java?

前端 未结 4 847
悲&欢浪女
悲&欢浪女 2021-01-22 06:43

Since Intellij Idea IDE gae deployment plugin does not work, I have to use mvn appengine:update. It always deploy to version 1, ignoring version in appengine-web.xm

相关标签:
4条回答
  • 2021-01-22 06:57

    You can set it via a Maven property:

    <properties>
        <appengine.appId>my-application-id</appengine.appId>
        <appengine.version>my-application-version</appengine.version>
    </properties>
    

    PS: I'm also setting the applicationId here, you don't necessarily need that.

    0 讨论(0)
  • 2021-01-22 07:01

    Another way is, don't add anything on the app engine plugin as it is hard to changes each time the pom.xml better pass the version information from the command line, like this

    mvn clean package appengine:deploy -Dapp.deploy.version=your-version-here
    

    reference document here

    0 讨论(0)
  • 2021-01-22 07:02

    Add the following into the plugins section in the project pom.xml file:

    <plugin>
        <groupId>com.google.cloud.tools</groupId>
        <artifactId>appengine-maven-plugin</artifactId>
        <version>2.2.0</version>
        <configuration>
            <deploy.projectId>java</deploy.projectId>
            <deploy.version>1</deploy.version>
        </configuration>
    </plugin>
    
    0 讨论(0)
  • 2021-01-22 07:13

    Set the version in plugin property

    <plugin>
        <groupId>com.google.cloud.tools</groupId>
        <artifactId>appengine-maven-plugin</artifactId>
        <version>1.3.2</version>
        <configuration>
          <version>2</version>
        </configuration>
      </plugin>
    
    0 讨论(0)
提交回复
热议问题