Maven

Maven Parent Files

To reference Maven parent file located in the repository use the following example:

<parent>
  <groupId>org_or_com.organization_name</groupId>
  <artifactId>application-name-component-name</artifactId>
  <version>1.2.3-15</version>
  <relativePath></relativePath>
</parent>

It is important to specify empty relative path. Self-closing version might work, but I run into one tim issue at some point.

Standard dependency version resolution rules don’t work in parent element. So, you must specify artifact version explicitly!

Maven Aritfact Versioning

It is difficult to find information on the topic. Here is a standard versioning string:

Major.Minor.Patch-Qualifier|BuildNumber

If the string does not match the above format, it will be used as is and explicit match will be required for it:

any-other-string-is-a-version-that-only-matches-itself

Examples:

1.2.3-15
1.2.3-alpha1
1.2.3-alpha2
1.2.3
1.2
1
dev-main-line

where number after alpha is sorted.

There are only several predefined qualifiers like alpha which will apply number that follows right after qualifier.

Versioning References

  1. List of qualifiers
  2. Maven Versions Explained by Octopus product. Good product and good explanation.
  3. Maven Version Range Syntax
  4. Shows how difficult Maven versioning can be