I've written a plugin that generate one file in target/generated-sources/. This plugin only has one mojo. This mojo is declared with the following :
/**
* @goal convertsql
* @phase generate-sources
* @requiresProject
*/
public class ConverterMojo extends AbstractMojo {
In the project, i want to use the plugin but it doesn't work if i don't specify the executions tag :
<executions>
<execution>
<id>convert</id>
<goals><goal>convertsql</goal></goals>
<phase>generate-sources</phase>
</execution>
</executions>
I would like to only configure the plugin like this :
<plugin>
<groupId>com.my.plugins</groupId>
<artifactId>sqlconverter</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<sourceFile>src/main/resources/sql/schema_oracle.sql</sourceFile>
</configuration>
</plugin>
Is it possible to specify the default mojo for my plugin ? The default goal and phase are defined in the mojo... I mean, when using the jar plugin, i don't have to tell the goal i want to execute, at which phase... it is automatic.
Thanks!