forked from samaxes/minify-maven-plugin
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
closureCreateSourceMap: sourceMappingUrl link not generated on rebuild #23
Comments
Comment by tekhedd FYI workaround: add this so that it will run before the minify plugin. (Note use of deprecated tasks element!) [updated to fix failure to build after clean]
|
Comment by ghost +1 |
Should be fixed via merging samaxes#149 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue by tekhedd
Wednesday Apr 12, 2017 at 18:44 GMT
Originally opened as samaxes#142
Using minify-maven-plugin 1.7.6.
When rebuilding a project using closureCreateSourceMap, the sourceMappingUrl is correctly generated on a clean build, but not inserted into the minified file on a rebuild.
My tests indicate that the //#sourceMappingUrl will be generated only if the original .js.map file does not exist. In other words, if I run
mvn clean ; mvn package
sourceMappingUrl is present.
If I run 'mvn package' again without cleaning, sourceMappingUrl is missing.
If I manually remove target/exploded-dir/merged.min.js.map and then run 'mvn package' again, the sourceMappingUrl is generated.
The timestamp on the .map file is not changed, so it appears that closure is failing to regenerate it, hence the missing sourceMappingUrl line.
Workaround? Explicitly delete the source map file as part of the build, or always explicitly clean the target before deploying. (The target always runs regardless of whether it needs to be rebuilt, so in netbeans "clean and build" followed by "run" results in no map file.)
Note: all mvn runs performed with "-e" "-DskipTests" for this experiment. Hope this helps.
File names have been changed to protect the innocent.
The text was updated successfully, but these errors were encountered: