title: Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1
body: <p>I'm doing a maven project，and my IDE is Eclipse。What I cannot grasp is when I use “clean -X” in Eclipse，it will report the following error：</p>
  
  <pre><code>Apache Maven 3.0.4 (r1232337; 2012-01-17 16:44:56+0800)
  Maven home: /usr/share/java/apache-maven-3.0.4
  Java version: 1.7.0_05, vendor: Oracle Corporation
  Java home: /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre
  Default locale: zh_CN, platform encoding: EUC_CN
  OS name: "mac os x", version: "10.7.4", arch: "x86_64", family: "mac"
  [INFO] Error stacktraces are turned on.
  [DEBUG] Reading global settings from /usr/share/java/apache-maven-3.0.4/conf/settings.xml
  [DEBUG] Reading user settings from /Users/lingxiubo/Documents/maven/settings.xml
  [DEBUG] Using local repository at /Users/lingxiubo/Documents/maven/repo
  [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for /Users/lingxiubo/Documents/maven/repo
  [INFO] Scanning for projects...
  [DEBUG] Extension realms for project org.soft:soft-enrol:war:0.0.1-SNAPSHOT: (none)
  [DEBUG] Looking up lifecyle mappings for packaging war from ClassRealm[plexus.core, parent: null]
  [DEBUG] === REACTOR BUILD PLAN ================================================
  [DEBUG] Project: org.soft:soft-enrol:war:0.0.1-SNAPSHOT
  [DEBUG] Tasks:   [clean]
  [DEBUG] Style:   Regular
  [DEBUG] =======================================================================
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building soft-enrol Maven Webapp 0.0.1-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [DEBUG] Lifecycle default -&gt; [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
  [DEBUG] Lifecycle clean -&gt; [pre-clean, clean, post-clean]
  [DEBUG] Lifecycle site -&gt; [pre-site, site, post-site, site-deploy]
  [DEBUG] Lifecycle default -&gt; [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
  [DEBUG] Lifecycle clean -&gt; [pre-clean, clean, post-clean]
  [DEBUG] Lifecycle site -&gt; [pre-site, site, post-site, site-deploy]
  [DEBUG] === PROJECT BUILD PLAN ================================================
  [DEBUG] Project:       org.soft:soft-enrol:0.0.1-SNAPSHOT
  [DEBUG] Dependencies (collect): []
  [DEBUG] Dependencies (resolve): []
  [DEBUG] Repositories (dependencies): [spring-maven-release (http://maven.springframework.org/release, releases+snapshots), spring-maven-milestone (http://maven.springframework.org/milestone, releases+snapshots), JBoss Repo (https://repository.jboss.org/nexus/content/repositories/releases, releases+snapshots), people.apache.snapshots (http://repository.apache.org/content/groups/snapshots-group/, snapshots), central (http://repo.maven.apache.org/maven2, releases)]
  [DEBUG] Repositories (plugins)     : [apache.snapshots (http://repository.apache.org/content/groups/snapshots-group/, snapshots), central (http://repo.maven.apache.org/maven2, releases)]
  [DEBUG] -----------------------------------------------------------------------
  [DEBUG] Goal:          org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean)
  [DEBUG] Style:         Regular
  [DEBUG] Configuration: &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration&gt;
    &lt;directory default-value="${project.build.directory}"/&gt;
    &lt;excludeDefaultDirectories default-value="false"&gt;${clean.excludeDefaultDirectories}&lt;/excludeDefaultDirectories&gt;
    &lt;failOnError default-value="true"&gt;${maven.clean.failOnError}&lt;/failOnError&gt;
    &lt;followSymLinks default-value="false"&gt;${clean.followSymLinks}&lt;/followSymLinks&gt;
    &lt;outputDirectory default-value="${project.build.outputDirectory}"/&gt;
    &lt;reportDirectory default-value="${project.reporting.outputDirectory}"/&gt;
    &lt;skip default-value="false"&gt;${clean.skip}&lt;/skip&gt;
    &lt;testOutputDirectory default-value="${project.build.testOutputDirectory}"/&gt;
    &lt;verbose&gt;${clean.verbose}&lt;/verbose&gt;
  &lt;/configuration&gt;
  [DEBUG] =======================================================================
  [INFO] 
  [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ soft-enrol ---
  [DEBUG] Created new class realm maven.api
  [DEBUG] Importing foreign packages into class realm maven.api
  [DEBUG]   Imported: org.apache.maven.wagon.events &lt; plexus.core
  [DEBUG]   Imported: org.sonatype.aether.transfer &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.exception &lt; plexus.core
  [DEBUG]   Imported: org.sonatype.aether.metadata &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.util.xml.Xpp3Dom &lt; plexus.core
  [DEBUG]   Imported: org.sonatype.aether.collection &lt; plexus.core
  [DEBUG]   Imported: org.sonatype.aether.version &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.monitor &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.repository &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.repository &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.resource &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.logging &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.profiles &lt; plexus.core
  [DEBUG]   Imported: org.sonatype.aether.repository &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.classrealm &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.execution &lt; plexus.core
  [DEBUG]   Imported: org.sonatype.aether.artifact &lt; plexus.core
  [DEBUG]   Imported: org.sonatype.aether.spi &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.reporting &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.usability &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.container &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.component &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.authentication &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.lifecycle &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.classworlds &lt; plexus.core
  [DEBUG]   Imported: org.sonatype.aether.graph &lt; plexus.core
  [DEBUG]   Imported: org.sonatype.aether.* &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.settings &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.classworlds &lt; plexus.core
  [DEBUG]   Imported: org.sonatype.aether.impl &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.* &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.toolchain &lt; plexus.core
  [DEBUG]   Imported: org.sonatype.aether.deployment &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.observers &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.configuration &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.cli &lt; plexus.core
  [DEBUG]   Imported: org.sonatype.aether.installation &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.context &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.authorization &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.project &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.rtinfo &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.lifecycle &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.configuration &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.artifact &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.model &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.* &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.wagon.proxy &lt; plexus.core
  [DEBUG]   Imported: org.sonatype.aether.resolution &lt; plexus.core
  [DEBUG]   Imported: org.apache.maven.plugin &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.* &lt; plexus.core
  [DEBUG]   Imported: org.codehaus.plexus.personality &lt; plexus.core
  [DEBUG] Populating class realm maven.api
  [DEBUG] org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1:
  [DEBUG]    org.apache.maven:maven-plugin-api:jar:2.0.6:compile
  [DEBUG]    org.codehaus.plexus:plexus-utils:jar:2.0.5:compile
  [DEBUG] Created new class realm plugin&gt;org.apache.maven.plugins:maven-clean-plugin:2.4.1
  [DEBUG] Importing foreign packages into class realm plugin&gt;org.apache.maven.plugins:maven-clean-plugin:2.4.1
  [DEBUG]   Imported:  &lt; maven.api
  [DEBUG] Populating class realm plugin&gt;org.apache.maven.plugins:maven-clean-plugin:2.4.1
  [DEBUG]   Included: org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1
  [DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:2.0.5
  [DEBUG]   Excluded: org.apache.maven:maven-plugin-api:jar:2.0.6
  [DEBUG] Configuring mojo org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean from plugin realm ClassRealm[plugin&gt;org.apache.maven.plugins:maven-clean-plugin:2.4.1, parent: sun.misc.Launcher$AppClassLoader@424b29cf]
  [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean' with basic configurator --&gt;
  [DEBUG]   (f) directory = /Users/lingxiubo/Desktop/chenyl/soft-enrol/target
  [DEBUG]   (f) excludeDefaultDirectories = false
  [DEBUG]   (f) failOnError = true
  [DEBUG]   (f) followSymLinks = false
  [DEBUG]   (f) outputDirectory = /Users/lingxiubo/Desktop/chenyl/soft-enrol/target/classes
  [DEBUG]   (f) reportDirectory = /Users/lingxiubo/Desktop/chenyl/soft-enrol/target/site
  [DEBUG]   (f) skip = false
  [DEBUG]   (f) testOutputDirectory = /Users/lingxiubo/Desktop/chenyl/soft-enrol/target/test-classes
  [DEBUG] -- end configuration --
  [INFO] Deleting /Users/lingxiubo/Desktop/chenyl/soft-enrol/target
  [INFO] Deleting directory /Users/lingxiubo/Desktop/chenyl/soft-enrol/target/test-classes
  [INFO] Deleting dangling symlink /Users/lingxiubo/Desktop/chenyl/soft-enrol/target/soft-enrol/resource/image/login/?????? 1011_theme_asia.jpg
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 0.332s
  [INFO] Finished at: Sat Aug 04 15:10:46 CST 2012
  [INFO] Final Memory: 7M/101M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean) on project soft-enrol: Failed to clean project: Failed to delete /Users/lingxiubo/Desktop/chenyl/soft-enrol/target/soft-enrol/resource/image/login/?????? 1011_theme_asia.jpg -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean) on project soft-enrol: Failed to clean project: Failed to delete /Users/lingxiubo/Desktop/chenyl/soft-enrol/target/soft-enrol/resource/image/login/?????? 1011_theme_asia.jpg
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
  Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to clean project: Failed to delete /Users/lingxiubo/Desktop/chenyl/soft-enrol/target/soft-enrol/resource/image/login/?????? 1011_theme_asia.jpg
      at org.apache.maven.plugin.clean.CleanMojo.execute(CleanMojo.java:188)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      ... 19 more
  Caused by: java.io.IOException: Failed to delete /Users/lingxiubo/Desktop/chenyl/soft-enrol/target/soft-enrol/resource/image/login/?????? 1011_theme_asia.jpg
      at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:227)
      at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:186)
      at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:154)
      at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:154)
      at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:154)
      at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:154)
      at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:154)
      at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:115)
      at org.apache.maven.plugin.clean.CleanMojo.execute(CleanMojo.java:168)
      ... 21 more
  [ERROR] 
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  </code></pre>
  
  <p>But when I use the terminal operation <code>mvn clean</code>, it works.</p>