Skip to content

marcwrobel/parent

Build Supported JVM Versions Sonarcloud Status SonarCloud Vulnerabilities Maven Central

Writing and maintaining Maven projects POM is boring. This parent POM is simplifying those tasks in the context of my open source projects by:

How to use it?

Just inherit from it in your project :

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>fr.marcwrobel</groupId>
		<artifactId>parent</artifactId>
		<version>3.2.0</version>
		<relativePath/>
	</parent>

	<groupId>groupId</groupId>
	<artifactId>artifactId</artifactId>
	<version>x.y.z-SNAPSHOT</version>

	<name>name</name>
	<description>description</description>
	<url>https://url.com</url>
	<inceptionYear>2020</inceptionYear>
	...
	<!-- only override if needed -->
	<properties>
		<this.java.version>1.8</this.java.version>
		<this.maven.version>3.8.5</this.maven.version>

		<dev.name>Marc Wrobel</dev.name>
		<dev.username>marcwrobel</dev.username>
		<dev.email>marc.wrobel@gmail.com</dev.email>
		<dev.url>http://www.marcwrobel.fr/</dev.url>
		...
	</properties>
</project>

All inherited information can be overridden, especially properties (take a look at this parent POM for an exhaustive list). Remember you can display the effective POM using maven-help-plugin in your project:

mvn help:effective-pom

You must also declare a maven-versions-rules.xml file at the root of your project.

What's included?

The maven-enforcer-plugin is the only plugin activated by default.

Take a look at the POM for more information.

Why spring-boot-starter-parent?

This POM is inheriting from spring-boot-starter-parent in order to:

  • take advantage of the Spring Boot team's work on dependencies (with spring-boot-dependencies);
  • benefit from some good plugin management defaults.

Because this POM is relying so much on spring-boot-starter-parent its major and minor versions are also following those of Spring Boot.

Contribute

Take a look at the contribution guide.

Need help ?

Start a discussion, raise an issue or contribute with a pull-request (please take a look at the contribution guide before).

And for the things that must be kept private (only !), such as security issues, email me at marc.wrobel@gmail.com.