1

I am wondering if it is possible to make maven git branch aware?

i.e:

// if branch == master
<dryRun>true</dryRun>

// else
<dryRun>false</dryRun>
alexs333
  • 12,143
  • 11
  • 51
  • 89
  • 1
    possible duplicate of [select maven profile based on git branch](http://stackoverflow.com/questions/12220517/select-maven-profile-based-on-git-branch) – Joe Nov 17 '14 at 09:16

1 Answers1

0

by default, maven doesn't know where it is running. its just a simple file system that has the files and someone ran the maven command with some pom.xml however you could use env vars to set a profile for the run. i think thats one of the maven ways of doing things differently based on the env you are running on.

sagie
  • 1,744
  • 14
  • 15