In this short tech tip, we will learn how to call a Maven plugin from the Command Line (i.e. a Plugin which is not included in your pom.xml file)
With maven, you normally invoke plugin’s goals in this way:
so, for example, if you have declared the WildFly Maven plugin in your configuration:
<plugin> <groupId>org.wildfly.plugins</groupId> <artifactId>wildfly-maven-plugin</artifactId> <version>2.0.1.Final</version> </plugin>
Then, you could invoke the “deploy” goal as follows:
However, it’s possible to invoke plugin goals from the Command Line, without any definition in the pom.xml. How? simply replace your plugin alias with its GAV (groupId, artifactId, version).
So, if you were to deploy an application into WildFly, without a plugin definition, here’s how to do it: