Alex Rivera | Logout

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

Asked 2009-11-05T02:41:48.837
27

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

When I build a JAR file from Ant to be deployed via the Maven Ant tasks, is the presence of this POM file (the one inside the JAR) important? It doesn't seem to be, but I just wanted to be sure that it is not being used anywhere, and to confirm where exactly in the JAR file it is supposed to be.

Edit
Report

1 Answer

5

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.

answered 2009-11-05T02:54:36.767

Your Answer