Currently we have the RichWidgets resources included in RichFaces via a git submodule with RichWidgets storing it's compiled resources in version control to make them available for RichFaces. This is less than ideal for two reasons:
- Storing the compiled resources in the RichWidgets "dist" folder is messy and leads to lots of merge conflicts and other superfluous commits
- Having a submodule in RichFaces (slightly) complicates the clone and build process.
- It will likely fail for most people on the first attempt.
- With appropriate error messaging and docs we can however reduce the impact of this (but still a PITA)
A solution to 1) is to configure maven to build the grunt resources directly. I have created RF-13123 [A] to address this. As the first comment in that issue I posted a brief survey of the respective approaches to building the RichWidget resources. In this thread I would like to discuss an alternate approach.
- locally executing the RichWidget grunt build
- manually copying (rsync) the dist folder into RichFaces
- committing the updated resources into the RichFaces repo
The advantages of doing this is we keep the RichFaces build to be a "pure java" maven build, and simplify the clone/build process that may trip up new contributors (see problem # 2 at the top). One counter-argument to this approach is the introduction of an additional step (compile and commit) to keep the RichFaces build current. However this is essentially the same as it is now, since one has to update the submodule and commit the submodule change to the RichFaces repo.
This approach also has the advantage of being "The Simplest Thing That Could Possibly Work" [B], and would get us rolling with a workable solution right away. We could re-visit the problem down the road when the maven/node plugins have matured.