Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-17777

Build Failure on Maven Clean

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin

      Running Maven build project pulled from GitHub. It's failing on the third project trying to clean. Can't delete some files.

      Attached is the console output log ConsoleText.txt

      When I build using Maven at the command line, I get the same result, with some additional information; some of the folders seem to be created by Jenkins with higher security:

      Using   mvn clean install -e

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project com.sap.
      core: Failed to clean project: Failed to delete D:\Jenkins\jobs\CQ_Development_Branch_jtest\workspace\bundles\com.sap.co
      re\target\generated-sources\annotations -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-clean-plug
      in:2.5:clean (default-clean) on project com.sap.core: Failed to clean project: Failed to delete D:\Jenkins\jobs\CQ_Devel
      opment_Branch_jtest\workspace\bundles\com.sap.core\target\generated-sources\annotations
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
              ...
      Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to clean project: Failed to delete D:\Jenkins\jobs\CQ_
      Development_Branch_jtest\workspace\bundles\com.sap.core\target\generated-sources\annotations
              at org.apache.maven.plugin.clean.CleanMojo.execute(CleanMojo.java:215)
              ...
      Caused by: java.io.IOException: Failed to delete D:\Jenkins\jobs\CQ_Development_Branch_jtest\workspace\bundles\com.sap.c
      ore\target\generated-sources\annotations
              at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:249)
              ...
      

      I attached the full console output ConsoleText_M2.txt

      If I try to go and manually delete the files, I get a prompt that I need administrator privileges to delete:

      Tried the following:

      • Run the service under account that is administrator on the machine
      • Set compatibility mode on jenkins.exe to run with administrative privileges
      • Set the "Wipe out workspace before build" option
      • Add mvn clean as a pre-step
      • Disable all virus-scanning on the server

      All give same result.

      A couple other oddities:

      • Adding the -e switch to the goals in the Jenkins configuration doesn't seem to work.
      • The Jenkins output doesn't have any information about the file delete IO error.

        1. AdminPriv.jpg
          AdminPriv.jpg
          22 kB
        2. ConsoleText_M2.txt
          11 kB
        3. ConsoleText.txt
          24 kB

            Unassigned Unassigned
            jeffhumphry Jeff Humphry
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: