Jenkins and maven-buildnumber-plugin

I am using mavenbuildnumber-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.

  • Tracking code versions in an executable
  • Best way to handle old snapshots in local repository?
  • Runner type : SSH exec not found in teamcity
  • Jenkins/Hudson - How to run multiple jobs in parallel more than 1 level deep?
  • Xcode build automation scheduled integration bot setting
  • Setting Maven params in Jenkins
  • I assumed wrong. Here is the error I got:

    maven builder waiting
    mavenExecutionResult exceptions not empty
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.0-beta-4:create (default) on project swift-core: Cannot get the revision information from the scm repository : 
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(
        at org.apache.maven.DefaultMaven.doExecute(
        at org.apache.maven.DefaultMaven.execute(
        at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(
        at org.jvnet.hudson.maven3.agent.Maven3Main.launch(
        at hudson.remoting.UserRequest.perform(
        at hudson.remoting.UserRequest.perform(
        at hudson.remoting.Request$
        at java.util.concurrent.Executors$
        at java.util.concurrent.FutureTask$Sync.innerRun(
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
        at java.util.concurrent.ThreadPoolExecutor$
    Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot get the revision information from the scm repository : 
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
        ... 27 more
    Caused by: org.apache.maven.scm.ScmException: Error!
        ... 30 more

    I overlooked this:

    Provider message:
    The svn command failed.
    Command output:
    /bin/sh: svn: command not found
    mojoFailed org.codehaus.mojo:buildnumber-maven-plugin:1.0-beta-4(default)

    There is no svn client installed on the machine, that is the true source of trouble.

  • Run custom database scripts in Jenkins
  • Check if a PR is up to date with the target branch
  • Jenkins pipeline : select nodejs version (+ python version)
  • Protect Jenkins with nginx http auth except callback url
  • Pass variable from jenkins to testng.xml
  • What are Jenkins best practices with building with Grunt and deploying with Capistrano?
  • One Solution collect form web for “Jenkins and maven-buildnumber-plugin”

    The error message shows that the command svn is not installed on the build machine. You can use javasvn as your providerImplementation with this configuration:



    If you need a specific version of Subversion (we’re still using 1.5 here) you can pin to a specific version of svnkit too:

    Git Baby is a git and github fan, let's start git clone.