Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Found duplicate execution with id default in pom.xml

How to resolve issue with duplicate executions.

'build.pluginManagement.plugins.plugin[org.flywaydb:flyway-maven-plugin].executions.execution.id' must be unique but found duplicate execution with id default

Here is source code:

             <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>
like image 497
max mazurkevych Avatar asked Jun 06 '16 09:06

max mazurkevych


1 Answers

Add explicit <id>s to your <execution>s:

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

Reference: Maven / POM Reference, Plugins:

  • executions: ...

    ...
    
  • id: Self explanatory. It specifies this execution block between all of the others. When the phase is run, it will be shown in the form: [plugin:goal execution: id].

like image 55
Gerold Broser Avatar answered Sep 24 '22 15:09

Gerold Broser