mschonaker / wagon-git

Git Wagon for Apache Maven
http://synergian.github.io/wagon-git/
83 stars 31 forks source link

Option to avoid [wagon-git] empty commits #35

Open stanpalatnik opened 8 years ago

stanpalatnik commented 8 years ago

It would be nice to have an option to avoid wagon-git automatically creating an empty commit for each jar it tries to process.

The reason is that we are using the git protocol for pulling down jars as well as pushing them(because we want to use the SSH key instead of username/password combo). This causes an insane amount of commits to be created.

Maybe as simple as an environment variable? I can create a pull request quick if you agree.

mschonaker commented 8 years ago

Sure. A pull request will allow me to picture better what you have in mind. If it's not too much effort, of course. On Apr 28, 2016 9:41 PM, "Stanislav Palatnik" notifications@github.com wrote:

It would be nice to have an option to avoid wagon-git automatically creating an empty commit for each jar it tries to process.

The reason is that we are using the git protocol for pulling down jars as well as pushing them(because we want to use the SSH key instead of username/password combo). This causes an insane amount of commits to be created.

Maybe as simple as an environment variable? I can create a pull request quick if you agree.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/synergian/wagon-git/issues/35

stanpalatnik commented 8 years ago

Created a pull request. The main motivation is to avoid something like this: https://lh6.googleusercontent.com/-hSeFaP1mYbI/VyJmHc7mtaI/AAAAAAAABfc/oCUsdanZrG4/w1597-h851-no/2016-04-28.png

This is partly our fault since we are abusing the repository section by using the git protocol instead of raw https. However, as stated above, we want to be able to use SSH keys.

mschonaker commented 8 years ago

Are you certain that those commits are empty? Maven will invoke the wagon several times per artifact per release. I'm okay with the flag anyway. Just saying.

Please have a look to the comment on the import I have done. Is possible to revert that?

stanpalatnik commented 8 years ago

It's definitely empty. The raw view of the commit is completely blank: http://puu.sh/ozCHd/e1d44613a8.jpg

I suspect it's because we configured our repo consumption to use the same url endpoint as the distribution management url. At first I didn't understand why your doc said to do this translation:

 <!-- 
                           distributionManagement url was
                           <url>git:your-branch://git@bitbucket.org:yourbitbucketusername/your-bitbucket-repo.git</url>
                        -->
                        <url>https://api.bitbucket.org/1.0/repositories/yourbitbucketusername/your-bitbucket-repo/raw/your-branch</url>

I assume this was the reason. However, as stated before, the HTTPS version won't work directly with keys.

I've reverted the import change.

mschonaker commented 8 years ago

Okay, so I deployed another snapshot of 0.3.0, 0.3.0-SNAPSHOT which includes your flag.

Please use it for a while, and then come back and tell me to perform the release.

If you have some time (I don't, for the moment), I'd appreciate from you to test it for deploying a single-module project, a multi-module project and a maven site.

Thanks for the patch.

stanpalatnik commented 8 years ago

Works well so far(for a single module project).

bdot commented 8 years ago

+1