On Sunday 20 January 2008, Jason van Zyl wrote: > On 20-Jan-08, at 9:15 AM, Daniel Kulp wrote: > > It probably should be switched to using the plexus > > FileUtils.copyFile(...). We had the code in there while Dan F. and > > I were trying to figure out why the renames were not working > > (MSHADE-5). > > Renames where? They don't historically work on Windows across file > systems, but this should be taken care of in p-u. It wasn't working?
It wasn't accross file systems. It was files in the target dir. The problem was that in SOME cases, some previous plugins are not closing the streams or SOMETHING leaving the jar files locked so they couldn't be replaced. (on on Windows) In SOME cases, just calling System.gc() to cause the old streams to be garbage collected allowed the rename to work. In other cases, the workaround was to overwrite the original with the copy if the rename didn't work. That worked fine. The problem is that FileUtils.rename attempts to delete the "to" file first and throws an exception if it fails. If it's locked, it won't delete and thus won't work. Dan > > Having the code copied in allowed some "println" debugging stuff.. > > Now that that all seems resolved, it should be flipped back. > > > > Dan > > > >> Thanks, > >> > >> Jason > >> > >> ---------------------------------------------------------- > >> Jason van Zyl > >> Founder, Apache Maven > >> jason at sonatype dot com > >> ---------------------------------------------------------- > >> > >> In short, man creates for himself a new religion of a rational > >> and technical order to justify his work and to be justified in it. > >> > >> -- Jacques Ellul, The Technological Society > >> > >> > >> > >> > >> ------------------------------------------------------------------- > >>-- To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- > > J. Daniel Kulp > > Principal Engineer, IONA > > [EMAIL PROTECTED] > > http://www.dankulp.com/blog > > > > -------------------------------------------------------------------- > >- To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > Thanks, > > Jason > > ---------------------------------------------------------- > Jason van Zyl > Founder, Apache Maven > jason at sonatype dot com > ---------------------------------------------------------- > > First, the taking in of scattered particulars under one Idea, > so that everyone understands what is being talked about ... Second, > the separation of the Idea into parts, by dividing it at the joints, > as nature directs, not breaking any limb in half as a bad carver > might. > > -- Plato, Phaedrus (Notes on the Synthesis of Form by C. Alexander) > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]