java - Can we add maven plugin without attach its goal to a particular phase? -


hi new maven wondering how can use plugin without attach goal particular phase. example want use shade plugin create uber-jar(fat jar).

goals overview

the shade plugin has single goal: 

shade:shade bound package phase , used create shaded jar.

so plugin has 1 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 said 'hey maven' want attach shade's plugin goal shade package lifecycle. ok if remove executions configuration. happens can maven understand put shade goal? every plugin put goals predefined creator phase? , how can understand phase?

aforementioned documentation description said the goal bound package phase. mean executions configuration redundant?

ok if remove executions configuration happens can maven understand put shade goal?

if remove executions configuration plugin not run

does every plugin put goals predefined creator phase?

each goal can have default phase. if phase not specified , default phase defined, goal execute during phase of build cycle.

and how can understand phase?

this specified in plugin documentation

aforementioned documentation description said the goal bound package phase. mean executions configuration redundant?

in configuration phase reduntant.

see https://maven.apache.org/guides/mini/guide-configuring-plugins.html#using_the_executions_tag additional info.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -