I am building a build process for our web development team. All it needs to do is read a global.css file, find all the stylesheets that are used for the project, concat them into one large file, then compress this file using the YUI Compressor. So far I am all the way up to the point of the compressor.
I am importing the YUI Compressor jar file. I am able to create a CssCompressor object and it works! But, the issue I am having is that the file that is outputted is being cut off. The compressor is leaving off the last 1/4 of the file. It literally cuts off in the middle of a CSS declaration.
I thought it might be the concatenation that was causing this but it is combining all the stylesheets correctly. Any help/guidance would be greatly appreciated.
Cutting off an output file sounds to me like you are not closing the stream when you are done with it (actually flushing is the necessary bit, but closing should automatically flush the stream).
Is there a close()
method somewhere for you to call?