On 04/02/2011 09:24 PM, Brian Leathem wrote:
I have a few static files I want to add to the project (facelet
files).
Any pointers to where I should be looking to achieve this would be
appreciated...
Brian
FYI: solved this as follows:
DirectoryResource webRoot =
project.getFacet(WebResourceFacet.class).getWebRootDirectory();
DirectoryResource templateDirectory =
webRoot.getOrCreateChildDirectory("templates");
FileResource<?> templatePage = (FileResource<?>)
templateDirectory.getChild("template.xhtml");
InputStream stream =
RichFacesPlugin.class.getResourceAsStream("/org/richfaces/forge/template.xhtml");
templatePage.setContents(stream);
pipeOut.println(ShellColor.YELLOW,
String.format(SUCCESS_MSG_FMT, "template.xhtml", "file"));
Brian