[ 
https://issues.apache.org/jira/browse/SUREFIRE-1686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Scholte closed SUREFIRE-1686.
------------------------------------
    Resolution: Not A Problem
      Assignee: Robert Scholte

It may be not too clear, but the documentation is correct. It means: if you 
specify the goal in the pom, it will automatically bind to the specified phase.

{code:xml}
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <executions>
          <execution>
            <!--  <phase></phase> -->
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
{code}

This is what you need to do. Because the phase is missing, each goal falls back 
to its default. Without these default you would have to specify 2 execution 
blocks, one for each phase and goals of the plugin you want to execute.


> Failsafe doesn't bind to lifecycle as documented
> ------------------------------------------------
>
>                 Key: SUREFIRE-1686
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1686
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Maven Failsafe Plugin
>    Affects Versions: 2.22.2
>            Reporter: Hüseyin Kartal
>            Assignee: Robert Scholte
>            Priority: Major
>
> When configured a pom as follow: 
> {noformat}
> <plugins>
>     <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-surefire-plugin</artifactId>
>     </plugin>
>     <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-failsafe-plugin</artifactId>
>     </plugin>
> </plugins>{noformat}
> the resulting effective-pom is: 
> {noformat}
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <version>2.22.2</version>
>         <executions>
>           <execution>
>             <id>default-test</id>
>             <phase>test</phase>
>             <goals>
>               <goal>test</goal>
>             </goals>
>           </execution>
>         </executions>
>       </plugin>
>       <plugin>
>         <artifactId>maven-failsafe-plugin</artifactId>
>         <version>2.22.2</version>
>       </plugin>
> {noformat}
>  The failsafe plugin doesn't bind its goals to the lifecycles as documented.
>  * Binds by default to the [lifecycle 
> phase|http://maven.apache.org/ref/current/maven-core/lifecycles.html]: 
> {{integration-test}}.
>  * Binds by default to the [lifecycle 
> phase|http://maven.apache.org/ref/current/maven-core/lifecycles.html]: 
> {{verify}}.
> To respect the convention over configuration aspect of maven, these default 
> bindings should be fixed. And should not needed to defined as done in the 
> examples in the documentation.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to