jour-maven-plugin Java API Signature tools

The signatureVerify allows comparison of compiled classes with API descriptor XML during build.

The generate goal allows creation of stub classes base on API descriptor XML during build.

Usage

Verify project classes base on API descriptor XML. Find API differences and stop build with error if any.

<project>
    ...
    <build>
        <plugins>
            <plugin>
                <groupId>net.sf.jour</groupId>
                <artifactId>jour-maven-plugin</artifactId>
                <version>2.0.3</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>signatureVerify</goal>
                        </goals>
                        <configuration>
                            <allowAPIextension>false</allowAPIextension>
                            <level>package</level>
                            <signature>${basedir}/src/test/resources/midpapi20-signature.xml</signature>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

Create new project classes base on API descriptor XML.

<project>
    ...
    <build>
        <plugins>

            <plugin>
                <groupId>net.sf.jour</groupId>
                <artifactId>jour-maven-plugin</artifactId>
                <version>2.0.3</version>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <output>${basedir}/target/classes</output>
                            <signature>${basedir}/src/main/api-signature.xml</signature>
                            <level>private</level>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>
</project>