Maven2 build failing in TeamCity

We have a Maven 2 project that builds fine from command line but fails in team City.

  • mvn clean install works fine both from command line and TeamCity
  • mvn clean install -Ppackages,rpm works fine from command line but fails on TeamCity with error:

    [08:38:55]: Provider message:
    [08:38:55]: The svn command failed.
    [08:38:55]: Command output:
    [08:38:55]: svn: '.' is not a working copy
    [08:38:55]: [ERROR] BUILD ERROR
    [08:38:55]: [INFO] ------------------------------------------------------------------------
    [08:38:55]: [INFO] Cannot get the revision information from the scm repository :
    [08:38:55]: Error!

Here is the build configuration:

  • Name: RPMs
  • Description: Build all RPM files
  • Build number format: {build.vcs.number.1}, next build number: #{build.vcs.number.1}
  • Artifact paths: **/target/*.rpm
  • Fail build if at least one test failed: ON
  • Execution timeout:         60 minutes
  • Maximum number of simultaneously running builds: 1
  • Status widget: disabled
  • Version control settings:
  • VCS checkout mode: Automatically on server
  • Checkout directory:         default
  • Clean all files before build: OFF
  • VCS labeling:                    disabled
  • Attached VCS roots:  
    Name Checkout rules Set label
    The Whole Shebang not specified NO
  • Runner: Maven2
  • Type of runner: Maven2 (Runner for Maven build file)
  • Directory where pom.xml file is located: not specified
  • Goals: clean install
  • Additional Maven command line parameters: -Ppackages,rpm
  • User settings path: not specified
  • JDK home path: not specified
  • JVM command line parameters: not specified

Environment is: TeamCity 4.0.2, Maven 2.0.9,  Subversion, Sun JDK 1.6.0_10, Ubuntu Linux

Did anybody have similar problem ?

Dragisa Krsmanovic

Comment actions Permalink

Please try to change checkout mode to "Automatically on agent", in this case .svn folders will be created in the working directory. If mode "automatically on server" is selected export is done on the server and then files are sent to an agent. No .svn folders will be created in this case.

Comment actions Permalink

That worked. Thanks !!


Please sign in to leave a comment.