Maven: Is it possible to pull and checkout local repository with remote repository?

321 Views Asked by At

If I execute mvn install for first time. It will create target folder under which git repository will be created.

I want, if I execute mvn install on that project (without cleaning):

  1. If pom defines that repository with same branch then just git pull and checkout

  2. If pom defines that repository with another branch then git pull and checkout

  3. If local repository is not found, then clone from remote git repository

0

There are 0 best solutions below