Maven ignores execution configuration when specific execution is in progress

I have a Maven plugin configuration that I want to run from the CLI. It looks like this:

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>dbunit-maven-plugin</artifactId>
            <version>1.0-beta-3</version>
            <configuration>
                <driver>${knossos.jdbc.driver}</driver>
                <url>${knossos.jdbc.url}</url>
                <username>${knossos.jdbc.user}</username>
                <password>${knossos.jdbc.password}</password>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>com.mycompany</groupId>
                    <artifactId>db</artifactId>
                    <version>${project.version}</version>
                </dependency>
            </dependencies>
            <executions>
                <execution>
                    <id>fill-dabatase</id>
                    <phase>test</phase>
                    <goals>
                        <goal>operation</goal>
                    </goals>
                    <configuration>
                        <type>INSERT</type>
                        <src>src/test/resources/data/full.xml</src>
                    </configuration>
                </execution>
            </executions>
        </plugin>

      

According to new Maven feature, I am doing

mvn initialize dbunit:operation@fill-database

      

This should execute, but it does not fail when getting the "src" and "type" config parameters

[ERROR] Failed to execute goal org.codehaus.mojo:dbunit-maven-plugin:1.0-beta-3:operation (fill-database) on project KnossosWebApp: The parameters 'src', 'type' for goal org.codehaus.mojo:dbunit-maven-plugin:1.0-beta-3:operation are missing or invalid -> [Help 1]

      

But when I do the same execution even though the Maven phase is "test", it works fine.

mvn test

      

Is the Maven plugin a problem? As a temporary workaround, I moved the run configuration to the plugin config. So it works for both phases and execution targets.

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>dbunit-maven-plugin</artifactId>
            <version>1.0-beta-3</version>
            <configuration>
                <driver>${knossos.jdbc.driver}</driver>
                <url>${knossos.jdbc.url}</url>
                <username>${knossos.jdbc.user}</username>
                <password>${knossos.jdbc.password}</password>
                <type>INSERT</type>
                <src>src/test/resources/data/full.xml</src>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>com.mycompany</groupId>
                    <artifactId>db</artifactId>
                    <version>${project.version}</version>
                </dependency>
            </dependencies>
            <executions>
                <execution>
                    <id>fill-dabatase</id>
                    <phase>test</phase>
                    <goals>
                        <goal>operation</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

      

+3


source to share