[
http://jira.codehaus.org/browse/MOJO-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=213641#action_213641
]
Sergio Sama commented on MOJO-1406:
-----------------------------------
As you can see in File.createTempFile specification[1], the temp file is
created in java.io.tmpdir, so the patch creates the file where the original
Java file wants to, but this way makes it work in Windows systems too. Both
ways create the temp file in the same place.
[1]
http://java.sun.com/javase/6/docs/api/java/io/File.html#createTempFile(java.lang.String,
java.lang.String, java.io.File)
> maven-wagon-plugin fails to create temp folder on Windows
> ---------------------------------------------------------
>
> Key: MOJO-1406
> URL: http://jira.codehaus.org/browse/MOJO-1406
> Project: Mojo
> Issue Type: Bug
> Components: wagon
> Environment: Windows NT, Eclipse build id 20090619-0625, m2eclipse
> 0.9.8.200905041414, jdk 1.6.0_11
> I'm not running maven embedder
> rarther i'm right-clicking pom.xml and doing Maven ... compile
> generate-sources
> I think this causes external maven to be run which is 2.0.9
> wagon-maven-plugin 1.0-beta-1
> Reporter: Anton Tagunov
> Assignee: Dan Tran
> Attachments: patch.txt
>
>
> Hi, hope this is the right place to report this
> I'm trying to use wagon in this config
> <build>
> <plugins>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>wagon-maven-plugin</artifactId>
> <configuration>
>
> <source>file:${project.build.sourceDirectory}/main/resources</source>
>
> <target>file:${project.build.directory}/generated-sources/abc</target>
> <inputDirectory>def</inputDirectory>
> </configuration>
>
> <executions>
> <execution>
> <phase>generate-sources</phase>
> <goals>
> <goal>copy</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> ...
> I'm getting an elaborate stack trace
> debugging this I can the debugger to to into
> WinNTFileSystem.createFileExclusively
> stepping one frame up into File.checkAndCreate I see that it's trying to
> create file named
> C:\DOCUME~1\myname\LOCALS~1\Temp\C:\DOCUME~1\myname\LOCALS~1\Temp\5068977739797048514wagon
> The reason is probably that at least on Windows File.createTempFile(String,
> String) doesn't expect folder as first argument
> Rather it expects smth like "tmp-"
> I think three argument method File.createTempFile(String, String, File)
> should be used
> Hopefully this will also work on Unix and others
> ---
> P.S. Here's the error I'm getting
> Error stacktrace:
> org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the
> plugin manager executing goal
> 'org.codehaus.mojo:wagon-maven-plugin:1.0-beta-1:copy': Mojo execution failed.
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:505)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
> at
> org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
> at
> org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
> at
> org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
> at
> org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
> at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
> 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:289)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Mojo execution
> failed.
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:601)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
> ... 20 more
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error during
> performing repository copy
> at
> org.codehaus.mojo.wagon.AbstractCopyMojo.execute(AbstractCopyMojo.java:53)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:579)
> ... 21 more
> Caused by: java.io.IOException: The filename, directory name, or volume label
> syntax is incorrect
> at java.io.WinNTFileSystem.createFileExclusively(Native Method)
> at java.io.File.checkAndCreate(File.java:1704)
> at java.io.File.createTempFile(File.java:1792)
> at java.io.File.createTempFile(File.java:1828)
> at
> org.codehaus.mojo.wagon.shared.DefaultWagonCopy.copy(DefaultWagonCopy.java:59)
> at org.codehaus.mojo.wagon.CopyMojo.copy(CopyMojo.java:77)
> at
> org.codehaus.mojo.wagon.AbstractCopyMojo.execute(AbstractCopyMojo.java:49)
> ... 22 more
> P.P.S. Here's top of wagon-maven-plugin pom.xml
> <parent>
> <artifactId>mojo-parent</artifactId>
> <groupId>org.codehaus.mojo</groupId>
> <version>18</version>
> </parent>
> <artifactId>wagon-maven-plugin</artifactId>
>
> <packaging>maven-plugin</packaging>
>
> <name>Maven Wagon plugin</name>
>
> <description>
> Maven 2 plugin that can be used to access various operations on a given
> URL using a supported maven wagon. Supports
> recursive upload, download and list directory content functionality.
> </description>
>
> <version>1.0-beta-1</version>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email