Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are .pom files in Maven build artifacts?

You can see from browsing any repository that Maven build artifacts contain .pom files. The contents of these files look a whole lot like pom.xml files. Where do these files come from? What are they used for? Additionally, build artifacts have maven-metadata.xml files, at least on search.maven.org, and these files have substantially the same content as the .pom files. What's the deal with that?

like image 429
jameshfisher Avatar asked Nov 01 '22 15:11

jameshfisher


1 Answers

The files are the pom files from within the project. Those are deployed to the maven repository during the release build or by other build tools as well (gradle, ivy, etc.). Those files are needed to describe the dependencies of the appropriate artifact otherwise you have no other opportunity to store such kind of information.

In your particular example (really old 2005) this is a pom file which is created at a time of times where maven was not such distributed. In this case the file does not contain any dependencies.

If you take a look here:

http://search.maven.org/#browse%7C-77609479

you see a number of versions of a single artifact. If you now take a look into the maven-metadata.xml you will see list of available versions.

like image 178
khmarbaise Avatar answered Nov 10 '22 16:11

khmarbaise