java - Disabling goals in a maven plugin execution -


i have setup of projects require xtend plugin run both compile , testcompile goals. describe in pluginmanagement section:

<plugin>     <groupid>org.eclipse.xtend</groupid>     <artifactid>xtend-maven-plugin</artifactid>     <version>2.5.3</version>     <executions>         <execution>             <goals>                 <goal>compile</goal>                 <goal>testcompile</goal>             </goals>         </execution>     </executions> </plugin> 

now, there projects don't need 1 goal or other. i've tried inherited tag, played around random attributes none worked. how can override execution contain desired goal?

update: conclusion of story individial goals cannot disabled. smallest scope can managed execution.

generally, can disables executions trick:

set executions phase non existant phase (dont-execute). note however, have use 2 different execution ids allow both goals individually turned off:

<plugin>     <groupid>org.eclipse.xtend</groupid>     <artifactid>xtend-maven-plugin</artifactid>     <version>2.5.3</version>     <executions>         <execution>             <id>xtend-compile</id>             <goals>                 <goal>compile</goal>                 <goal>testcompile</goal>             </goals>         </execution>         <execution>             <id>xtend-testcompile</id>             <goals>                 <goal>testcompile</goal>             </goals>         </execution>     </executions> </plugin> 

submodule:

<plugin>     <groupid>org.eclipse.xtend</groupid>     <artifactid>xtend-maven-plugin</artifactid>     <version>2.5.3</version>     <executions>         <execution>             <id>xtend-testcompile</id>             <phase>dont-execute</phase>         </execution>     </executions> </plugin> 

in specific case, could, of course, use skipxtend configuration property in each execution not skip execution, prevent plugin doing anything:

<plugin>     <groupid>org.eclipse.xtend</groupid>     <artifactid>xtend-maven-plugin</artifactid>     <version>2.5.3</version>     <executions>         <execution>             <id>xtend-testcompile</id>             <configuration>                 <skipxtend>xtend-testcompile</skipxtend>             </configuration>         </execution>     </executions> </plugin> 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -