How can I do a git pull in Maven?

后端 未结 3 783
余生分开走
余生分开走 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:25

    Instead of doing this during the Maven build, use a CI server like Jenkins. It will do the git pull before running maven, so the build tool can concentrate on it's main purpose: Building source code.

    This also makes it more simple for you to develop since pull's will only happen when you want them. If you pull all the time, another developer can change something and you will get errors that you don't expect.

提交回复
热议问题