Google app engine maven使用google app engine和google web toolkit构建生命周期

Google app engine maven使用google app engine和google web toolkit构建生命周期,google-app-engine,gwt,maven,build,lifecycle,Google App Engine,Gwt,Maven,Build,Lifecycle,Maven具有以下默认生命周期步骤: validate - validate the project is correct and all necessary information is available compile - compile the source code of the project test - test the compiled source code using a suitable unit testing framework. These tests should

Maven具有以下默认生命周期步骤:

validate - validate the project is correct and all necessary information is available
compile - compile the source code of the project
test - test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed
package - take the compiled code and package it in its distributable format, such as a JAR.
integration-test - process and deploy the package if necessary into an environment where integration tests can be run
verify - run any checks to verify the package is valid and meets quality criteria
install - install the package into the local repository, for use as a dependency in other projects locally
deploy - done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.
maven gwt插件支持:gwt:compile

maven-gae插件支持:gae:deploy

但最底层的两个并不是默认maven生命周期的一部分(至少在我们的pom中是这样)。那么,在我们的构建机器上,我们应该在上面运行什么呢


我们目前正在运行“mvn测试gwt:compile gae:deploy”。这是对的吗?

许多插件没有连接到默认的生命周期中,因为它们会做一些“奇怪”的事情,而这些事情通常并不有用。例如,GWT编译器需要很长时间

如果要将此类插件添加到阶段,请使用
执行
块():


org.codehaus.mojo
GWTMaven插件
2.4.0
编译
编译
这将在
编译
阶段调用插件的目标
编译

注意,对于GWT插件,
阶段是可选的;如果调用
compile
,插件将做正确的事情


deploy
有点麻烦,因为剩下的阶段:包太早了,它应该在
测试之后和
安装之前进行。因此,对于
deploy
,您可以尝试不同的阶段。如果没有任何结果,您仍然需要调用
mvn测试gae:deploy

许多插件没有连接到默认生命周期中,因为它们会做一些“奇怪”的事情,而这些事情通常并不有用。例如,GWT编译器需要很长时间

如果要将此类插件添加到阶段,请使用
执行
块():


org.codehaus.mojo
GWTMaven插件
2.4.0
编译
编译
这将在
编译
阶段调用插件的目标
编译

注意,对于GWT插件,
阶段是可选的;如果调用
compile
,插件将做正确的事情


deploy
有点麻烦,因为剩下的阶段:包太早了,它应该在
测试之后和
安装之前进行。因此,对于
deploy
,您可以尝试不同的阶段。如果没有结果,您仍然需要调用
mvn测试gae:deploy

注意gwt:compile默认绑定到预包阶段,而不是编译阶段(因此它在测试阶段之后运行)注意gwt:compile默认绑定到预包阶段,而不是编译阶段(因此它在测试阶段之后运行)
  <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>gwt-maven-plugin</artifactId>
    <version>2.4.0</version>
    <executions>
      <execution>
        <phase>compile</phase>
        <goals>
          <goal>compile</goal>
        </goals>
      </execution>
    </executions>
  </plugin>