mschonaker / wagon-git

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

See a commit message when a repository is used for a dependency #46

Closed dmarley closed 7 years ago

dmarley commented 7 years ago

We are currently trying to leverage this plugin, but we are observing a commit being made when a git maven repo is used within another project

Project A (depends on) Project B

When I run "mvn clean install" I see that it finds Project B in git and downloads it as a dependency (great), but I am also seeing a commit on Project B repository every time.

[INFO] Executing: /bin/sh -c cd /tmp/wagon-git-aaefa864d73892359dd283c166e773f28ec6039f && git commit --allow-empty -m '[wagon-git] commit to branch snapshots 5/24/17 4:33 PM'
[INFO] Working directory: /tmp/wagon-git-aaefa864d73892359dd283c166e773f28ec6039f
[INFO] [git] [snapshots 01b7e88] [wagon-git] commit to branch snapshots 5/24/17 4:33 PM
[INFO] Executing: /bin/sh -c cd /tmp/wagon-git-aaefa864d73892359dd283c166e773f28ec6039f && git push --progress origin snapshots
[INFO] Working directory: /tmp/wagon-git-aaefa864d73892359dd283c166e773f28ec6039f
[INFO] [git] Counting objects: 1, done.
[INFO] [git] Writing objects: 100% (1/1)   
[INFO] [git] Writing objects: 100% (1/1), 228 bytes | 0 bytes/s, done.
[INFO] [git] Total 1 (delta 0), reused 0 (delta 0)
[INFO] [git] remote: 
[INFO] [git] remote: Create pull request for snapshots:        
[INFO] [git] remote:   https://bitbucket.org/xxxx/repo-snapshots-utility-common-domain/pull-requests/new?source=snapshots&t=1 
dmarley commented 7 years ago

After some investigation looks like in version 0.3.0 of the plugin there is a flag you can set during your build "-Dwagon.git.skip.empty.commit=true" that takes care of my concern.

Thanks - you can close the ticket