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 keeps adding job in the build queue and keeps building them
  • Tracking code versions in an executable
  • Should I use `git push --force` in my build step
  • How to organize full build pipeline with Gulp, Maven and Jenkins, all the way to integration tests?
  • Continuous integration with Android
  • How to not trigger a build in Teamcity if only a specific file changed
  • 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 Git Release Failure
  • using CCtray with Jenkins, while security enabled (using HTTPS)
  • Jenkins Sonar Job aborted by anonymous. Weird job build behaviour
  • How to get stdout and stderr from single Jenkins Pipeline parallel blocks?
  • Configuring Jenkins with StartSSL - adding the issuer chain
  • Error building iOS project with Jenkins on MacOS X Lion
  • 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.