GitHub - flowlogix/base-pom: Minimal base POM to be used as parent POM

3 min read Original article ↗

Dramatically simplifies your project’s build configuration, to be used in your projects as a parent POM.
Supports Maven 4 and 3

Usage

Inherit from this POM in your project’s pom.xml, then remove 1000s of lines of boilerplate configuration, and override the provided properties to configure your project if needed. Base POM is designed to stay out of your way, while providing a solid foundation for your Maven projects. Anything that’s not necessary for your project can be opted out or overridden.

Single-line starter - generate a JAR sample via curl

curl -sSL https://start.flowlogix.com/download -o starter.zip

Single-line starter - generate a WAR sample via curl

curl -sSL "https://start.flowlogix.com/download/;packagingType=war" -o starter.zip

Trivial Example (Note: replaces LATEST with a concrete version number)

<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.example</groupId>
    <artifactId>starter</artifactId>
    <version>1.x-SNAPSHOT</version>

    <name>Starter Project</name>

    <parent>
        <groupId>com.flowlogix</groupId>
        <artifactId>base-pom</artifactId>
        <version>LATEST</version>
    </parent>
</project>

Complete examples

Updating Dependencies

Update dependencies (except plugins, as they are defined in this parent project)

mvn -U -ntp versions:use-latest-releases versions:update-parent versions:update-properties \
-DgenerateBackupPoms=false \
-Dmaven.version.rules=https://raw.githubusercontent.com/flowlogix/base-pom/main/versions-ruleset.xml

Display outdated plugins

mvn -U -ntp versions:display-plugin-updates -DgenerateBackupPoms=false -DprocessUnboundPlugins=true

Frequently Asked Questions (Full FAQ)

Q: Is this just for Flow Logix, or can I use it for my own projects?
A: This is a general-purpose parent POM that can be used for any project. It is not specific to Flow Logix. You can override the default settings to suit your project’s name, developers, scm or any other section necessary to customize it for your own project.

Q: How is this different from basepom.org or other base POM projects?
A: This POM is designed to be minimal and flexible, with a focus on aggressively reducing the size of your project’s POM. It does not include unnecessary dependencies or plugins, and it is designed to work with Maven 4. It also includes features that are not available in other base POM projects, such as support for Payara Platform and Testcontainers.

Q: Which one do I choose? infra, payara or base?
A: The base POM is minimal and can be used for any project. The infra POM is opinionated with many features and preconfigured defaults, while the payara POM is for projects that use Payara Platform. If you are not sure which one to use, start with the base POM.

Q: I already have a parent POM, can I use this one?
A: Yes, you can use this POM as a parent POM for your project’s parent POM. Then, you can remove all the dependencies and plugins that you do not need. This POM is designed to be flexible and can be used as a starting point for your own parent POM.

Q: How often is this updated?
A: This POM is updated regularly to keep up with the latest versions of the dependencies and plugins. On average, it is updated weekly.