Hi list, we have a strange problem here which occurs form time to time.
Our system: jdk 1.5.0_10 debian 4.0 maven 2.0.7 all builds are run inside a hudson (https://hudson.dev.java.net) instance (version: 1.160). When copying the artifacts of our project out of the target folder into the local repository, sometimes the following error occurs: ===============================///================================= org.apache.maven.lifecycle.LifecycleExecutionException: Error installing artifact: Failed to copy full contents from /path/to/file1 to /path/to/file/in/repo at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:42) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) at org.apache.maven.cli.MavenCli.main(MavenCli.java:280) 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:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at hudson.maven.agent.Main.launch(Main.java:97) at hudson.maven.MavenBuilder.call(MavenBuilder.java:109) at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:392) at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:358) at hudson.remoting.UserRequest.perform(UserRequest.java:69) at hudson.remoting.UserRequest.perform(UserRequest.java:23) at hudson.remoting.Request$2.run(Request.java:200) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Caused by: org.apache.maven.plugin.MojoExecutionException: Error installing artifact: Failed to copy full contents from /path/to/file1 to /path/to/file/in/repo at org.apache.maven.plugin.install.InstallMojo.execute(InstallMojo.java:143) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443) at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:132) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) ... 28 more Caused by: org.apache.maven.artifact.installer.ArtifactInstallationException: Error installing artifact: Failed to copy full contents from /path/to/file1 to /path/to/file/in/repo at org.apache.maven.artifact.installer.DefaultArtifactInstaller.install(DefaultArtifactInstaller.java:87) at org.apache.maven.plugin.install.InstallMojo.execute(InstallMojo.java:92) ... 31 more Caused by: java.io.IOException: Failed to copy full contents from /path/to/file1 to /path/to/file/in/repo at hidden.org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:878) at org.apache.maven.artifact.installer.DefaultArtifactInstaller.install(DefaultArtifactInstaller.java:73) ... 32 more ===============================///================================= The strange part is the IOException coming out of the FileUtils: There is one last check if the file has been successfully copied to the destination: ===============================///================================= if ( source.length() != destination.length() ) { final String message = "Failed to copy full contents from " + source + " to " + destination; throw new IOException( message ); } ===============================///================================= This check seems to fail from time to time. It is getting even worse when performing a diff on the source and the target file. The result is: no diff. The files are perfectly identical. What could cause this problem? Has anybody had this kind of problem before? Another strange thing is the package name of the FileUtils: *hidden*.org.codehaus.plexus.util.FileUtils While searching for this class I've found the plexus-utils project containing this file. But without the hidden in the package name. Is this something maven does to avoid class loading issues? Additionally I tried to add some debugging output to the FileUtils class. This works for some of the plugins, but not for the maven-install-plugin. (I replaced the FileUtils class of the plexus-utils jars 1.1 and 1.4.6). The install-plugin obviously seems to use another version of the plexus-utils. Is it possible to determine the exact version which it is using? I tried to use dependency:copy-dependencies to copy all maven-install-plugin dependencies into a specific directory. But instead of using the jar-versions in my local repository it downloaded more actual versions and copied them. Thanks for any help in advance. Cheers Francois --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
