pomlint-maven-plugin Maven Mojo

The pomlint mojo helps enforcing a certain style in Maven projects. This is particular useful in a multi-module project maintained by large teams of developers. Often best practices are ignored when the project becomes busy. This leads to pom structures that are hard to maintain and thus degrade the projects agility. By having a linter enforce the rules upfront many of the simple mistakes can be avoided.

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

dk.kyuff.pomlint
ArtifactId

ArtifactId

pomlint-maven-plugin
Last Version

Last Version

1.1
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

pomlint-maven-plugin Maven Mojo
The pomlint mojo helps enforcing a certain style in Maven projects. This is particular useful in a multi-module project maintained by large teams of developers. Often best practices are ignored when the project becomes busy. This leads to pom structures that are hard to maintain and thus degrade the projects agility. By having a linter enforce the rules upfront many of the simple mistakes can be avoided.
Project URL

Project URL

http://maven.apache.org
Source Code Management

Source Code Management

https://github.com/kyuff/pomlint-maven-plugin

Download pomlint-maven-plugin

How to add to project

<plugin>
    <groupId>dk.kyuff.pomlint</groupId>
    <artifactId>pomlint-maven-plugin</artifactId>
    <version>1.1</version>
</plugin>

Dependencies

compile (3)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.0
org.apache.maven : maven-core jar 3.0
org.apache.maven : maven-model jar 3.0

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.4

test (4)

Group / Artifact Type Version
junit : junit jar 4.12
org.apache.maven.plugin-testing : maven-plugin-testing-harness jar 3.3.0
org.apache.maven.shared : maven-verifier jar 1.6
org.mockito : mockito-all jar 1.10.19

Project Modules

There are no modules declared in this project.

pomlint-maven-plugin

This is a Maven module that have the goal to catch common errors in POM files of large Maven projects.

It does this by binding to the validate phase and verifying some simple rules have not been violated.

These rules are opinionated and based on experience with large projects.

Usage

Add the following to your root pom file:

    <build>
        <plugins>
            <plugin>
                <groupId>dk.kyuff.pomlint</groupId>
                <artifactId>pomlint-maven-plugin</artifactId>
                <version>${pomlint.version}</version>
                <executions>
                    <execution>
                        <id>lint</id>
                        <goals>
                            <goal>lint</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

Rules

Currently pomlint-maven-plugin supports four different rules:

  1. Empty Description TODO Descriptions needs to be specified.

  2. Inherent Dependency TODO No inherent dependencies.

  3. Mixed Property Names TODO No mixing property names!

  4. Test Scope Out Of Order TODO Test scopes should be at the end.

  5. Module Name TODO Module names must match the artifactId

Versions

Version
1.1
1.0