The simpleapp
archetype generates a single WAR file, configured to run both the Wicket viewer and the Restful Objects viewer. The archetype also configures the JDO/DataNucleus objectstore to use an in-memory HSQLDB connection.
Once you’ve built the app, you can run the WAR in a variety of ways.
The recommended approach when getting started is to run the self-hosting version of the WAR, allowing Isis to run as a standalone app; for example:
java -jar webapp/target/myapp-webapp-1.0-SNAPSHOT-jetty-console.jar
This can also be accomplished using an embedded Ant target provided in the build script:
mvn -P self-host antrun:run
The first is to simply deploying the generated WAR (webapp/target/myapp-webapp-1.0-SNAPSHOT.war
) to a servlet container.
Alternatively, you could run the WAR in a Maven-hosted Jetty instance, though you need to cd
into the webapp
module:
cd webapp
mvn jetty:run -D jetty.port=9090
In the above, we’ve passed in a property to indicate a different port from the default port (8080).
Finally, you can also run the app by deploying to a standalone servlet container such as [Tomcat](http://tomcat.apache.org).
With Fixtures
It is also possible to start the application with a pre-defined set of data; useful for demos or manual exploratory
testing. This is done by specifying a fixture script on the command line:
java -jar webapp/target/myapp-webapp-1.0-SNAPSHOT-jetty-console.jar \
--initParam isis.persistor.datanucleus.install-fixtures=true \
--initParam isis.fixtures=fixture.simple.SimpleObjectsFixture
where (in the above example) fixture.simple.SimpleObjectsFixture
is the fully qualified class name of the fixture
script to be run.