minify-maven-plugin
minify-maven-plugin copied to clipboard
Why webappSourceDir and cssSourceDir?
It's confusing. Why not only cssSourceDir and default value for it "${basedir}/src/main/webapp/css". In our project we have separate module for styles, it's not webapp and webappSourceDir is meaningless. And for target it's the same, we have webappTargetDir and relative cssTargetDir.
The actual css directory used by the plugin is ${webappSourceDir} + '/' + ${cssSourceDir}, and the default for ${cssSourceDir} is 'css', as for ${webappSourceDir} the default is also resonable '${basedir}/src/main/webapp', so in your case thos properies can not be specified in pom.xml
It's clear to me and I am not building webapp (no maven-war-plugin).
Plugin is configured to be used with maven-war-plugin. Probably many users will use plugin in their war projects, but it's not always true.
The reasoning being this choice was that for the vast majority of cases you don't need to change webappSourceDir
. And if you want to use styles
instead of css
for the cssSourceDir
, just changing that specific folder name is easier than having to define the entire path.
Of course, this means that for less common scenarios you need to define both options in the plugin configuration.
I'm not sure which one is the better solution, but i'm slightly inclined to leave it as it is unless there are more arguments against it.
Simply, I would leave only cssSourceDir. Typing entire path once isn't hard. No other arguments. If you don't see the sense, you can can close the issue.
Something like what aibar said would prove useful to me.