In my pipeline I am getting the following error
[ERROR] Failed to execute goal com.amashchenko.maven.plugin:gitflow-maven-plugin:1.18.0:release-start (release) on project search-commons-java: You have some uncommitted files. Commit or discard local changes in order to proceed. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
What I believe is happening it doesn’t like the order of my imports, creates a file that is not committed and this error appears.
I ran mvn clean package
which failed. I then I installed a plugin, ran mvn clean install
, my imports were reordered and mvn clean package
now passed.
Plugin installed
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.3.2</version>
<executions>
<execution>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
<version>1.9.0</version>
<executions>
<execution>
<phase>compile</phase> <goals>
<goal>sort</goal> </goals>
</execution>
</executions>
</plugin>
However I am still getting the error. I am not sure what else to try. Any advice would be appreciated.