Questions tagged [buildnumber-maven-plugin]

This mojo is designed to get a unique build number for each time you build your project

Introduction

Official site : http://mojo.codehaus.org/buildnumber-maven-plugin/

This mojo is designed to get a unique build number for each time you build your project. So while your version may remain constant at 1.0-SNAPSHOT for many iterations until release, you will have a build number that can uniquely identify each build during that time. The build number is obtained from scm, and in particular, at this time, from svn. You can then place that build number in metadata, which can be accessed from your app, if desired.

The mojo also has a couple of extra functions to ensure you get the proper build number. First, your local repository is checked to make sure it is up to date. Second, your local repository is automatically updated, so that you get the latest build number. Both these functions can be suppressed, if desired.

Optionally, you can configure this mojo to produce a revision based on a timestamp, or on a sequence, without requiring any interaction with an SCM system. Note that currently, supported SCMs are : subversion, git and mercurial.

Goals Overview

buildnumber:create: Create a build number. buildnumber:create-timestamp: Create a timestamp. buildnumber:hgchangeset: Create properties for changeSet and changeSetDate from a Mercurial repository.

Usage

Instructions on how to use the Build Number Maven Plugin can be found on the usage page.

68 questions
3
votes
1 answer

buildnumber-maven-plugin and maven-assembly-plugin

I've set up the buildnumber-maven-plugin to pull the version number from SVN and stash it away in the META-INF/MANIFEST.MF inside the jar. That works ok. But when I try to use it together with the maven-assembly-plugin to pack all the other libs…
3
votes
1 answer

Jenkins and maven-buildnumber-plugin

I am using maven-buildnumber-plugin version 1.0-beta-4. This works fine on a project checked out of Subversion, but fails in Jenkins. I assume this problem is due to Jenkins somehow removing the .svn folders. I assumed wrong. Here is the error I…
Roman Zenka
  • 3,514
  • 3
  • 31
  • 36
3
votes
4 answers

How to display SVN version in Maven usng the build-number plugin

How do display the svn version and the timestamp using build number plugin. Currently I have the following org.codehaus.mojo buildnumber-maven-plugin
user373201
  • 10,945
  • 34
  • 112
  • 168
3
votes
1 answer

Switch git provider in buildnumber-maven-plugin

When using the buildnumber-maven-plugin, the execution fails when no git executable is in the %PATH% during a build on command line: [ERROR] Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.4:create (default) on project test:…
SilverNak
  • 3,283
  • 4
  • 28
  • 44
3
votes
1 answer

Visibility of buildnumber-maven-plugin property ${buildNumber}

I am trying to use buildnumber-maven-plugin to append the SCM build number to the WAR artifact name and then use tomcat7-maven-plugin to deploy it but in a context path that doesn't include the build number. So I am making foo-r1234.war where foo is…
amphibient
  • 29,770
  • 54
  • 146
  • 240
3
votes
1 answer

How to generate maven artifact with jenkins build number

I'm trying associate maven artifacts name with build number. ex: sample.1.0.0-snapshot.ear into sample.1.0.0-snapshot.buildnumber.ear I have tried maven-buildnumber plugin but still no luck. could anyone help me to do this.
thakshira
  • 81
  • 1
  • 2
  • 6
3
votes
3 answers

git-log error: ambiguous argument 'master'

I'm running a maven build of a java project that is stored in a git repo. When the release plan runs on a build server (using Bamboo) it issues the following git command: git log -n1 --date-order master but recieves the following error: fatal:…
Planky
  • 3,185
  • 3
  • 29
  • 39
3
votes
2 answers

What is the best way to handle Java web application versioning?

I have a standard Java application that handles both REST and UI calls. What is the best way for me to create and manage an application version (major.minor.release.build)? I'm using Subversion, Maven, Bamboo (continuous build) and Spring in the…
3
votes
0 answers

buildnumber-maven-plugin does not resolve its ${buildNumber} property

My trouble is here: org.codehaus.mojo buildnumber-maven-plugin 1.3
Andreas
  • 347
  • 2
  • 9
3
votes
0 answers

JBoss-as:deploy does not inject ${buildNumber}

I getting this error at 'jboss-as:deploy': [INFO] Building war: E:\git-repos\GUI4Leader\gui4leader\target\gui4leader-SNAPSHOT-0.6.16-12.04.13-08_09.war [INFO] WEB-INF\web.xml already added, skipping [INFO] [INFO] <<<…
Homer1991
  • 31
  • 4
3
votes
3 answers

Error while adding SVN revision in JAR manifest with Maven and maven-bundle-plugin

I am trying to add SVN revision number in the manifest of my projects. To do so, I used Maven build number plugin and added the following lines in my Super POM:
Ben
  • 6,321
  • 9
  • 40
  • 76
2
votes
1 answer

How does buildnumber-maven-plugin work?

I have the below configuration to create a build number and save it in the MANIFEST.MF. The build process generates a buildNumber.properties and keeps track of the last build from it. However this file I assume should be committed back into GIT as…
srini
  • 544
  • 1
  • 11
  • 23
2
votes
1 answer

I want to automatically update artifact version with the latest svn revision number using maven release plugin

My artifact version looks like this: 1.0.0-SNAPSHOT I want to use the maven release plugin to deploy the artifact to the releases repository, using the following version: 1.0.0.1234, where 1234 is the latest svn revision number. Is this possible? I…
Jin Kim
  • 16,562
  • 18
  • 60
  • 86
2
votes
1 answer

Does maven expose scmUrl as a property?

I'm using maven scm plugin and buildnumber plugin to get set buildNumber property from revision. I'd like to get the full url as well but it doesn't appear to be exposed as a property. I know I can call svn info and grep for it but I figured the…
Peter Kahn
  • 12,364
  • 20
  • 77
  • 135
2
votes
1 answer

Couldn'tmake buildnumber-maven-plugin plugin work

Whatever I do, I am not able to get teh buildNumber in the final name of the project :( Reequesting Maven experts to please have a look and suggest some solutions. Here is my pom.xml
dharam
  • 7,882
  • 15
  • 65
  • 93