Maven generates duplicate pom.xml and pom.properties files in a jar

前端 未结 6 966
北海茫月
北海茫月 2020-12-15 04:50

I package my Maven-based Spring app with:

mvn install-DskipTests -Peverything. 

And something strange arises. In META-INF of generated jar,

6条回答
  •  太阳男子
    2020-12-15 05:38

    Follow up to @Dan's work around:

    I tried your solution and it appears to work -- at first blush. However, it's just delaying the eventual failure.

    It appears than anytime the workspace is refreshed the pom.xml and pom.properties files are created in the /classes directory. After that any later "package" goal will include the duplicate files in the .jar and thus break any later signing.

    If the polling is on - you "fail-fast". If it's off you can fail at arbitrary times in future builds.

提交回复
热议问题