tomasbjerre / git-changelog-maven-plugin

Maven plugin that can generate a changelog, or releasenotes, from git repository
Other
80 stars 36 forks source link

CLI Property has lower priority than pom property #26

Closed vhochstein closed 3 years ago

vhochstein commented 3 years ago
HEAD HEAD

./mvnw -X generate-resources -DfromRef=21.03.01.02 -DtoRef=21.03.01.03

My expectaction would be that cli parameter overrite maven config parameter values.

However actually HEAD is used as value for both parameters

tomasbjerre commented 3 years ago

How did you configure the plugin in your pom.xml? Perhaps if you change it to have properties for from/to, like this:

    <properties>
        <fromRef>HEAD</fromRef>
        <toRef>HEAD</toRef>
    </properties>

....
                    <execution>
                        <id>GenerateGitReleasenotes11</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>git-changelog</goal>
                        </goals>
                        <configuration>
                            <file>RELEASENOTES.md</file>
                            <fromRef>${fromRef}</fromRef>
                            <toRef>${toRef}</toRef>
                        </configuration>
                    </execution>
vhochstein commented 3 years ago

yes using properties is working, thanks a lot for the hint