You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 23, 2022. It is now read-only.
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;
/**
private boolean maintainTimestamps;
/**
*
@@ -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);
The text was updated successfully, but these errors were encountered: