You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@apache.org> on 2018/09/23 10:32:00 UTC

[jira] [Commented] (MNG-5668) post- should always be executed after

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

Robert Scholte commented on MNG-5668:
-------------------------------------

Since lifecycle are written as components, only XMLelements can be used. Inspired by [Ant|http://ant-contrib.sourceforge.net/tasks/tasks/trycatch.html] we could do something similar:

{code:xml}
<tryfinally>
  <try>
    <phases>
      <phase>pre-integration-test</phase>
      <phase>integration-test</phase>
    </phases>
  </try>
  <finally>
    <phases>
      <phase>pre-integration-test</phase>
    </phases>
  </finally>
</tryfinally>
{code}

> post-<phase> should always be executed after <phase>
> ----------------------------------------------------
>
>                 Key: MNG-5668
>                 URL: https://issues.apache.org/jira/browse/MNG-5668
>             Project: Maven
>          Issue Type: Sub-task
>          Components: FDPFC, Plugins and Lifecycle
>            Reporter: Robert Scholte
>            Assignee: Robert Scholte
>            Priority: Major
>
> Original proposal:
> {quote}
> There are right now 3 phases which also have a pre-<phase> and post-<phase>, namely integration-test, clean and site. However, even if one has bound goals to the post-phases, they're probably never called.
> When there's an integration-test starting up some server, you'd probably always want to kill it no matter what happens during the IT (let say a NPE).
> The proposal is to execute the post-<phase> as the finally block in Java. If you really want to execute only the integration-test without the post, the phase should be marked, e.g. 'mvn [integration-test]', where the brackets lock the phase.
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)