kozelka-pom

Top-level POM for all my projects

License

License

Categories

Categories

Maven Build Tools Net
GroupId

GroupId

net.kozelka.maven
ArtifactId

ArtifactId

kozelka-pom
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

pom
Description

Description

kozelka-pom
Top-level POM for all my projects
Project URL

Project URL

http://petr.kozelka.net
Project Organization

Project Organization

Petr Kozelka
Source Code Management

Source Code Management

https://github.com/pkozelka/kozelka-pom

Download kozelka-pom

Filename Size
kozelka-pom-1.0.0.pom 14 KB
Browse

How to add to project

<!-- https://jarcasting.com/artifacts/net.kozelka.maven/kozelka-pom/ -->
<dependency>
    <groupId>net.kozelka.maven</groupId>
    <artifactId>kozelka-pom</artifactId>
    <version>1.0.0</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/net.kozelka.maven/kozelka-pom/
implementation 'net.kozelka.maven:kozelka-pom:1.0.0'
// https://jarcasting.com/artifacts/net.kozelka.maven/kozelka-pom/
implementation ("net.kozelka.maven:kozelka-pom:1.0.0")
'net.kozelka.maven:kozelka-pom:pom:1.0.0'
<dependency org="net.kozelka.maven" name="kozelka-pom" rev="1.0.0">
  <artifact name="kozelka-pom" type="pom" />
</dependency>
@Grapes(
@Grab(group='net.kozelka.maven', module='kozelka-pom', version='1.0.0')
)
libraryDependencies += "net.kozelka.maven" % "kozelka-pom" % "1.0.0"
[net.kozelka.maven/kozelka-pom "1.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

The Root POM

This POM is designed to be the topmost parent (root) of the pom inheritance hierarchy.

Its primary role is to hold shared, generic settings, usable by any type of derived project.

Additionally, it has some support for releases performed by maven-releases-plugin (aka MRP), helping the pom.xml files to avoid direct references to concrete Nexus (or, Maven Repository Manager) instances.

Releases of this project are meant to be very infrequent.

POM hierarchy

Following POM hierarchy proved to be very flexible on many long-term projects:

  • The Root POM - a pom like this one - topmost, has no parent pom
  • Project POM - derived directly from corporate-pom - each multi-module project should have such a pom, derived by all its modules
  • Module POM - derived directly or indirectly from the Project POM; for single-pom projects, it is the same file as Project POM.

What is in here

A lot of defaults. Almost everything can be overriden in project poms.

Definitions

  • organization name and URL
  • license

Build configuration

  • pluginManagement - default versions and configuration of most important plugins; note that it is not necessary to specify all plugins ever used; each build is responsible for its own versions anyway
  • maven-enforcer-plugin - configured to fail if an active plugin is missing explicit version number (no LATEST allowed)

Some more validations can be pre-configured here as well, like maven-checkstyle-plugin or some other static analysis.

What is NOT in it

  • dependencyManagement because that would lead to frequent cascading releases whenever any managed dependency changes
  • authoritative pluginManagement - only few plugins are here, conveniently configuring most important stuff like Unicode etc.

Versions

Version
1.0.0