Closed nalbion closed 10 years ago
I'm afraid it would go against motivations of grunt-maven-plugin :) (see "Motivation" paragraph in Readme)
Your current directory structure keeps a lot of stuff directly in webapp/*, making statics (frontend resources) mixed with WAR specific stuff (namely WEB-INF and META-INF). Main idea behind GMP is to keep those things separate. To treat static (fronted) resources as a separate application embedded into Java webapp. That's why GMP wants you to assign single directory as main directory of potentially standalone JS application.
Also having one designated directory for all static content (from Java point of view) makes it easy to create security and caching polices.
So although adding "extra-resources" would be easy, it would be against the philosophy behind GMP.
...I think https://github.com/allegro/grunt-maven-npm is doing the same thing, but pulling from Grunt rather than pushing from Maven.
This tasks role is to copy raw sources from Maven webapp sources to target-grunt, where Grunt tasks will be executed.
Yes, but it is used in different context (use Maven with "heavy" builds i.e. maven install
, use npm tasks when coding frontend stuff, so you see changes immediately).
That makes sense. static
can become an external git repository, imported using git subtree merge
- this would probably be more bower-friendly also.
I suppose I can have the grunt tasks rearrange the folders under target-grunt
, eg from /static/less' into
/css`
That was exactly the point :) Containing all frontend stuff makes it easier to use frontend tools on it without having to worry about Java artifacts.
Say I have the following directory structure:
grunt-maven-plugin
currently forces me to pick one directory off /webapp/ ("static" by default) - and then I suppose have an extra maven-resources-plugin execution or task in Gruntfile.js copy across the rest of the relevant resources.I think I will need to add an <extraResources> configuration item: