I want to integrate Git with my Maven Workflow. Basically, I want to succesfully execute following 4 commands:
mvn release:prepare
mvn release:rollback
mvn release:perform
mvn deploy
This should work without any additional plugins or tools (no gitflow). I am at a loss pulling the documentation together, and am almost at a point where I want to declare that you would only use maven releases in combination with an svn repository.
My main problem seems to be in how to handle the server fingerprinting. I do not want (cannot) to use a password, so I need to revert to using publick/private key. I have put my public key already on the remote repository, and I seem to be able to authenticate with something similar to this:
<server>
<id>giturl.com:1234</id>
<username>git</username>
<privateKey>C:/data/home/.ssh/id_rsa</privateKey>
</server>
However, I seem not to be able to get past the server fingerprint checking. Some very vague and obscure sources seem to suggest that I can provide a <server> <configuration> <knownHostsProvider>
section, but I seem not be able to get it right. I would expect that I can do something like this:
<knownHostsProvider implementation="org.apache.maven.wagon.providers.ssh.knownhost.NullKnownHostProvider">
<hostKeyChecking>no</hostKeyChecking>
</knownHostsProvider>
I was expecting the hostkey checking to be ignored, but unfortunately my mvn release:prepare
failed for that exact reason.
Should I give up, and revert back to svn to manage my regular maven releases? I am about to do exactly this ...