Re: 2.8.2 -> 2.8.4: antBuilderOutput.log, deleted on ant task completion?
Dan Rollo <[email protected]>
| Newsgroups | gmane.comp.java.cruise-control.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Marc, You're probably correct in that changes to BuildOutputManager might explain the behavior differences you're seeing (or it could be AntBuilder changes). One problem is the file you were using "antBuilderOutput.log" is NOT really intended for preservation of the raw build output (though it was clearly doing that just fine for you). That file is a necessary side effect of the way ant output is captured, and the file was intended only for use by the Dashboard to show live output as the build was running. That said, the file is produced by ant due to CC adding an ant output listener, and there's not reason you could not add you own output listener that writes to a file that CC will not muck with. Take a look at the docs for the Ant builder and maybe the 'uselogger' tag. Frankly, it's probably easier (and safer) to just add the required commands to store the ant output to the ant command (or even your ant build file). This way, you don't end up depending on CC "internals" like the "antBuilderOutput.log". Dan From: "Marc W." <[email protected]> Subject: Re: [Cruisecontrol-user] 2.8.2 -> 2.8.4: antBuilderOutput.log deleted on ant task completion? To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset="iso-8859-1" Thanks for your response, Jeffrey. In experimenting with the saveLogDir attribute, it appears it may be more of a workaround for me, for the following reasons: * It requires the directory to exist before the build is kicked off (check is part of AntBuilder's validate() method), so I can't save it directly to the project's build's artifacts folder (which is determined based on the cctimestamp). I think this check should be done later in the cycle, probably just before the actual saving. * It saves the log in XML form, and so I would have to further translate to make it human-readable. In fact, its contents are the same as what you'd find in the resulting XML log file (it merely saves a separate copy of just the /cruisecontrol/build portion). * It names the log, "log.xml", so I'd have to use a directory path unique to the project to avoid potential collisions with other builder threads. * For some reason, I cannot use the project working directory (my antWorkingDir) for saveLogDir, for it seems to be deleted (I haven't investigated this too much, but it simply works if I use a different directory). Looking at code changes between 2.8.2 and 2.8.4, I can't figure out what change would cause the antBuilderOutput.log to disappear, perhaps in BuildOutputManager.java? If you can see how I might be able to preserve the antBuilderOutput.log (I'm even comfortable making a source code change to my instance if that would be required), I would be most appreciative. Thank you, -Marc ------------------------------------------------------------------------------ Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d