maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Zwiers <Jacob.Zwi...@tpsgc-pwgsc.gc.ca>
Subject [clean-plugin] Delete files with non-ASCII names created on Windows using clean on *nix
Date Wed, 21 Aug 2013 16:56:39 GMT
I have a resource file named "Mise à jour.pptx" under test/resources/pptx.

The file was created on Windows, checked into CVS and checked out onto a Linux server.

The filename on Linux now contains \o340 (which is the ISO-8859-1 / Win-1252 encoded value
for the à).

When running mvn -e clean on the project, I get (under maven-clean 2.5):

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean)
on project [project-name]: Failed to clean project: Failed to delete /homes/[path-to-project]/[project-name]/target/checkout/src/test/resources/pptx
-> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean
(default-clean) on project [project-name]: Failed to clean project: Failed to delete /homes/[path-to-project]/[project-name]/target/checkout/src/test/resources/pptx
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
        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:318)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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:414)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to clean project: Failed
to delete /homes/[path-to-project]/[project-name]/target/checkout/src/test/resources/pptx
        at org.apache.maven.plugin.clean.CleanMojo.execute(CleanMojo.java:215)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 19 more
Caused by: java.io.IOException: Failed to delete /homes/[path-to-project]/[project-name]/target/checkout/src/test/resources/pptx
        at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:249)
        at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:191)
        at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:158)
        at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:158)
        at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:158)
        at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:158)
        at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:158)
        at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:158)
        at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:117)
        at org.apache.maven.plugin.clean.CleanMojo.execute(CleanMojo.java:193)
        ... 21 more

On the previous version (2.4.1), the error message would specify the file name, but same basic
message.

I've changed the filename to replace the "à" with a plain "a" and it works (to verify that
nothing about file contents, other parts of name, permissions, etc. were causing issues. and
this is the work around that I will use).

This seems to be a known Java limitation when not using the NIO.2 (JSR-203) classes:
	http://bugs.sun.com/view_bug.do?bug_id=6522199
	http://bugs.sun.com/view_bug.do?bug_id=4899439

Am I understanding this correctly?

If so, are there other workarounds (i.e. besides renaming files)?

Thanks...
jz

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message