Closed Shabin closed 5 years ago
Your configuration looks good. It should output the files the way you expect. May be a bug, I'll take a look into what's going on.
File paths are now preserved. The plugin option outputFilename
now supports the variable #{path}
and now defaults to
<configuration>
<outputFilename>#{path}/#{basename}.min.#{extension}</outputFilename>
</configuration>
This should do what you need, see also the newly added test
You can try a snapshot of the next version:
<plugin>
<groupId>com.github.blutorange</groupId>
<artifactId>closure-compiler-maven-plugin</artifactId>
<version>2.4.0-SNAPSHOT</version>
</plugin>
Please report back if you notice anything not working. I'll release version 2.4.0 shortly.
2.4.0
is available
I was using samaxes/minify-maven-plugin and I just upgraded to this plugin. After that I found a major mismatch in the ouptput directory location.
I have js files in multiple input folders
for eg: src\main\resources\META-INF\resources\js\f1\file1.js src\main\resources\META-INF\resources\js\f1\file2.js src\main\resources\META-INF\resources\js\f2\file3.js src\main\resources\META-INF\resources\scripts\file4.js
Using samaxes/minify-maven-plugin I used to configure like this
The minified files ouput for this used to be: src\main\resources\META-INF\resources\js\f1\file1.min.js src\main\resources\META-INF\resources\js\f1\file2.min.js src\main\resources\META-INF\resources\js\f2\file3.min.js src\main\resources\META-INF\resources\scripts\file4.min.js the target directory was same as the source directory.
But with the current plugin, for the configuration
the output is: src\main\resources\META-INF\resources\file1.min.js src\main\resources\META-INF\resources\file2.min.js src\main\resources\META-INF\resources\file3.min.js src\main\resources\META-INF\resources\file4.min.js
All output is coming to the targetDir location without considering the actual source path of the js file. How to achieve the older way of output.