aleksandr-m / gitflow-maven-plugin

The Git-Flow Maven Plugin supports various Git workflows, including GitFlow and GitHub Flow. This plugin runs Git and Maven commands from the command line.
https://aleksandr-m.github.io/gitflow-maven-plugin/
Apache License 2.0
493 stars 181 forks source link

underlying Maven commands ignoring root Maven settings #214

Closed mariomartinezricston closed 4 years ago

mariomartinezricston commented 4 years ago

I am unable to use the plugin via our build management server (team city). We have a maven settings.xml file hosted in a none-default location,which contains multiple configurations, including our nexus repository. The teamcity build pass this argument to the maven step: "mvn clean gitflow:release-start <>"

When executing the plugin, the internal maven commands fails with an error: [ERROR] Unresolveable build extension: Plugin ... or one of its dependencies could not be resolved.

It seems that the underlying commands are ignoring the arguments / settings provided within the "mvn gitflow:release-start" execution. Moreover, is not even accessing the local repository.

I have been trying to trick the inner maven commands trying to pass the settings location: "-s <>" and also, trying to force the usage of the local none default repository "-DargLine=-Dmaven.repo.local=<>" with no luck.

How to maintain all the settings between the root maven call and the underlying maven commands?

aleksandr-m commented 4 years ago

Use argLine parameter to pass configuration to the underlying Maven commands. Try

mvn clean gitflow:release-start -DargLine='-s path'
mariomartinezricston commented 4 years ago

Teamcity was passing the setting location via a new maven parameter. I could make it work with inline configuration:

`

--settings=${teamcity.maven.userSettings.path}
    </configuration>`