Generate source files that contains maven artifact informations
Java
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
src
.gitignore
.travis.yml
LICENSE
README.md
pom.xml

README.md

artifactinfo-maven-plugin

Build Status

artifactinfo-maven-plugin generate java code with constants containing maven project metadata for use in you programs.

The project is hosted in maven central. here you'll find a quick copy/paste for the dependency.

Very simple to use:

  • it has only one goal : artifactinfo
  • without configuration is use sensible defaults reusing groupId and artifactId for package and class name
  • you can override default package name with the packageName configuration parameter
  • you can override default class name with the className configuration parameter

Code generated by default:

package com.group.id;

public abstract class ArtifactId
{
    public final static String GROUPID = "#groupId#";
    public final static String ARTIFACTID = "#artifactId#";
    public final static String VERSION = "#version#";
    public final static String DESCRIPTION = "#description#";
    public final static String NAME = "#name#";
    public final static String URL = "#url#";
    public final static String INCEPTION_YEAR = "#inceptionYear#";
    public final static long BUILD_TIMESTAMP = #buildTimestamp#L;
}