Module Loader for JBoss and Wildfly that allows Ceylon modules in web applications
See https://github.com/dgwave/ceylon-jboss-loader/tree/master/src/test/resources/webapp
- The Ceylon module containing your Ceylon servlets needs to be defined in
WEB-INF/jboss-deployment-structure.xml
as<resource-root path="WEB-INF/lib/hello.world-1.0.0.car"/>
or any other path within your WAR. - For now, immediate dependencies of your servlet Ceylon module need to be defined similar to
<module name="ceylon.html" slot="1.0.0"/>
. Transitive dependencies are handled automatically. With an upcoming Wildfly subsystem that we are developing, this will not be necessary.
- Create Ceylon add on layer by creating directory
wildfly-8.0.0.Final/modules/system/add-ons/ceylon
- Copy the contents of your deployment-ready Ceylon distribution repo directory into this Ceylon add-on layer directory
- Copy the contents of your deployment-ready Ceylon SDK and any other Ceylon or Ceylon-ized Java modules into this same Ceylon add-on layer directory
- Build the Ceylon loader (this project) with
mvn clean package
- Copy
ceylon-loader-0.5.jar
from thetarget
directory into the Ceylon add-on layer under thecom/dgwave/car/loader/main
sub-directory - Copy
src/main/resources/module/main/module.xml
into the same directory as (5) above
- Open Wildfly Runtime Server configuration (Needs JBoss Studio or Wildfly server plugin)
- Click on
Open Launch Configuration
and select theClasspath
tab - Under
User Entries
, findceylon-loader-0.5.jar
where you copied it into the Ceylon add-on layer - Select the
Arguments
tab and add this at the end of theVM Arguments
box:-Dboot.module.loader=com.dgwave.car.loader.CarModuleLoader
- For Windows: Add this at the very end of your
standalone.conf.bat
ordomain.conf.bat
:
set "JAVA_OPTS= -classpath %JBOSS_HOME%\jboss-modules.jar;%JBOSS_HOME%\modules\system\add-ons\ceylon\com\dgwave\car\loader\ceylon-loader-0.5.jar -Dboot.module.loader=com.dgwave.car.loader.CarModuleLoader %JAVA_OPTS%"
- For Windows: Replace this line in
standalone.bat
ordomain.bat
. This is supported as JBoss Studio works with this mechanism:
-jar "%JBOSS_HOME%\jboss-modules.jar" ^
with
org.jboss.modules.Main ^
Very similar to above, but still to be tested. TBD