run maven exec-maven-plugin as last step

后端 未结 2 383
独厮守ぢ
独厮守ぢ 2021-01-11 15:12

I want to execute a command line script with exec-maven-plugin after \"mvn test\" How do I set this up under pom.xml?

2条回答
  •  有刺的猬
    2021-01-11 15:39

    The point of the ordering is, that you have to choose a phase for execution, which is behind the test-phase. You can see this in the Maven Build Lifecycle.

    For example, you could use prepare-package which is the phase directly after the test phase.

    BTW: Plugins, when configured in the same lifecycle, are executed in the order in which they are listed in the pom.xml.

提交回复
热议问题