Maven package-info.java Plugin

Autogenerates package-info.java files with arbitrary headers

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

de.shadowhunt.maven.plugins
ArtifactId

ArtifactId

package-info-maven-plugin
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Maven package-info.java Plugin
Autogenerates package-info.java files with arbitrary headers
Project Organization

Project Organization

shadowhunt
Source Code Management

Source Code Management

https://github.com/thrawn-sh/package-info

Download package-info-maven-plugin

How to add to project

<plugin>
    <groupId>de.shadowhunt.maven.plugins</groupId>
    <artifactId>package-info-maven-plugin</artifactId>
    <version>2.0.0</version>
</plugin>

Dependencies

compile (1)

Group / Artifact Type Version
commons-lang : commons-lang jar 2.6

provided (5)

Group / Artifact Type Version
com.google.code.findbugs : annotations jar 3.0.1u2
de.shadowhunt : annotations jar 2.0.0
org.apache.maven : maven-core jar 3.0
org.apache.maven : maven-plugin-api jar 3.0
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.0

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.mockito : mockito-core jar 2.7.17

Project Modules

There are no modules declared in this project.

Shadowhunt package-info.java Generator

This Maven project generates package-info.java for every Java package that does not already contain such a file. You can generate findbugs, sportbugs, checkstyle, pmd, ... package annotations for each package and save the trouble of keeping them in sync.

Usage

...
<plugin>
    <groupId>de.shadowhunt.maven.plugins</groupId>
    <artifactId>package-info-maven-plugin</artifactId>
    <version>2.0.0</version>
    <executions>
        <execution>
            <phase>generate-sources</phase>
            <goals>
                <goal>package-info</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <packages>
            <package regex="net.example.database">
                <annotations>
                    <annotation>@de.shadowhunt.annotation.ReturnValuesAreNonnullByDefault</annotation>
                </annotations>
            </package>
            <package><!-- all other packages -->
                <annotations>
                    <annotation>@de.shadowhunt.annotation.ReturnValuesAreNonnullByDefault</annotation>
                    <annotation>@javax.annotation.ParametersAreNonnullByDefault</annotation>
                </annotations>
            </package>
        </packages>
    </configuration>
</plugin>
...

Versions

Version
2.0.0
1.4.5
1.4.4
1.4.3
1.4.2