Maven shade plugin adding dependency-reduced-pom.xml to base directory

后端 未结 5 1977
梦如初夏
梦如初夏 2020-12-13 23:21

The maven shade plugin is creating a file called dependency-reduced-pom.xml and also artifactname-shaded.jar and placing them in the base directory.

<
5条回答
  •  無奈伤痛
    2020-12-13 23:59

    Based on bmargulies' answer and his comment on Xv.'s answer, I decided to configure the dependency-reduced POM to be output to target/, which is already ignored in my VCS.

    To do that, I just added the dependencyReducedPomLocation element to the configuration element of the plugin, i.e.

    
      ${project.build.directory}/dependency-reduced-pom.xml
      (...)
    
    

提交回复
热议问题