I'm working on a project that needs to compile and build with *either* the JSF Reference Implementation *or* Apache MyFaces. This has to be user-specified, at build time. In addition to compilation and including the correct .jar files in a webapp, there's also a modification that must be done to web.xml, commenting out a section if we're using the RI, leaving it in place for MyFaces.

And I had it working by having the user specify which JSF api and implementation .jar files to use, as properties:

maven.shale.jsf.api.jar=${maven.repo.local}/myfaces/jars/myfaces-jsf-api-1.0.9.jar
maven.shale.jsf.impl.jar=${maven.repo.local}/myfaces/jars/myfaces-impl-1.0.9.jar
  or
maven.shale.jsf.api.jar=${maven.repo.local}/javax.faces/jars/jsf-api-1.1.jar
maven.shale.jsf.impl.jar=${maven.repo.local}/javax.faces/jars/jsf-impl-1.1.jar

But then I found out that for MyFaces, there is a *third* .jar file that must be included in the .war file. So now (realizing that there's probably no way I can avoid a bunch of scripting) I'm thinking of having the user specify either:

maven.shale.jsf = [myfaces|jsfri]
 or
maven.shale.jsf.ri = [true|false]
maven.shale.jsf.myfaces = [true|false]

Before I go any further with that, is there a precedent I should follow?

Alternately, because I can't specify "a" dependency in the project.xml file, I already wrote 'myfaces-project.xml' which does nothing but declare the dependencies so Maven will download them. Is it possible that the "right answer" is to have a 'myfaces-project.xml' file in each directory and do either

$ maven build-all
  or
$ maven -p myfaces-project.xml build-all

depending on which JSF implementation you want to use? I'm not sure I want to start down that path, given that there may eventually be multiple JSF implementations from which to choose.

What would you do in this situation?

If you want to take a look at the files:
  http://svn.apache.org/viewcvs.cgi/struts/shale/trunk/
or
  $ svn co http://svn.apache.org/repos/asf/struts/shale/trunk/ shale

(If you want to try to build it, read this first: http://wiki.wsmoak.net/cgi-bin/wiki.pl?ShaleMavenBuild )

Thanks for any advice! I note that there is only one thread on this topic in the archives... one post, with no replies.

--
Wendy Smoak



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to