[
http://jira.codehaus.org/browse/MJAVACC-71?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benjamin Bentmann closed MJAVACC-71.
------------------------------------
Assignee: Benjamin Bentmann
Resolution: Fixed
Fix Version/s: 2.4
Committed in r6148.
> JTB mojo fails to move output files to proper directory on Windows
> ------------------------------------------------------------------
>
> Key: MJAVACC-71
> URL: http://jira.codehaus.org/browse/MJAVACC-71
> Project: Maven 2.x JavaCC Plugin
> Issue Type: Bug
> Components: jtb
> Affects Versions: 2.3
> Environment: Maven 2.0.8, JDK 1.5.0_12, WinXP
> Reporter: Benjamin Bentmann
> Assignee: Benjamin Bentmann
> Priority: Blocker
> Fix For: 2.4
>
>
> The mojo executes the following lines to move JTB's output to the configured
> output directory:
> {code:java}
> File tempDir = ...;
> File newDir = ...;
> newDir.mkdirs();
> tempDir.renameTo( newDir );
> {code}
> i.e. the target directory is created before the move.
> This always fails on Windows which requires that the destination
> file/directory does not already exist (see [MoveFile
> AP|http://msdn2.microsoft.com/en-us/library/aa365239(VS.85).aspx]).
> Moving via rename is in general no reliable solution: If the user edits the
> JTB input file and re-generates the sources without an intermediate clean
> phase, the still existing output files from the previous generation will fail
> the move, too. Therefore, we should really employ a copy+delete idiom to do
> the move here.
--
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