This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

[build] removed buildnumber plugin, doesn't work that well for git re…

…pos. Use groovy script instead
  • Loading branch information...
smee committed Aug 25, 2010
1 parent 44ed4b4 commit fd970c760e9aaf1ac22200840fcdcb7d9fe6fa72
Showing with 78 additions and 58 deletions.
  1. +26 −18 examServer/pom.xml
  2. +26 −18 taskmodel-log/pom.xml
  3. +26 −22 taskmodel/pom.xml
View
@@ -155,24 +155,32 @@
</executions>
</plugin>
<!-- buildnumber -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.0-beta-5-SNAPSHOT</version>
<executions>
<execution>
<id>make-buildnumber</id>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doUpdate>false</doUpdate>
<doCheck>false</doCheck>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<!-- Fetch build version information, store for use in Mifos -->
<source>
def env = System.getenv()
def gitcmd = "git"
if (env['OS'] =~ /^Windows/)
gitcmd = "cmd /c ${gitcmd}"
def gitShaProc = """${gitcmd} log --pretty=format:%H -n1""".execute()
project.properties['buildNumber'] = gitShaProc.in.text
project.properties['scmBranch'] = """${gitcmd} symbolic-ref HEAD""".execute().in.text
project.properties['timestamp'] = "" + new Date()
</source>
</configuration>
</execution>
</executions>
</plugin>
<!--
erstelle eclipse projekte aus unterprojekten mit 'mvn
eclipse:eclipse'
View
@@ -47,24 +47,32 @@
<build>
<plugins>
<!-- buildnumber -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.0-beta-5-SNAPSHOT</version>
<executions>
<execution>
<id>make-buildnumber</id>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doUpdate>false</doUpdate>
<doCheck>false</doCheck>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<!-- Fetch build version information, store for use in Mifos -->
<source>
def env = System.getenv()
def gitcmd = "git"
if (env['OS'] =~ /^Windows/)
gitcmd = "cmd /c ${gitcmd}"
def gitShaProc = """${gitcmd} log --pretty=format:%H -n1""".execute()
project.properties['buildNumber'] = gitShaProc.in.text
project.properties['scmBranch'] = """${gitcmd} symbolic-ref HEAD""".execute().in.text
project.properties['timestamp'] = "" + new Date()
</source>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
View
@@ -172,11 +172,6 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven.javadoc.plugin.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>${mojo.buildnumber.plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
@@ -213,23 +208,32 @@
</executions>
</plugin>
<!-- buildnumber -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<executions>
<execution>
<id>make-buildnumber</id>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doUpdate>false</doUpdate>
<doCheck>false</doCheck>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<!-- Fetch build version information, store for use in Mifos -->
<source>
def env = System.getenv()
def gitcmd = "git"
if (env['OS'] =~ /^Windows/)
gitcmd = "cmd /c ${gitcmd}"
def gitShaProc = """${gitcmd} log --pretty=format:%H -n1""".execute()
project.properties['buildNumber'] = gitShaProc.in.text
project.properties['scmBranch'] = """${gitcmd} symbolic-ref HEAD""".execute().in.text
project.properties['timestamp'] = "" + new Date()
</source>
</configuration>
</execution>
</executions>
</plugin>
<!-- erstelle eclipse projekte aus unterprojekten mit 'mvn eclipse:eclipse' -->
<plugin>
<inherited>true</inherited>

0 comments on commit fd970c7

Please sign in to comment.