/maven-build-utilities

a maven plugin for simple build utilities

Primary LanguageJavaMIT LicenseMIT

eitco maven build utilities

License Build status Maven Central Version

This maven plugin contains some simple build utilities. This plugin works as a collection of simple maven goals that only execute simple code. More complex code should be placed in its own plugin.

usage

Add the following plugin to your build:

<project>
    ...
    <build>
        ...
        <plugins>
            ...
            <plugin>
                <groupId>de.eitco.cicd</groupId>
                <artifactId>build-utilities-maven-plugin</artifactId>
                <version>0.0.2</version>
            </plugin>
        </plugins>
    </build>
</project>

Check for the latest version here. This enables the following goals:

The following goals exist:

dependencies-version-properties

This goal generates properties, containing the version and file system path of every direct dependency the current project has. For every dependency, two properties are generated:

  • maven.dependency.<dependency-conflict-id>.file set to the absolute file system path of the dependency
  • maven.dependency.<dependency-conflict-id>.version set to the version of the dependency.

The dependency conflict id is constructed as follows: <groupId>:<artifactId>:<type>[<classifier>]

list-properties

This goal prints all properties and their value currently available. This is mostly thought of for debugging purposes.

set-artifact

This goal sets the artifact file of the current project. This is intended for highly customized builds where maven is unable to deduce the builds main artifact by itself.

Use the parameter file to specify the file to attach.

write-file

This goal generates a text file. The following parameters are available:

targetFile

property: target-file

The name of the file to generate

content

property: file.content

The content to write to the file

append

property: append.file

Whether content should be appended to the file - or the file should be overridden

skip

property: write.file.skip

Whether the execution should be skipped

  • A complete reference of the available goals and parameters is available as github page