Search code examples
javamavenjenkinsmaven-plugin

Maven set version error only in Jenkins: Only [] formats are supported for change recordings


Tried different version but to know avail - 3.0.0 seems to be the latest:

<plugins>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>3.0.0</version>
        <configuration>
            <preparationGoals>clean install</preparationGoals>
        </configuration>
    </plugin>
</plugins>

It works in my local, but in Jenkins it is not: How Jenkins call maven Error in Jenkins

And can not see much needed info about this error: Only [] formats are supported for change recordings

Let me know if I am looking at the wrong place.

Thanks!


Solution

  • Setting this in our Jenkins build fix it: enter image description here From:

    -U clean install versions:set -DnewVersion=${version}
    

    To:

    -U clean install build-helper:parse-version org.codehaus.mojo:versions-maven-plugin:2.4:set -DnewVersion=${version}