siom79 / japicmp

Comparison of two versions of a jar archive
https://siom79.github.io/japicmp
Apache License 2.0
712 stars 107 forks source link

#213: Introduced the options allowNewAbstractElementsInMinor and allowBinaryCompatibleElementsInPatch in SemverOut #214

Closed rhierlmeier closed 6 years ago

rhierlmeier commented 6 years ago

From our point of view the SemanticVersion implementation of japi-cmp is too restrictive. In our company we drive a different policy.

I introduced with this pull request the options allowNewAbstractElementsInMinor and allowBinaryCompatibleElementsInPatch in the class SemverOut.

In the japicmp-maven-plugin these options change be configured in this way:

<plugin>
    <groupId>com.github.siom79.japicmp</groupId>
    <artifactId>japicmp-maven-plugin</artifactId>
    <version>0.12.1-SNAPSHOT</version>
    <configuration>
        <parameter>
            <breakBuildBasedOnSemanticVersioning>true</breakBuildBasedOnSemanticVersioning>
            <semanticVersioning>
                <allowBinaryCompatibleElementsInPatch>true</allowBinaryCompatibleElementsInPatch>
                <allowNewAbstractElementsInMinor>true</allowNewAbstractElementsInMinor>
            </semanticVersioning>
        </parameter>
    </configuration>
</plugin>
siom79 commented 6 years ago

Another solution has been implemented in commit 4498e7720d319f0fab98bd31d970a0ea05b17be1.