This is really just a Maven/JSF question. Jenkins does not really enter the equation, and neither does CloudBees (note we [cloudbees] also support Subversion hosted repositories which may or may not fit your project structure better... in any case GIT is IMHO “better” so I would go for GIT over Subversion if it was me)
You have three options really.
Keep the XHTML in a separate GIT repository
Keep everything in one repository.
A kind of mix of 1 & 2
Option 1
This will drive you down the road of GIT submodules... that is the one case where I would favour Subversion over GIT... and no I don't mean that svn:externals
is better that GIT, more that Subversion allows you to check out a portion of the repository, so the UI team could just check out the sub-path where the XHTML files live, IOW
$ svn co https://svn-user1530669.forge.cloudbees.com/jsf-app/trunk/web-module/src/main/webapp web-content
$ cd web-content
would work for the UI team and
$ svn co https://svn-user1530669.forge.cloudbees.com/jsf-app/trunk jsf-app
$ cd jsf-app
$ mvn package
will work for the Java developers.
To achieve the same with GIT requires the use of sub-modules, so you would have one sub-module at web-module/src/main/webapp
in the jsf-app GIT repo.
Where this becomes a pain is when the Java developers need to make tweaks to the XHTML files as well, depending on the IDE it can be tricky to get the commits in the submodule to take correctly. Also you now do not have a single revision to track, the two repos can move independently... which can degrade some of the features of GIT.
When you want to use the Maven release plugin (and you should want to) Submodules will prevent you, as both the idea of tagging submodules is not currently supported by the release plugin, and there is that two separate repos to track issue again.
Option 2
This really is the better option... even though it is doing exactly what you said you didn't want to do.
The trick here is to make the UI developer's life easier.
You should set up a nice Maven profile with a default goal which ends up running the web application with e.g. jetty:run see for example This pom profile If you check out that project and just run
$ mvn -Pdemo
It will fire up the web application from the sub-module having built all the dependent modules.
Using this approach means that the UI guys can also test the UI changes integrated into the JSF app reducing the load on the Java guys.
Option 3
This is a kind of mix, you have separate GIT modules for the XHTML and the Java, but they are valid Maven projects.
You can achieve this in two ways...
Have the XHTML module be a <packaging>war</packaging>
which is extracted into the Java web-app using Maven War Overlays
Have the XHTML module be a <packaging>war</packaging>
which has the Java dependencies pulled in directly.
The first has the advantage that the Java developers can work with the Java code quickly, but the side-effect is fixing XHTML is tricky e.g. data-binding attributes
The second makes tweaking the Java harder (have to keep running mvn install
), the UI guys have to pull down the Java .JARs from the remote Maven repo if they want to spin up the Maven packaging, and hence you may expose some of your java internals to the UI guys.
TL;DR
Personally, unless keeping things secret from the UI guys is something that is important, I would pick Option 2