maven release plugin ignores releaseProfile

后端 未结 4 2004
走了就别回头了
走了就别回头了 2021-01-02 00:55

I am using two profiles: development and production.

Development should be active on default; production should be used when I am releasing.

In my pom.xml I

4条回答
  •  说谎
    说谎 (楼主)
    2021-01-02 01:52

    The maven-release-plugin documentation encourages using the releaseProfiles configuration parameter to automatically invoke profiles during the release process.

    This is a better approach than manually invoking release profiles from the command-line. One reason, is because the profiles used in the release will be documented in the pom.xml and stored with the tagged code. This makes the build process easier to understand and easier to repeat later, exactly the same way the project was originally released.

    If using maven-release-plugin older than 2.4 see this bug preventing use of the above mentioned parameter.

    Be aware that in case of a multi-module project you'll have to put the "releaseProfiles" configuration in the root pom! See also this issue for more information about that.

提交回复
热议问题