Maven Execution - Executable Not Found

I have a maven pom that has an executable defined as such

<execution>      <id>generate-build-number</id>      <phase>prepare-package</phase>      <goals>           <goal>exec</goal>      </goals>      <configuration>           <executable>git</executable>           <arguments>                <argument>log</argument>                <argument>--pretty=format:buildNumber = %H</argument>                <argument>-n1</argument>           </arguments>           <outputFile>${}/</outputFile>      </configuration> </execution>

I get the following error:

[ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Result of /bin/sh -c cd /cvs/nexus/cms && git log '--pretty=format:buildNumber = %H' -n1 execution is: '127'.

and in my file I get the following

/bin/sh: git: command not found

I'm able to run the same Maven lifecycle command from the command line just fine.  Is there a way I can set the path for the git command somewhere?  Any help would be greatly appreciated.  Thanks.
1 comment
Comment actions Permalink

Please note that this is a shared project so I can't just hardcode the path directly in my pom.xml.  Thanks


Please sign in to leave a comment.