utPLSQL / utPLSQL-maven-plugin

Maven plugin for running Unit Tests with utPLSQL v3
Apache License 2.0
13 stars 11 forks source link

Mandatory goal in pom file #39

Closed jgebal closed 2 years ago

jgebal commented 5 years ago

pom.xml configuration requires the goal to be set explicitly - without it, plugin does not execute in test phase. Instead of this pom.xml content

    <build>
        <plugins>
            <plugin>
                <groupId>org.utplsql</groupId>
                <artifactId>utplsql-maven-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

I'd rather have this as minimum.

    <build>
        <plugins>
            <plugin>
                <groupId>org.utplsql</groupId>
                <artifactId>utplsql-maven-plugin</artifactId>
                <version>3.1.0</version>
            </plugin>
        </plugins>
    </build>
adrianhj commented 5 years ago

Whilst you can set a default phase for a goal, I don't believe you can set a default goal for a plugin.

You can provide a custom Maven lifecycle to achieve it, but this would be fairly intrusive for consuming projects. I think the right trade-off is default phase but explicit goal unfortunately.

simasch commented 2 years ago

As adianhj says this is not possible.