Insert line breaks in output after the specified column number.
@@ -172,6 +181,7 @@ public class YuiCompressorMojo extends MojoSupport {
getLog().debug("compress file :" + src.toFile()+ " to " + src.toDestFile(suffix));
}
File inFile = src.toFile();
Long inFileTimestamp = inFile.lastModified();
File outFile = src.toDestFile(suffix);
getLog().debug("only compress if input file is younger than existing output file");
@@ -212,6 +222,10 @@ public class YuiCompressorMojo extends MojoSupport {
}
FileUtils.forceDelete(outFile);
FileUtils.rename(outFileTmp, outFile);
Currently there's no support to carry over the timestamp from the input file to the output file.
Below is a patch to achieve this:
diff --git a/src/main/java/net_alchim31_maven_yuicompressor/YuiCompressorMojo.java b/src/main/java/net_alchim31_maven_yuicompressor/YuiCompressorMojo.java index d62b47a..d97e2fb 100644 --- a/src/main/java/net_alchim31_maven_yuicompressor/YuiCompressorMojo.java +++ b/src/main/java/net_alchim31_maven_yuicompressor/YuiCompressorMojo.java @@ -47,8 +47,17 @@ public class YuiCompressorMojo extends MojoSupport { * @parameter expression="${maven.yuicompressor.nosuffix}" default-value="false" / + private boolean nosuffix;
/**
@@ -172,6 +181,7 @@ public class YuiCompressorMojo extends MojoSupport { getLog().debug("compress file :" + src.toFile()+ " to " + src.toDestFile(suffix)); } File inFile = src.toFile();
@@ -212,6 +222,10 @@ public class YuiCompressorMojo extends MojoSupport { } FileUtils.forceDelete(outFile); FileUtils.rename(outFileTmp, outFile);