0

I'm using the appengine-maven-plugin, and having a problem with its "update" goal -- it's executing the "package" phase as a prerequisite:

/**
 * @goal update
 * @execute phase="package"
 */
public class Update extends AbstractAppCfgMojo {
  @Override
  public void execute() throws MojoExecutionException, MojoFailureException {
....

However, I need it to do a "clean" first, then do the "package". Is there a way I can override this?

4

1 回答 1

1

你试过 ''mvn clean appengine:update" 吗?应该可以。

编辑:有一种方法可以在每次构建之前运行 mvn clean,这对你来说可能足够好了吗?请注意,这意味着每次运行 mvn appengine:devserver 时,本地 devserver 的数据存储都将被完全删除。(基于此页面):

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-clean-plugin</artifactId>
            <executions>
                <execution>
                    <phase>initialize</phase>
                    <goals>
                        <goal>clean</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

它将在每次构建之前执行清理。

于 2014-01-24T02:50:11.687 回答