Hi I am new to Maven I am wondering how can I use a plugin without attach its goal to a particular phase. So for example I want to use shade plugin to create uber-jar(fat jar).
Goals Overview
The Shade Plugin has a single goal:
shade:shade is bound to the package phase and is used to create a shaded jar.
So the plugin has only one goal called shade
.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>shade</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
So I said 'Hey Maven' I want to attach shade's plugin goal shade
to your package
lifecycle. OK but what if I remove executions configuration. What happens then can Maven understand where to put the shade goal? Does every plugin put its goals to predefined from its creator phase? And how can understand which is it this phase?
Aforementioned documentation description said the the goal is bound to package phase. Does it mean that my executions configuration is redundant?