- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
@Mojo(name="war",
defaultPhase=PACKAGE,
requiresProject=true,
threadSafe=true,
requiresDependencyResolution=RUNTIME)
public class WarMojo
extends org.apache.maven.plugin.war.WarMojo
packs a ruby application into war. it can add a launcher to it
so it can be executed like runnable jar or it can add an embedded
jetty to startup a webserver directly from the war.
adds jruby-complete.jar to WEB-INF/lib
adds jruby-rack.jar to WEB-INF/lib
shaded jruby-mains.jar (for the RUNNABLE case)
shaded jetty.jar + its dependencies (for the JETTY case)
all declared gems and transitive gems and jars are under WEB-INF/classes
all declared jars and transitive jars are under WEB-INF/classes
all declared resource are under WEB-INF/classes
adds the default resources to WEB-INF/classes
the main class (for RUNNABLE) needs to extract the jruby-complete.jar into a temp directory and
the launcher will set up the GEM_HOME, GEM_PATH and JARS_HOME pointing into the jar (classloader)
and takes arguments for executing jruby. any bin stubs from the gem are available via '-S' or any
script relative to jar's root can be found as the current directory is inside the jar.
embedded JETTY does not take any arguments and will just start up jetty
the jruby rack application uses the ClassPathLayout which is designed for this kind of packing
the ruby application.
default for typical rack application
config.ru
lib/**
app/**
config/**
public/**
- Author:
- christian