diff --git a/libbuild/GitRevMavenTask/src/GitRevMavenTask.java b/libbuild/GitRevMavenTask/src/GitRevMavenTask.java index 7e40e9a5b..0775905e4 100644 --- a/libbuild/GitRevMavenTask/src/GitRevMavenTask.java +++ b/libbuild/GitRevMavenTask/src/GitRevMavenTask.java @@ -42,9 +42,6 @@ public class GitRevMavenTask extends AbstractMojo { private String buildNumberPropertyName = "releaseNr"; @Parameter private String commitDatePropertyName = "DSTAMP"; - - /** Default revision number when no commit can be found */ - private static final String DEFAULT_REV_NUMBER = "0000"; Log log = this.getLog(); @@ -96,26 +93,20 @@ public class GitRevMavenTask extends AbstractMojo { } walk.dispose(); if (lastTag == null) { - revision = DEFAULT_REV_NUMBER; + revision = "0000"; } else { revision = Integer.toString(distance + 9000); } } catch (final IOException e) { - revision = DEFAULT_REV_NUMBER; - } catch(IllegalArgumentException e) { - revision = DEFAULT_REV_NUMBER; + e.printStackTrace(); } if (project != null) { - if(branch != null) { - project.getProperties().put(this.branchPropertyName, branch); - log.info("GitrevMavenTask: set property " + this.branchPropertyName + "='" + branch + "'"); - } + project.getProperties().put(this.branchPropertyName, branch); + log.info("GitrevMavenTask: set property " + this.branchPropertyName + "='" + branch + "'"); project.getProperties().put(this.buildNumberPropertyName, revision); log.info("GitrevMavenTask: set property " + this.buildNumberPropertyName + "=" + revision); - if(commitDate != null) { - project.getProperties().put(this.commitDatePropertyName, commitDate); - log.info("GitrevMavenTask: set property " + this.commitDatePropertyName + "=" + commitDate); - } + project.getProperties().put(this.commitDatePropertyName, commitDate); + log.info("GitrevMavenTask: set property " + this.commitDatePropertyName + "=" + commitDate); } else { log.error("GitrevMavenTask: no Maven project"); System.out.println(this.branchPropertyName + "=" + branch); diff --git a/pom.xml b/pom.xml index d3e6f15c2..77b2e6729 100644 --- a/pom.xml +++ b/pom.xml @@ -36,8 +36,8 @@ 5.5.2 - 9.2.17.v20160517 - + 9.2.17.v20160517 + ${DSTAMP} yacy_v${project.version}_${DSTAMP}_${releaseNr}.tar.gz @@ -64,64 +64,6 @@ - - maven-antrun-plugin - 1.8 - - - init.staticIP - prepare-package - - - - - - - run - - - - init.port - prepare-package - - - - - - - run - - - - init.admin - prepare-package - - - - - - - run - - - - - org.apache.maven.plugins maven-compiler-plugin @@ -179,11 +121,11 @@ - maven-antrun-plugin 1.8 + compile-htroot compile @@ -203,6 +145,57 @@ run + + init.staticIP + prepare-package + + + + + + + run + + + + init.port + prepare-package + + + + + + + run + + + + init.admin + prepare-package + + + + + + + run + + @@ -225,29 +218,6 @@ - - - net.yacy - maven-plugin-gitrevisionnumber - 1.0 - - - initialize - - create - - - - - org.codehaus.mojo templating-maven-plugin @@ -299,6 +269,55 @@ + + + no-git + + + .git + + + + + 9000 + + + + git-rev-number + + + + .git + + + + + + + net.yacy + maven-plugin-gitrevisionnumber + 1.0 + + + initialize + + create + + + + + + + + release-profile