Best maven practices for modifying built war-file with generated resources -


currently i'm working on integrating grunt build process our maven build process. here 2 options can think of:

  1. pointing folder in resources target build dir grunt project.
  2. building grunt project wherever , enlisting this non-standard folders included resources in pom.xml.

it looks there yet space enhancement. basically, since grunt subproject not depend on external resources, nice learn how not rebuild war-file had been compiled, modify after rebuilding grunt-project.

so, question is: best practices adding generated resources existing war file.

the approach of adding resources war file amounts modifying maven-built artifact after maven builds it. runs counter maven philosophy of tightly controlling entire build of every artifact. have 3 choices:

  1. include grunt generated source in war's source , build single artifact maven. in case rebuild war every time grunt resources change, or
  2. put grunt generated sources in second maven artifact , make artifact dependency of war artifact. maven still rebuild war every time, separation of builds seem implying in question, or
  3. make dependency in (2) runtime dependency, if possible. make scope of grunt artifact dependency "provided" don't have rebuild war every time grunt artifacts change. have rebuild grunt artifact.

it sounds want go option (3).


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -