The Maven plugin goal database:run
crashes when I try to run it without specifying the modules where it's defined.
My project has four modules (main
, core
, cli
, and web
) and I added a database plugin only in two of them (cli and web), in the standard form:
<plugin>
<groupId>org.tools.database</groupId>
<artifactId>database-maven-plugin</artifactId>
<version>1.0.3</version>
<configuration>
...
</configuration>
</plugin>
It works well when I run:
mvn -pl cli,web database:run
But crashes if I omit the module's list:
mvn database:run
No plugin found for prefix 'database' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories...
Do I need to also define the plugin it in the main
module/project, so it doesn't crash? But it wouldn't make sense... would it? Is this the expected behavior? I would prefer the shorter command line, if possible.