How can I do a git pull in Maven?

后端 未结 3 769
余生分开走
余生分开走 2020-12-25 08:59

I\'m new to both maven and git and wanted to get some help in setting a project.

Is there a way to define a goal in the pom to push/pull from git during linked to a

3条回答
  •  独厮守ぢ
    2020-12-25 09:30

    The scm:checkout goal Vitor is referring to is a clone, not a pull (huge difference in Git).

    I had to use the exec goal to do what you're describing. I also didn't want to do an entire clone each time there was a build. Instead, I use git reset --hard and then pull -f origin Release:Release (via exec).

    If I find a better way (and there HAS to be one) I'll post it here.

提交回复
热议问题