在pom.xml中找到了id default的重复执行

时间:2016-06-06 09:41:27

标签: maven pom.xml execution

如何解决重复执行的问题。

  

' build.pluginManagement.plugins.plugin [org.flywaydb:飞路-行家-插件] .executions.execution.id'必须是唯一的,但发现具有id default

的重复执行

这是源代码:

             <plugin>
                <groupId>org.flywaydb</groupId>
                <artifactId>flyway-maven-plugin</artifactId>
                <version>4.0.1</version>
                <configuration>
                    <user>tkmadmin</user>
                    <password>ticketmaster</password>
                </configuration>
                <executions>
                    <execution>
                        <phase>initialize</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>migrate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

1 个答案:

答案 0 :(得分:11)

将明确的<id>添加到您的<execution>

<execution>
    <id>flyway-clean</id>
...
<execution>
    <id>flyway-migrate</id>

参考:Maven / POM Reference, Plugins