maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SUREFIRE-1686) Failsafe doesn't bind to lifecycle as documented
Date Wed, 07 Aug 2019 21:45:00 GMT

    [ https://issues.apache.org/jira/browse/SUREFIRE-1686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16902489#comment-16902489
] 

Robert Scholte commented on SUREFIRE-1686:
------------------------------------------

> Obviously the documentation of the failsafe plugin means something different than the
documentation of the surefire (and quite all other plugins).

It doesn't mean something different. Try to make a project with packaging pom: Its lifecycle
bindings are: install:install for during the install phase, deploy:deploy during the deploy
phase. If you add maven-surefire-plugin as maven-failsafe-plugin above, but with goal test,
you'll see that it is picked up without specifying the phase.

You're proposal is will have a huge negative impact. Suppose one only adds the [build-helper-maven-plugin|https://www.mojohaus.org/build-helper-maven-plugin/].
According to your idea every goal that it bound to a phase should be executed.

I hope this explains the concepts a bit better.

> 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)

Mime
View raw message