blutorange / closure-compiler-maven-plugin

Combine and minimize JavaScript with Closure Compiler.
http://blutorange.github.com/closure-compiler-maven-plugin
Apache License 2.0
52 stars 6 forks source link

Exception 'Failed to concatenate files' raised in linux build #20

Closed blutorange closed 1 year ago

blutorange commented 5 years ago

Issue by GregDomjan Thursday Mar 23, 2017 at 00:24 GMT Originally opened as https://github.com/samaxes/minify-maven-plugin/issues/139


Had issue with our desired layout, came up with solution to get files to root folder when running build on Windows <jsTargetDir>js/..</jsTargetDir> <!-- if empty takes the jsSourceDir value -->

When running build on Linux for clean build get the following issue - doesn't happen on subsequent non-clean build.

[INFO] Processing source file [foo.js]. [ERROR] Failed to concatenate files. java.io.FileNotFoundException: /home/someapp/target/someapp-0.0.1-0-SNAPSHOT/js/../mergedfoo.js (No such file or directory) at java.io.FileOutputStream.open0(Native Method) at java.io.FileOutputStream.open(FileOutputStream.java:270) at java.io.FileOutputStream.(FileOutputStream.java:213) at java.io.FileOutputStream.(FileOutputStream.java:162) at com.samaxes.maven.minify.plugin.ProcessFilesTask.merge(ProcessFilesTask.java:203) at com.samaxes.maven.minify.plugin.ProcessFilesTask.call(ProcessFilesTask.java:175) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

Is there a better way to address the jsTarget to the root rather than a subfolder and not match the jsSourceDir?

blutorange commented 5 years ago

Comment by samaxes Friday Mar 24, 2017 at 02:07 GMT


Which version of the plugin are you using?

blutorange commented 5 years ago

Comment by GregDomjan Friday Mar 24, 2017 at 02:32 GMT


Sorry I hadn't actually checked for an update before dropping the issue

<plugin>
    <groupId>com.samaxes.maven</groupId>
    <artifactId>minify-maven-plugin</artifactId>
    <version>1.7.4</version>

I should probably update to 1.7.6 anyway, but don't see reference to my underlying issue in changlog.

blutorange commented 5 years ago

Comment by samaxes Friday Mar 24, 2017 at 10:52 GMT


I did some some work regarding that error in version 1.7.5:

Clearer error message when target directory creation fails (#42, #87, #116).

Can you please try again with the last version of the plugin?

blutorange commented 5 years ago

Comment by GregDomjan Monday Mar 27, 2017 at 09:45 GMT


Thanks for that info. My linux host has just failed before I could check, will get back to you once recovered.

blutorange commented 5 years ago

Does this still happen?

blutorange commented 1 year ago

Closing as there is no feedback, I am using linux and everything is working fine, and the original issue is probably fixed in the current version.