Maven package error: An attached artifact must have a different ID than its corresponding main artifact

后端 未结 4 956
你的背包
你的背包 2021-02-19 16:24

Geting this error on: mvn package

It fails to build every time with the same error, I\'ve tried renaming the artifact, as well as changing dependencies for build in the

4条回答
  •  终归单人心
    2021-02-19 17:15

    Looks like a bug in spring-boot-maven-plugin together with your version of Maven.

    As far as I can tell, Maven knows that the WAR plugin will generate the file target/compiled-1.0-SNAPSHOT.war. when it asks the spring-boot-maven-plugin for its output, it will get the same name. Since Maven doesn't know what the plugin does, it will assume that both are configured to create the same output file and stop since that can't be what you want (the files will overwrite each other).

    Try with the latest version of Maven or file a bug against the spring-boot-maven-plugin. Let them know which version of Maven you're using.

提交回复
热议问题