The following comment has been added to this issue: Author: Andrew Stevens Created: Sun, 8 May 2005 9:59 AM Body: If the build fails, what difference does it make that there's only half a file there? It's not as if you'd want to deploy it anyway... Leaving the old versions of the files intact seems more dangerous, since you might end up deploying an inconsistent application (new classes and an old deployment descriptor) which has potential for all sorts of bugs.
--------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1388?page=comments#action_16510 --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1388 Here is an overview of the issue: --------------------------------------------------------------------- Key: XDT-1388 Summary: Invalid files left behind after failed build process Type: Bug Status: Open Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: XDoclet Versions: 1.2.3 Assignee: xdoclet-devel (Use for new issues) Reporter: Darryl Miles Created: Sat, 7 May 2005 12:35 AM Updated: Sun, 8 May 2005 9:59 AM Description: I think that XDoclet during its building of output files is truncating the destination file and writing new data directly into it, instead of generateing the new file as a tmp file in the same dir first then renaming to overwrite. If an error occurs during the writing process XDoclet seems to just abort where it is and leave behind a half generated descriptor file. Bad generation sequence for output.xml: Open output.xml with O_TRUNC Read source files writing directly to output.xml Close output.xml Good generation sequence for output.xml: Unlink output.xml.tmp (just in case) Open output.xml.tmp with O_TRUNC|O_EXCL (any securly generated tmpfile in same dir will do) Read source files writing directly to output.xml Close output.xml.tmp Rename output.xml.tmp to output.xml --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 _______________________________________________ xdoclet-devel mailing list xdoclet-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-devel