org.apache.maven.lifecycle.LifecycleExecutionException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Change the in pom.xml to use xml parameters instead of the list.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • 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}} \\ \\ {noformat}[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) ... {noformat} 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: !AdminPriv.jpg|width=500! 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.
    via by Jeff Humphry,
  • jaxb2-maven-plugin fails on Jenkins
    via by Unknown author,
  • GitHub comment 753#97112304
    via GitHub by arichiardi
    ,
  • First compilation error
    via GitHub by sekaijin
    ,
    • 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)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    33 more bugmates