Wrap jgit buildnumber plugin in a profile triggered by .git exsiting. This should prevent numerous warnings when building from a source archive instead of from git checkout.
Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/6e24e58f Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/6e24e58f Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/6e24e58f Branch: refs/heads/release Commit: 6e24e58ffbe8d65d2953242fa05310c8226e1f69 Parents: e30d37c Author: Luc Maisonobe <l...@apache.org> Authored: Tue Apr 14 13:40:34 2015 +0200 Committer: Luc Maisonobe <l...@apache.org> Committed: Tue Apr 14 13:40:34 2015 +0200 ---------------------------------------------------------------------- pom.xml | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-math/blob/6e24e58f/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 9c100e2..70348af 100644 --- a/pom.xml +++ b/pom.xml @@ -527,21 +527,6 @@ <additionalparam>-header '<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>'</additionalparam> </configuration> </plugin> - <plugin> - <groupId>ru.concerteza.buildnumber</groupId> - <artifactId>maven-jgit-buildnumber-plugin</artifactId> - <version>${math.jgit.buildnumber.version}</version> - <executions> - <execution> - <phase>generate-resources</phase> - <goals> - <goal>extract-buildnumber</goal> - </goals> - </execution> - </executions> - <configuration> - </configuration> - </plugin> </plugins> </build> @@ -693,6 +678,33 @@ <profiles> <profile> + <id>jgit-buildnumber</id> + <activation> + <file> + <exists>.git</exists> + </file> + </activation> + <build> + <plugins> + <plugin> + <groupId>ru.concerteza.buildnumber</groupId> + <artifactId>maven-jgit-buildnumber-plugin</artifactId> + <version>${math.jgit.buildnumber.version}</version> + <executions> + <execution> + <phase>generate-resources</phase> + <goals> + <goal>extract-buildnumber</goal> + </goals> + </execution> + </executions> + <configuration> + </configuration> + </plugin> + </plugins> + </build> + </profile> + <profile> <id>setup-checkout</id> <activation> <file>