Closed nakrephg closed 5 years ago
This is caused by the fact that the InputStream
that is obtained in the m2e context throws an error when you try to call close
twice. This makes it impossible to both wrap the stream and do it with a try-with-resource-block. I had already rewritten it when doing a minify, now I also changed the part when resources are only copied.
This only seems to happen under Windows, which makes it harder to test. I released and uploaded version 2.1.1
. It should be available in maven central in the next few days. Please reopen if the issue persists.
Thank you for your prompt confirmation and correction. However, This fix does not work.
The same error occurred and only the line was changed.
ProcessFilesTask.java:366 -> ProcessFilesTask.java:396
....
.....
at com.github.blutorange.maven.plugin.closurecompiler.plugin.ProcessFilesTask.merge(ProcessFilesTask.java:396)
at com.github.blutorange.maven.plugin.closurecompiler.plugin.ProcessFilesTask.processFiles(ProcessFilesTask.java:248)
at com.github.blutorange.maven.plugin.closurecompiler.plugin.ProcessFilesTask.call(ProcessFilesTask.java:190)
at com.github.blutorange.maven.plugin.closurecompiler.plugin.MinifyMojo.execute(MinifyMojo.java:655) ... 31 more
I do not know how to reopen this issue. Maybe I don't have authority.
Thanks for the reply. There is one more part where I need to make the above-mentioned modification
Hmm, I got around to test it with Window and it works for me even with version 2.1.0. Regardless, I made sure the OutputStream from m2e is not closed twice and released a snapshot version:
<groupId>com.github.blutorange</groupId>
<artifactId>closure-compiler-maven-plugin</artifactId>
<version>2.2.0-SNAPSHOT</version>
Can you please try with that version whether that solves the error? (Make sure you restart eclipse after changing the version)
2.2.0-SNAPSHOT version was tested. The error message was confirmed to have disappeared.
The test was conducted with 2.1.1 and 2.1.0 and 2.2.0-SNAPSHOT in my development environment and the two previous versions confirmed that Stream Closed occurred and that it did not occur at 2.2.0-SNAPSHOT.
Thank you for the modification.
Thank you for testing. I'm glad this is resolved.
I released version 2.2.0
now, which also includes the latest version of closure compiler.
eclipse error message in pom.xml
Detailed error messages are as follows:
This is my pom.xml setting.