Do I need to move the Tomahawk and Facelets libs to the EAR root (and add it to application.xml or jboss-app.xml as java modules)
I would try that. Not sure if you need to move facelets out though.
Well, if I leave the facelets classes where they are, I get a ClassNotFoundException when I try to render a page (deployment works ok). However, declaring the facelets JAR as java module as well, gives me the following exception:
org.apache.myfaces.trinidadinternal.facelets.TrinidadComponentHandler must be an instance of com.sun.facelets.tag.TagHandler com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.createClass(TagLibraryConfig.java:281) com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.endElement(TagLibraryConfig.java:206)
However, TrinidadComponentHandler does extend TagHandler, so there must be another classpath problem somewhere.
I don't think I understand quite well how that works...
I should probably add that this is using Trinidad instead of Tomahawk, but the concept is the same...
Argh, the EAR file that I had deployed still had the Facelets libs in .war/WEB-INF/lib. So it was in the classpath twice... that's never good.