Maven: avoid deploying project package-implied artifact during standard build lifecycle

前端 未结 1 760
走了就别回头了
走了就别回头了 2021-01-19 02:43

Is it possible to avoid deploying the artifact that is built according to the project packaging during \'deploy:deploy\' processing?

I mean the following:

1条回答
  •  有刺的猬
    2021-01-19 02:59

    According to the Maven Deploy Plugin documentation:

    deploy:deploy is used to automatically install the artifact, its pom and the attached artifacts produced by a particular project. [...]

    So I don't think it's possible to prevent your war from being deployed "as is".

    However, to obtain the desired effect, you could add a specific module to your build that would be in charge of producing the assembly (the assembly would depend on the war module) and configure the deploy plugin in the war module to skip deployment as follows:

             
               maven-deploy-plugin
               X.Y
               
                 true
               
             
    

    0 讨论(0)
提交回复
热议问题