Search code examples
javaxmlmavengit-flowjgitflow-maven-plugin

How to specify build options for automatic build triggered by jgitflow release-finish?


When I do mvn jgitflow:release-finish, it triggers a project build which fails because it tries to fetch a plugin from https://repo1.maven.org/maven2/ and our network doesn't allow that; we need to use the organization's local maven repo.

Now I've specified the URL to this local maven in my settings.xml, and normal builds work fine because I specify the path to this settings.xml as follows: mvn clean install -gs ~/settings.xml

But the automatic build triggered by the jgitflow:release-finish goal seems to use it's own build options. I want to know how can I change these build options?

The workaround I'm using right now is to set noReleaseBuild = true in the jgitflow plugin configs in order to skip the build altogether, but I don't want to keep doing this.

Please let me know if there's a way to specify which settings.xml file is to be used in the build triggered by jgitflow:release-finish

TIA.


Solution

  • Ok this is weird. All I did was upgraded from Maven v3.0.3 to Maven v3.2.5 and kept my user settings.xml here: ~/.m2/settings.xml and it worked.

    All the options I want to specify for the build triggered by jgitflow:release-finish goal can be specified along with the goal itself as in this example:

    mvn jgitflow:release-finish -Dmaven.test.skip=true