This seems not so easy to google because results about the normal pom.xml are overwhelming.

So, I just have learned there are also Maven artefact related files with .pom extension. This seems to be some special thing about how repositories work - a meta-file for an artefact?

For example, if you check folder contents for an artefact in your local repository, you will find these files in any artefact folder I guess, just like in the path below.



<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <!-- this POM is released under an Apache 2.0 license-->
  <name>JSON (JavaScript Object Notation)</name>
    JSON (JavaScript Object Notation) is a lightweight data-interchange format.
    It is easy for humans to read and write. It is easy for machines to parse and generate.
    It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition
    - December 1999. JSON is a text format that is completely language independent but uses
    conventions that are familiar to programmers of the C-family of languages, including C, C++, C#,
    Java, JavaScript, Perl, Python, and many others.
    These properties make JSON an ideal data-interchange language.
      <name>provided without support or warranty</name>



Question: What is exactly this file and is it possible to generate this file as part of a Maven build? Or do we have to create these files manually as part of the codebase ?

(In the context of what I am doing, I use generic Artifactory deployment plugin for Bamboo to deploy artefacts there but this .pom file is not being created automatically).

UPD I have solved my problem by using a copy of the pom.xml as this pom file and it works but I consider this can not be the correct way.

  • 1
    You may be interested in this SO question, tip for google search, surround .pom with quotes, the question above is the first link for the search maven and ".pom" files
    – Tensibai
    Sep 4 '17 at 13:01
  • thx - I followed the quoted link and finally found the anwer in one another comment: "yes the pom needs to be there and yes I can be just a copy of an included pom. Local repositories like artifactory actually just extract an included pom if you upload a jar." now what I do with this thread? self-answer..? Sep 4 '17 at 18:22
  • yes self answering sounds a good option
    – Tensibai
    Sep 5 '17 at 7:27
  • Could you post an answer?
    – 030
    Dec 22 '19 at 13:57

Answer from here:

Every jar needs to have a pom file describing it, you can just add something simple like this:

Every jar needs to have a pom file describing it, you can just add something simple like this:

http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 aGroup aArtifactId aVersion jar a Name

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.