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.

  • Jenkins drop down list of build names of other job
  • Run a command shell in jenkins
  • In Jenkins, how do builds know who requested them?
  • How do I avoid issues with “Protected Mode” using IEDriverServer in Selenium?
  • Exclude directory during jenkins checkout
  • Gradle: How to perform git pull through gradle?
  • 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.

  • Jenkins: Trigger Multi-branch pipeline on upstream change
  • How to get PID and Port # for a Jenkins Process
  • Jenkins Git Release Failure
  • How to Run TestNG Tests on Jenkins
  • Is there a way to keep Hudson / Jenkins configuration files in source control?
  • Gradle: Could not create an instance of type
  • 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.