What is the significance of the POM file that Maven places in a JAR file, is it used by anything?

前端 未结 2 1005
没有蜡笔的小新
没有蜡笔的小新 2020-12-16 11:41

When Maven builds a JAR file, it places the module\'s POM file inside (seemingly in the directory /).

When I build a JAR file from A

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-16 12:06

    The pom.xml inside JAR is designed for following purposes,

    1. Automatic dependency resolution.
    2. Deployment of JAR. It's possible to extract pom.xml from JAR automatically.
    3. Integrity check by repository (JAR matches POM).

    I don't know if any of these features are implemented anywhere. You can ignore it for sure.

提交回复
热议问题