Commits

Stephen McKamey committed 5552f90

splitting out war-bootstrap repo from duel-mvc repo

Comments (0)

Files changed (74)

 \.ipr
 \.iws
 bootstrap/target
-mvcapp/target
-duel-mvc-archetype/target
-bootstrap-archetype/target
+war-bootstrap-archetype/target

bootstrap/pom.xml

-<?xml version="1.0" encoding="UTF-8"?>
-<project
-	xmlns="http://maven.apache.org/POM/4.0.0"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-
-	<groupId>org.duelengine</groupId>
-	<artifactId>bootstrap</artifactId>
-	<version>0.2.0</version>
-	<packaging>jar</packaging>
-
-	<name>WAR Bootstrap</name>
-	<description>Simple WAR bootstrap for quick &amp; dirty testing in various servlet containers.</description>
-
-	<properties>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
-		<javac.version>1.6</javac.version>
-		<glassfish.version>[3.1,4.0)</glassfish.version>
-		<jetty.version>[7.4.2,9.0.0)</jetty.version>
-		<tomcat.version>[7.0.16,8.0.0)</tomcat.version>
-	</properties>
-
-	<repositories>
-		<repository>
-			<id>repo1_maven_org</id>
-			<name>Maven 2 Repository</name>
-			<url>http://repo1.maven.org/maven2</url>
-		</repository>
-		<repository>
-			<id>glassfish-repository</id>
-			<name>Glassfish Repository</name>
-			<url>http://download.java.net/maven/glassfish</url>
-		</repository>
-		<repository>
-			<id>java.net2</id>
-			<name>Java.net Maven2 Repository</name>
-			<url>http://download.java.net/maven/2</url>
-		</repository>
-	</repositories>
-
-	<dependencies>
-		<!-- NOTE: GlassFish and Tomcat appear to be conflicting.
-			 order appears to matter and also
-			 must set scope to provided if not used -->
-		<dependency>
-			<!-- Jetty 7/8 embedded runtime -->
-			<groupId>org.eclipse.jetty.aggregate</groupId>
-			<artifactId>jetty-all</artifactId>
-			<version>${jetty.version}</version>
-		</dependency>
-		<dependency>
-			<!-- GlassFish 3.1 embedded runtime -->
-			<groupId>org.glassfish.extras</groupId>
-			<artifactId>glassfish-embedded-web</artifactId>
-			<version>${glassfish.version}</version>
-			<scope>provided</scope><!-- comment this for GF3 -->
-		</dependency>
-		<dependency>
-			<!-- Tomcat 7 embedded runtime -->
-			<groupId>org.apache.tomcat.embed</groupId>
-			<artifactId>tomcat-embed-core</artifactId>
-			<version>${tomcat.version}</version>
-			<!--scope>compile</scope--><!-- comment this for TC7 -->
-		</dependency>
-		<dependency>
-			<!-- Tomcat 7 JSP -->
-			<groupId>org.apache.tomcat.embed</groupId>
-			<artifactId>tomcat-embed-jasper</artifactId>
-			<version>${tomcat.version}</version>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<!-- Tomcat 7 logging -->
-			<groupId>org.apache.tomcat.embed</groupId>
-			<artifactId>tomcat-embed-logging-juli</artifactId>
-			<version>${tomcat.version}</version>
-			<scope>compile</scope>
-		</dependency>
-	</dependencies>
-
-	<build>
-		<finalName>${project.artifactId}</finalName>
-		<plugins>
-
-			<!-- set the main class -->
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<version>2.3.1</version>
-				<configuration>
-					<archive>
-						<manifest>
-							<addClasspath>true</addClasspath>
-							<mainClass>org.duelengine.bootstrap.Bootstrap</mainClass>
-						</manifest>
-					</archive>
-				</configuration>
-			</plugin>
-
-			<!-- copy all dependencies to target -->
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<configuration>
-					<outputDirectory>${project.build.directory}</outputDirectory>
-				</configuration>
-				<executions>
-					<execution>
-						<goals>
-							<goal>copy-dependencies</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-		<pluginManagement>
-			<plugins>
-				<!-- Java compiler -->
-				<plugin>
-					<artifactId>maven-compiler-plugin</artifactId>
-					<configuration>
-						<source>${javac.version}</source>
-						<target>${javac.version}</target>
-					</configuration>
-				</plugin>
-			</plugins>
-		</pluginManagement>
-	</build>
-</project>

bootstrap/src/main/java/org/duelengine/bootstrap/Bootstrap.java

-package org.duelengine.bootstrap;
-
-import java.io.File;
-
-public class Bootstrap {
-
-	private static final String SEPARATOR = "========================================";
-	private static final String HELP = "java -jar bootstrap.jar\n"+
-			"  --help       : this help text\n"+
-			"  -war <path>  : set the name of war (default: ./root.war)\n" +
-			"  -p <port>    : set the HTTP listening port (default: 8443)\n"+
-			"  -s <port>    : set the HTTPS listening port (default: none)\n"+
-			"  -c <context> : set the context path (default: /)";
-
-	public static void main(String[] args) {
-
-		String warPath = "./root.war";
-		String context = "/";
-		int port = 8080;
-		int https = -1;
-		ServletServer server = null;
-
-		System.out.println(SEPARATOR);
-		System.out.println("WAR Bootstrap\n");
-		for (int i=0; i<args.length; i++) {
-			String arg = args[i];
-			if ("-p".equals(arg)) {
-				port = Integer.parseInt(args[++i]);
-
-			} else if ("-s".equals(arg)) {
-				https = Integer.parseInt(args[++i]);
-
-			} else if ("-war".equals(arg)) {
-				warPath = args[++i];
-
-			} else if ("-c".equals(arg)) {
-				context = args[++i];
-
-			} else if ("--glassfish".equalsIgnoreCase(arg)) {
-				server = new GlassFishServletServer();
-
-			} else if ("--jetty".equalsIgnoreCase(arg)) {
-				server = new JettyServletServer();
-
-			} else if ("--tomcat".equalsIgnoreCase(arg)) {
-				server = new TomcatServletServer();
-
-			} else if ("--help".equalsIgnoreCase(arg)) {
-				System.out.println(HELP);
-				System.out.println(SEPARATOR);
-				return;
-
-			} else {
-				System.out.println(HELP);
-				System.out.println(SEPARATOR);
-				return;
-			}
-		}
-
-		if (server == null) {
-			server = new TomcatServletServer();
-		}
-		
-		try {
-			System.out.println(" - servlet container: "+server.getName());
-
-			warPath = new File(warPath).getCanonicalPath();
-
-			System.out.println(" - war path: "+warPath);
-			System.out.println(" - context root: "+context);
-			if (port > 0) {
-				System.out.println(" - Listening to HTTP on port: "+port);
-			} else {
-				System.out.println(" - Not listening to HTTP");
-			}
-			if (https > 0) {
-				System.out.println(" - Listening to HTTPS on port: "+https);
-			} else {
-				System.out.println(" - Not listening to HTTPS");
-			}
-
-			System.out.println("\nPress ENTER to exit.");
-			System.out.println(SEPARATOR);
-			System.out.println();
-
-			server.start(warPath, context, port, https);
-
-			System.in.read();
-
-			System.out.println(SEPARATOR);
-			System.out.println("WAR Bootstrap exiting...");
-			System.out.println(SEPARATOR);
-			System.out.println();
-
-			server.stop();
-
-		} catch (Exception ex) {
-			ex.printStackTrace();
-		}
-	}
-}

bootstrap/src/main/java/org/duelengine/bootstrap/GlassFishServletServer.java

-package org.duelengine.bootstrap;
-
-import java.io.File;
-import org.glassfish.embeddable.*;
-
-class GlassFishServletServer implements ServletServer {
-	private GlassFish server;
-
-	public String getName() {
-		return "GlassFish";
-	}
-
-	public void start(String warPath, String contextPath, int httpPort, int httpsPort) throws Exception {
-		if (server != null) {
-			throw new IllegalStateException("Web server is already running.");
-		}
-
-		GlassFishProperties gfProps = new GlassFishProperties();
-		if (httpPort > 0) {
-			gfProps.setPort("http-listener", httpPort);
-		}
-		if (httpsPort > 0) {
-			gfProps.setPort("https-listener", httpsPort);
-		}
-
-		server = GlassFishRuntime.bootstrap().newGlassFish(gfProps);
-		server.start();
-
-		File war = new File(warPath);
-		Deployer deployer = server.getDeployer();
-		deployer.deploy(war, "--name=webapp", "--contextroot="+contextPath, "--force=true");
-	}
-
-	public void stop() throws Exception {
-		if (server == null) {
-			throw new IllegalStateException("Web server is not running.");
-		}
-
-		server.stop();
-		server.dispose();
-
-		server = null;
-	}
-}

bootstrap/src/main/java/org/duelengine/bootstrap/JettyServletServer.java

-package org.duelengine.bootstrap;
-
-import org.eclipse.jetty.server.*;
-import org.eclipse.jetty.servlet.*;
-import org.eclipse.jetty.webapp.WebAppContext;
-
-class JettyServletServer implements ServletServer {
-	private Server server;
-
-	public String getName() {
-		return "Jetty";
-	}
-
-	public void start(String warPath, String contextPath, int httpPort, int httpsPort) throws Exception {
-		if (server != null) {
-			throw new IllegalStateException("Web server is already running.");
-		}
-
-		server = new Server(httpPort);
-
-		WebAppContext webapp = new WebAppContext();
-		webapp.setContextPath(contextPath);
-		webapp.setWar(warPath);
-
-		// wire up DefaultServlet for static files
-		webapp.addServlet(DefaultServlet.class, "/*");
-
-		server.setHandler(webapp);
-		server.start();
-	}
-
-	public void stop() throws Exception {
-		if (server == null) {
-			throw new IllegalStateException("Web server is not running.");
-		}
-
-		server.stop();
-
-		server = null;
-	}
-}

bootstrap/src/main/java/org/duelengine/bootstrap/ServletServer.java

-package org.duelengine.bootstrap;
-
-public interface ServletServer {
-
-	String getName();
-
-	void start(String warPath, String context, int httpPort, int httpsPort) throws Exception;
-
-	void stop() throws Exception;
-}

bootstrap/src/main/java/org/duelengine/bootstrap/TomcatServletServer.java

-package org.duelengine.bootstrap;
-
-import java.io.File;
-import org.apache.catalina.core.StandardContext;
-import org.apache.catalina.startup.ContextConfig;
-import org.apache.catalina.startup.Tomcat;
-
-class TomcatServletServer implements ServletServer {
-	private Tomcat server;
-
-	public String getName() {
-		return "Tomcat";
-	}
-
-	public void start(String warPath, String contextPath, int httpPort, int httpsPort) throws Exception {
-		if (server != null) {
-			throw new IllegalStateException("Web server is already running.");
-		}
-
-		server = new Tomcat();
-		server.setBaseDir(new File(warPath, ".." + File.separatorChar + "tomcat").getCanonicalPath());
-		server.setPort(httpPort);
-
-//		server.addWebapp(contextPath, warPath);
-
-        StandardContext ctx = new StandardContext();
-        ctx.setPath(contextPath);
-        ctx.setDocBase(warPath);
-
-        ctx.addLifecycleListener(new Tomcat.DefaultWebXmlListener());
-        
-        ContextConfig ctxCfg = new ContextConfig();
-        ctx.addLifecycleListener(ctxCfg);
-        
-        // prevent it from looking ( if it finds one - it'll have dup error )
-        ctxCfg.setDefaultWebXml("org/apache/catalin/startup/NO_DEFAULT_XML");
-        
-        server.getHost().addChild(ctx);
-
-		server.start();
-	}
-
-	public void stop() throws Exception {
-		if (server == null) {
-			throw new IllegalStateException("Web server is not running.");
-		}
-
-		server.stop();
-		server.destroy();
-
-		server = null;
-	}
-}
 
 clear;clear
 
-cd duel-mvc-archetype
-mvn clean deploy -U -DperformRelease=true -Dgpg.keyname=EE82F9AB
-cd ..
-
 cd war-bootstrap-archetype
 mvn clean deploy -U -DperformRelease=true -Dgpg.keyname=EE82F9AB

duel-mvc-archetype/pom.xml

-<?xml version="1.0" encoding="UTF-8"?>
-<project
-	xmlns="http://maven.apache.org/POM/4.0.0"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>org.sonatype.oss</groupId>
-		<artifactId>oss-parent</artifactId>
-		<version>7</version>
-		<relativePath></relativePath>
-	</parent>
-
-	<groupId>org.duelengine</groupId>
-	<artifactId>duel-mvc-archetype</artifactId>
-	<version>0.2.1</version>
-	<packaging>maven-archetype</packaging>
-
-	<name>DUEL MVC</name>
-	<description>MVC project archetype using Jersey 1.8, Guice 3.0, DUEL views 0.5.0, DUEL merge 0.2.0</description>
-	<url>http://duelengine.org</url>
-	<licenses>
-		<license>
-			<name>MIT License</name>
-			<url>http://duelengine.org/LICENSE.txt</url>
-		</license>
-	</licenses>
-	<scm>
-		<url>https://bitbucket.org/mckamey/duel-mvc</url>
-		<connection>scm:hg:https://bitbucket.org/mckamey/duel-mvc</connection>
-		<developerConnection>scm:hg:https://bitbucket.org/mckamey/duel-mvc</developerConnection>
-	</scm>
-	<developers>
-		<developer>
-			<id>mckamey</id>
-			<name>Stephen M. McKamey</name>
-			<url>http://mck.me</url>
-		</developer>
-	</developers>
-
-	<properties>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-	</properties>
-
-	<build>
-		<extensions>
-			<extension>
-				<groupId>org.apache.maven.archetype</groupId>
-				<artifactId>archetype-packaging</artifactId>
-				<version>2.0</version>
-			</extension>
-		</extensions>
-
-		<pluginManagement>
-			<plugins>
-				<plugin>
-					<artifactId>maven-archetype-plugin</artifactId>
-					<version>2.0</version>
-				</plugin>
-			</plugins>
-		</pluginManagement>
-	</build>
-
-	<profiles>
-		<profile>
-			<id>release-sign-artifacts</id>
-			<activation>
-				<property>
-					<name>performRelease</name>
-					<value>true</value>
-				</property>
-			</activation>
-			<build>
-				<plugins>
-					<plugin>
-						<groupId>org.apache.maven.plugins</groupId>
-						<artifactId>maven-gpg-plugin</artifactId>
-						<version>1.1</version>
-						<executions>
-							<execution>
-								<id>sign-artifacts</id>
-								<phase>verify</phase>
-								<goals>
-									<goal>sign</goal>
-								</goals>
-							</execution>
-						</executions>
-					</plugin>
-				</plugins>
-			</build>
-		</profile>
-	</profiles>
-</project>

duel-mvc-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml

-<?xml version="1.0" encoding="UTF-8"?>
-<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="mvcapp"
-	xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
-	<fileSets>
-		<fileSet filtered="true" packaged="true" encoding="UTF-8">
-			<directory>src/main/java</directory>
-			<includes>
-				<include>**/*.java</include>
-			</includes>
-		</fileSet>
-		<fileSet filtered="true" encoding="UTF-8">
-			<directory>src/main/webapp</directory>
-			<includes>
-				<include>**/*.xml</include>
-			</includes>
-		</fileSet>
-		<fileSet encoding="UTF-8">
-			<directory>src/main/webapp</directory>
-			<includes>
-				<include>**/*.css</include>
-				<include>**/*.ico</include>
-				<include>**/*.js</include>
-				<include>**/*.merge</include>
-				<include>**/*.txt</include>
-			</includes>
-		</fileSet>
-		<fileSet filtered="true" encoding="UTF-8">
-			<directory>src/main/resources</directory>
-			<includes>
-				<include>**/*.duel</include>
-			</includes>
-		</fileSet>
-	</fileSets>
-</archetype-descriptor>

duel-mvc-archetype/src/main/resources/archetype-resources/pom.xml

-<?xml version="1.0" encoding="UTF-8"?>
-<project
-	xmlns="http://maven.apache.org/POM/4.0.0"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-	<modelVersion>4.0.0</modelVersion>
-
-	<groupId>${groupId}</groupId>
-	<artifactId>${artifactId}</artifactId>
-	<version>${version}</version>
-	<packaging>war</packaging>
-
-	<name>${artifactId} mvc app</name>
-	<description>MVC project using Jersey ${jersey.version}, Guice ${guice.version}, DUEL views ${duel.version}, DUEL merge ${merge.version}</description>
-
-	<properties>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
-		<duel.version>0.5.1</duel.version>
-		<merge.version>0.2.0</merge.version>
-		<jackson.version>1.8.2</jackson.version>
-		<guice.version>3.0</guice.version>
-		<jersey.version>1.8</jersey.version>
-		<servlet.version>2.5</servlet.version>
-		<junit.version>4.8.2</junit.version>
-		<m2e.version>1.0.0</m2e.version>
-		<javac.version>1.6</javac.version>
-		<jrebel.version>1.0.5</jrebel.version>
-
-		<duel.clientPrefix>App</duel.clientPrefix>
-		<duel.serverPrefix>${package}.views</duel.serverPrefix>
-		<duel.sourceDir>${project.basedir}/src/main/resources/views/</duel.sourceDir>
-		<duel.clientPath>/js/views/</duel.clientPath>
-
-		<merge.cdnMapFile>/cdn.properties</merge.cdnMapFile>
-		<merge.cdnRoot>/cdn/</merge.cdnRoot>
-		<merge.cdnFiles>.ico .png .jpg .gif</merge.cdnFiles>
-	</properties>
-
-	<repositories>
-		<!-- Jersey repository -->
-		<repository>
-			<id>java.net2</id>
-			<name>Java.net Maven2 Repository</name>
-			<url>http://download.java.net/maven/2</url>
-		</repository>
-	</repositories>
-
-	<dependencies>
-		<!-- DUEL runtime -->
-		<dependency>
-			<groupId>org.duelengine</groupId>
-			<artifactId>duel-runtime</artifactId>
-			<version>${duel.version}</version>
-		</dependency>
-
-		<!-- Jackson JSON runtime -->
-		<dependency>
-			<groupId>org.codehaus.jackson</groupId>
-			<artifactId>jackson-core-asl</artifactId>
-			<version>${jackson.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.codehaus.jackson</groupId>
-			<artifactId>jackson-mapper-asl</artifactId>
-			<version>${jackson.version}</version>
-		</dependency>
-
-		<!-- Jackson JAX-RS provider -->
-		<dependency>
-			<groupId>org.codehaus.jackson</groupId>
-			<artifactId>jackson-jaxrs</artifactId>
-			<version>${jackson.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.codehaus.jackson</groupId>
-			<artifactId>jackson-xc</artifactId>
-			<version>${jackson.version}</version>
-		</dependency>
-
-		<!-- Guice runtime -->
-		<dependency>
-			<groupId>com.google.inject</groupId>
-			<artifactId>guice</artifactId>
-			<version>${guice.version}</version>
-		</dependency>
-
-		<!-- Jersey runtime -->
-		<dependency>
-			<groupId>com.sun.jersey</groupId>
-			<artifactId>jersey-server</artifactId>
-			<version>${jersey.version}</version>
-		</dependency>
-
-		<!-- Jersey-Guice runtime -->
-		<dependency>
-			<groupId>com.sun.jersey.contribs</groupId>
-			<artifactId>jersey-guice</artifactId>
-			<version>${jersey.version}</version>
-		</dependency>
-
-		<!-- Servlet interfaces -->
-		<dependency>
-			<groupId>javax.servlet</groupId>
-			<artifactId>servlet-api</artifactId>
-			<version>${servlet.version}</version>
-			<scope>provided</scope>
-		</dependency>
-
-		<!-- JUnit runtime -->
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<version>${junit.version}</version>
-			<scope>test</scope>
-		</dependency>
-	</dependencies>
-
-	<build>
-		<finalName>${project.artifactId}</finalName>
-		<plugins>
-
-			<!-- DUEL Compiler -->
-			<plugin>
-				<groupId>org.duelengine</groupId>
-				<artifactId>duel-maven-plugin</artifactId>
-				<version>${duel.version}</version>
-				<executions>
-					<execution>
-						<goals>
-							<goal>generate</goal>
-						</goals>
-						<configuration>
-							<clientPrefix>${duel.clientPrefix}</clientPrefix>
-							<serverPrefix>${duel.serverPrefix}</serverPrefix>
-							<inputDir>${duel.sourceDir}</inputDir>
-							<outputClientPath>${duel.clientPath}</outputClientPath>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-
-			<!-- Merge Builder -->
-			<plugin>
-				<groupId>org.duelengine</groupId>
-				<artifactId>merge-maven-plugin</artifactId>
-				<version>${merge.version}</version>
-				<executions>
-					<execution>
-						<goals>
-							<goal>merge</goal>
-						</goals>
-						<configuration>
-							<cdnMapFile>${merge.cdnMapFile}</cdnMapFile>
-							<cdnRoot>${merge.cdnRoot}</cdnRoot>
-							<cdnFiles>${merge.cdnFiles}</cdnFiles>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-
-			<!-- JRebel Config -->
-			<plugin>
-				<groupId>org.zeroturnaround</groupId>
-				<artifactId>javarebel-maven-plugin</artifactId>
-				<version>${jrebel.version}</version>
-				<executions>
-					<execution>
-						<id>generate-rebel-xml</id>
-						<phase>process-resources</phase>
-						<goals>
-							<goal>generate</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-		<pluginManagement>
-			<plugins>
-				<!-- Java compiler -->
-				<plugin>
-					<artifactId>maven-compiler-plugin</artifactId>
-					<configuration>
-						<source>${javac.version}</source>
-						<target>${javac.version}</target>
-					</configuration>
-				</plugin>
-
-				<!-- http://wiki.eclipse.org/M2E_plugin_execution_not_covered -->
-				<plugin>
-					<groupId>org.eclipse.m2e</groupId>
-					<artifactId>lifecycle-mapping</artifactId>
-					<version>${m2e.version}</version>
-					<configuration>
-						<lifecycleMappingMetadata>
-							<pluginExecutions>
-								<pluginExecution>
-									<pluginExecutionFilter>
-										<groupId>org.duelengine</groupId>
-										<artifactId>duel-maven-plugin</artifactId>
-										<versionRange>[${duel.version},)</versionRange>
-										<goals>
-											<goal>generate</goal>
-										</goals>
-									</pluginExecutionFilter>
-									<action>
-										<execute />
-									</action>
-								</pluginExecution>
-								<pluginExecution>
-									<pluginExecutionFilter>
-										<groupId>org.duelengine</groupId>
-										<artifactId>merge-maven-plugin</artifactId>
-										<versionRange>[${merge.version},)</versionRange>
-										<goals>
-											<goal>merge</goal>
-										</goals>
-									</pluginExecutionFilter>
-									<action>
-										<execute />
-									</action>
-								</pluginExecution>
-								<pluginExecution>
-									<pluginExecutionFilter>
-										<groupId>org.zeroturnaround</groupId>
-										<artifactId>javarebel-maven-plugin</artifactId>
-										<versionRange>[${jrebel.version},)</versionRange>
-										<goals>
-											<goal>generate</goal>
-										</goals>
-									</pluginExecutionFilter>
-									<action>
-										<execute />
-									</action>
-								</pluginExecution>
-							</pluginExecutions>
-						</lifecycleMappingMetadata>
-					</configuration>
-				</plugin>
-			</plugins> 
-		</pluginManagement>
-	</build>
-</project>

duel-mvc-archetype/src/main/resources/archetype-resources/src/main/java/AppRoot.java

-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package};
-
-import java.lang.reflect.Modifier;
-import java.util.*;
-import javax.ws.rs.*;
-import org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider;
-import org.duelengine.duel.DuelContext;
-import org.duelengine.duel.util.*;
-import com.google.inject.*;
-import com.google.inject.matcher.Matchers;
-import com.google.inject.name.Names;
-import com.google.inject.servlet.GuiceServletContextListener;
-import com.sun.jersey.guice.JerseyServletModule;
-import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
-
-import ${package}.aspects.*;
-import ${package}.controllers.*;
-
-public class AppRoot extends GuiceServletContextListener {
-
-	@Override
-	public Injector getInjector() {
-		return Guice.createInjector(new JerseyServletModule() {
-
-			/**
-			 * Configuration constant bindings
-			 */
-			private void bindConfigConstants() {
-				// TODO: read environment var for DEV/STAGE/PROD
-				// set debug in DEV
-				// set CDN host in PROD
-
-				// general debug mode (also controls compaction)
-				bindConstant().annotatedWith(Names.named("DEBUG")).to(true);
-
-				// CDN server hostname, e.g. "cdn.example.com"
-				bindConstant().annotatedWith(Names.named("CDN_HOST")).to("");
-
-				// name of .properties file containing CDN mappings
-				bindConstant().annotatedWith(Names.named("CDN_MAP")).to("cdn");
-
-				// action timing duration threshold in ms
-				bindConstant().annotatedWith(Names.named("ACTION_THRESHOLD")).to(500.0);//ms
-
-				// render timing duration threshold in ms
-				bindConstant().annotatedWith(Names.named("RENDER_THRESHOLD")).to(100.0);//ms
-			}
-
-			/**
-			 * JAX-RS serialization bindings
-			 */
-			private void bindSerializers() {
-				// bind JAXB/JSON serialization
-				bind(JacksonJaxbJsonProvider.class).in(Singleton.class);
-			}
-
-			/**
-			 * AOP aspect bindings
-			 */
-			private void bindAspects() {
-				// exception handling
-				bind(ExceptionRouter.class);
-
-				// view settings
-				bind(DuelContext.class).toProvider(ViewContextProvider.class);
-
-				// controller action timing
-				ActionTimer actionTimer = new ActionTimer();
-				this.requestInjection(actionTimer);
-
-				bindInterceptor(
-					Matchers.annotatedWith(Path.class),
-					Matchers.annotatedWith(GET.class).or(Matchers.annotatedWith(POST.class)).or(Matchers.annotatedWith(PUT.class)).or(Matchers.annotatedWith(DELETE.class)).or(Matchers.annotatedWith(HEAD.class)),
-
-					// aspects which intercept all controller actions
-					actionTimer
-				);
-			}
-
-			/**
-			 * Static URL route bindings
-			 */
-			private void bindStaticRoutes() {
-				// http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/servlet/ServletModule.html
-
-				// this uses the standard static file servlet
-				DefaultWrapperServlet defaultServlet = new DefaultWrapperServlet();
-
-				serve(
-					"/robots.txt",
-					"/favicon.ico"
-				).with(defaultServlet);
-
-				serveRegex(
-					"/cdn/.*",
-					"/css/.*",
-					"/js/.*",
-					"/images/.*"
-				).with(defaultServlet);
-
-				// this sets the cache control headers to never expire
-				NeverExpireFilter neverExpire = new NeverExpireFilter();
-
-				filterRegex(
-					"/cdn/.*"
-				).through(neverExpire);
-			}
-
-			/**
-			 * JAX-RS controller bindings
-			 */
-			private void bindControllers(String... packages) {
-				// we have to explicitly bind each controller class
-				// to ensure Guice controls instantiation for AOP
-				// this will auto-register controllers in each package
-
-				for (String packageName : packages) {
-					try {
-						Set<Class<?>> controllers = ClassEnumerator.getClasses(packageName);
-
-						for (Class<?> controller : controllers) {
-							if (controller.isInterface() || Modifier.isAbstract(controller.getModifiers())) {
-								// filter abstract or interfaces
-								continue;
-							}
-
-							// scope is determined by Guice annotations
-							bind(controller);
-						}
-					} catch (Exception ex) {
-						ex.printStackTrace();
-
-						throw new IllegalArgumentException(packageName, ex);
-					}
-				}
-			}
-
-			@Override
-			protected void configureServlets() {
-
-				// setup Guice-style configuration values
-				bindConfigConstants();
-
-				// register JAX-RS serialization providers
-				bindSerializers();
-
-				// register JAX-RS controllers in package
-				bindControllers(
-					BaseController.class.getPackage().getName()
-				);
-
-				// register AOP aspects
-				bindAspects();
-
-				// the rest effectively replaces /WEB-INF/web.xml
-
-				// map static routes
-				bindStaticRoutes();
-
-                // map all other routes to Guice
-				// http://jersey.java.net/nonav/apidocs/latest/contribs/jersey-guice/com/sun/jersey/guice/spi/container/servlet/package-summary.html
-				serve("/*").with(GuiceContainer.class);
-			}
-		});
-	}
-}

duel-mvc-archetype/src/main/resources/archetype-resources/src/main/java/aspects/ActionTimer.java

-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.aspects;
-
-import java.util.logging.Logger;
-import javax.ws.rs.core.*;
-import javax.ws.rs.core.Response.ResponseBuilder;
-import org.aopalliance.intercept.*;
-import com.google.inject.*;
-import com.google.inject.name.Named;
-
-/**
- * AOP proof of concept: this intercepts every controller action and logs the timings
- */
-@Singleton
-public class ActionTimer implements MethodInterceptor {
-
-	private final Logger log = Logger.getLogger(ActionTimer.class.getSimpleName());
-	private Provider<UriInfo> uriInfoProvider;
-	private double timingThreshold;
-
-	@Inject
-	public void init(
-		@Named("ACTION_THRESHOLD") double timingThreshold,
-		Provider<UriInfo> uriInfoProvider) {
-
-		this.timingThreshold = timingThreshold;
-		this.uriInfoProvider = uriInfoProvider;
-	}
-
-	@Override
-	public Object invoke(MethodInvocation invocation) throws Throwable {
-
-		// Note: this only includes the action method body timings, not serialization or render timings
-		
-		long start = System.nanoTime();
-		double elapsed;
-		Object result = null;
-
-		try {
-			result = invocation.proceed();
-
-		} finally {
-			elapsed = (System.nanoTime()-start) / 1000000.0;//ms
-
-			UriInfo uriInfo = this.uriInfoProvider.get();
-			String label = '/'+uriInfo.getPath()+" action: ";
-
-			if (elapsed > this.timingThreshold) {
-				log.warning(label+elapsed+" ms");
-			} else {
-				log.info(label+elapsed+" ms");
-			}
-		}
-
-		// emit a header with the timing
-		ResponseBuilder response =
-			(result instanceof ResponseBuilder) ? (ResponseBuilder)result :
-			(result instanceof Response) ? Response.fromResponse((Response)result) :
-			Response.ok(result);
-		return response.header("X-Action-MS", elapsed).build();
-	}
-}

duel-mvc-archetype/src/main/resources/archetype-resources/src/main/java/aspects/ExceptionRouter.java

-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.aspects;
-
-import java.util.*;
-import java.util.logging.Logger;
-import javax.ws.rs.core.*;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.ext.ExceptionMapper;
-import com.google.inject.*;
-import com.sun.jersey.api.NotFoundException;
-import com.sun.jersey.api.core.ExtendedUriInfo;
-import com.sun.jersey.api.model.AbstractResourceMethod;
-
-import ${package}.controllers.ErrorController;
-
-/**
- * JAX-RS Glue for mapping exceptions to error views 
- */
-@Singleton
-@javax.ws.rs.ext.Provider
-public class ExceptionRouter implements ExceptionMapper<Throwable> {
-
-	private final Logger log = Logger.getLogger(ExceptionRouter.class.getSimpleName());
-
-	private static final MediaType DefaultMediaType = MediaType.TEXT_HTML_TYPE;
-	private final List<MediaType> supportedMediaTypes = Arrays.asList(
-			MediaType.TEXT_HTML_TYPE,
-			MediaType.APPLICATION_XHTML_XML_TYPE,
-			MediaType.APPLICATION_JSON_TYPE,
-			MediaType.APPLICATION_XML_TYPE);
-
-	private final ErrorController errorController;
-	private final Provider<ExtendedUriInfo> extendedUriInfoProvider;
-
-	@Inject
-	public ExceptionRouter(
-			ErrorController errorController,
-			Provider<ExtendedUriInfo> extendedUriInfoProvider) {
-
-		this.errorController = errorController;
-		this.extendedUriInfoProvider = extendedUriInfoProvider;
-	}
-
-	@Override
-	public Response toResponse(final Throwable ex) {
-
-		// get request metadata
-		ExtendedUriInfo uriInfo = this.extendedUriInfoProvider.get();
-
-		// find the intended result type
-		MediaType resultType = getResultType(uriInfo.getMatchedMethod());
-
-		return Response
-				.status(getHTTPStatus(ex, uriInfo))
-				.type(resultType)
-				.entity(getResult(ex, resultType))
-				.build();
-	}
-
-	public Status getHTTPStatus(Throwable ex, ExtendedUriInfo uriInfo) {
-
-		if (ex instanceof NotFoundException) {
-			return Status.NOT_FOUND;
-		}
-
-		// TODO: filter exception severity for logging
-		log.severe(uriInfo.getPath()+": "+ex.getMessage());
-
-		// TODO: map more response codes
-		return Status.INTERNAL_SERVER_ERROR;
-	}
-
-	private Object getResult(Throwable ex, MediaType resultType) {
-		// can these mappings be performed by JAX-RS?
-		// TODO: map more response views
-
-		if (MediaType.APPLICATION_JSON_TYPE.equals(resultType) ||
-			MediaType.APPLICATION_XML_TYPE.equals(resultType)) {
-			return errorController.errorData(ex);
-		}
-
-		return errorController.errorView(ex);
-	}
-
-	private MediaType getResultType(AbstractResourceMethod method) {
-		// can this matching be performed by JAX-RS?
-		if (method == null) {
-			return DefaultMediaType;
-		}
-
-		for (MediaType mediaType : method.getSupportedOutputTypes()) {
-			if (supportedMediaTypes.contains(mediaType)) {
-				return mediaType;
-			}
-		}
-
-		for (MediaType mediaType : method.getSupportedInputTypes()) {
-			if (supportedMediaTypes.contains(mediaType)) {
-				return mediaType;
-			}
-		}
-
-		return DefaultMediaType;
-	}
-}

duel-mvc-archetype/src/main/resources/archetype-resources/src/main/java/aspects/TimedViewResult.java

-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.aspects;
-
-import java.util.logging.Logger;
-import java.io.*;
-import javax.ws.rs.WebApplicationException;
-import org.duelengine.duel.*;
-import org.duelengine.duel.rs.*;
-
-/**
- * Adds timing logging to standard ViewResult
- */
-public class TimedViewResult extends ViewResult {
-
-	private final Logger log;
-	private double timingThreshold;
-	private final Class<? extends DuelView> view;
-
-	public TimedViewResult(Class<? extends DuelView> view, DuelContext context, Logger log, double timingThreshold) {
-		super(view, context);
-
-		this.log = log;
-		this.timingThreshold = timingThreshold;
-		this.view = view;
-	}
-
-	@Override
-	public void write(OutputStream stream)
-		throws IOException, WebApplicationException {
-
-		long start = System.nanoTime();
-		double elapsed;
-
-		try {
-			super.write(stream);
-
-		} finally {
-			elapsed = (System.nanoTime()-start) / 1000000.0;//ms
-			String label = view.getName()+" render: ";
-
-			if (elapsed > this.timingThreshold) {
-				log.warning(label+elapsed+" ms");
-			} else {
-				log.info(label+elapsed+" ms");
-			}
-		}
-	}
-}

duel-mvc-archetype/src/main/resources/archetype-resources/src/main/java/aspects/ViewContextProvider.java

-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.aspects;
-
-import java.net.URISyntaxException;
-import java.util.*;
-import com.google.inject.*;
-import com.google.inject.name.Named;
-import org.duelengine.duel.*;
-
-/**
- * Builds the view context for a request
- */
-@Singleton
-public class ViewContextProvider implements Provider<DuelContext> {
-
-	private final boolean isDebug;
-	private final LinkInterceptor interceptor;
-
-	@Inject
-	public ViewContextProvider(
-		@Named("DEBUG") boolean isDebug,
-		@Named("CDN_HOST") String cdnHost,
-		@Named("CDN_MAP") String cdnMapName) throws URISyntaxException {
-
-		this.isDebug = isDebug;
-
-		ResourceBundle cdnBundle = ResourceBundle.getBundle(cdnMapName);
-		this.interceptor = new CDNLinkInterceptor(cdnHost, cdnBundle, isDebug);
-	}
-
-	public DuelContext get() {
-		DuelContext context = new DuelContext();
-
-		context
-			.setLinkInterceptor(this.interceptor)
-			.setClientID(new IncClientIDStrategy("_"));
-
-		if (this.isDebug) {
-			// setup pretty-print formatting
-			// add ambient client-side data
-			context
-				.setFormat(new FormatPrefs().setIndent("${symbol_escape}t").setNewline("${symbol_escape}n"))
-				.putExtra("App.isDebug", true);
-		}
-
-		return context;
-	}
-}

duel-mvc-archetype/src/main/resources/archetype-resources/src/main/java/controllers/BaseController.java

-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.controllers;
-
-import java.util.logging.Logger;
-import com.google.inject.*;
-import com.google.inject.name.Named;
-import org.duelengine.duel.*;
-import org.duelengine.duel.rs.*;
-
-import ${package}.aspects.TimedViewResult;
-
-/**
- * Base class for all controllers and provides access to helper methods and ambient request data.
- * Uses method injection so other controllers don't need to maintain constructors.
- */
-public abstract class BaseController {
-
-	private final Logger log = Logger.getLogger(BaseController.class.getSimpleName());
-	private double timingThreshold;
-	private Provider<DuelContext> viewContextProvider;
-
-	@Inject
-	public void init(
-		@Named("RENDER_THRESHOLD") double timingThreshold,
-		Provider<DuelContext> viewContextProvider) {
-
-		this.timingThreshold = timingThreshold;
-		this.viewContextProvider = viewContextProvider;
-	}
-
-	/**
-	 * Builds a view result
-	 */
-	protected ViewResult view(Class<? extends DuelView> view) {
-		return new TimedViewResult(view, viewContextProvider.get(), log, timingThreshold);
-	}
-}

duel-mvc-archetype/src/main/resources/archetype-resources/src/main/java/controllers/ErrorController.java

-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.controllers;
-
-import javax.ws.rs.*;
-import com.google.inject.*;
-import com.google.inject.name.Named;
-
-import ${package}.model.*;
-import ${package}.views.*;
-
-/**
- * Error message controller
- */
-@Singleton
-public class ErrorController extends BaseController {
-
-	private final boolean printStackTrace;
-
-	@Inject
-	public ErrorController(@Named("DEBUG") boolean isDebug) {
-		this.printStackTrace = isDebug;
-	}
-
-	@GET
-	@Path("{path:.*}")
-	@Produces({"text/html", "application/xhtml+xml"})
-	public Object errorView(Throwable ex) {
-		ErrorResult error = this.errorData(ex);
-
-		// TODO: customize error responses
-		return view(ErrorPage.class).data(error);
-	}
-
-	@GET
-	@Path("{path:.*}")
-	@Produces({"application/json", "application/xml"})
-	public ErrorResult errorData(Throwable ex) {
-		return new ErrorResult(ex, this.printStackTrace);
-	}
-}

duel-mvc-archetype/src/main/resources/archetype-resources/src/main/java/controllers/HomeController.java

-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.controllers;
-
-import java.util.*;
-import javax.ws.rs.*;
-import com.google.inject.*;
-
-import ${package}.model.*;
-import ${package}.views.*;
-
-/**
- * Example controller which verifies HTML/JSON/XML and error display are all working.
- */
-@Singleton
-@Path("/")
-@Produces("text/html")
-public class HomeController extends BaseController {
-
-	@GET
-	public Object getHTML() {
-		return getHTML("/");
-	}
-
-	@GET
-	@Path("{path:.*}")
-	public Object getHTML(@PathParam("path") String path) {
-		Foo foo = new Foo(path, new Date());
-
-		return view(FooPage.class).data(foo);
-	}
-
-	@GET
-	@Path("{path:.*}.json")
-	@Produces("application/json")
-	public Object getJSON(@PathParam("path") String path) {
-		return new Foo(path, new Date());
-	}
-
-	@GET
-	@Path("{path:.*}.xml")
-	@Produces("application/xml")
-	public Object getXML(@PathParam("path") String path) {
-		return new Foo(path, new Date());
-	}
-
-	/*------------------------------------------------*/
-
-	@GET
-	@Path("throw")
-	public Object throwErrorHTML() {
-		throw new IllegalStateException("This action always throws an exception in HTML.");
-	}
-
-	@GET
-	@Path("throw.json")
-	@Produces("application/json")
-	public Object throwErrorJSON() {
-		throw new IllegalStateException("This action always throws an exception in JSON.");
-	}
-
-	@GET
-	@Path("throw.xml")
-	@Produces("application/xml")
-	public Object throwErrorXML() {
-		throw new IllegalStateException("This action always throws an exception in XML.");
-	}
-}

duel-mvc-archetype/src/main/resources/archetype-resources/src/main/java/controllers/PingController.java

-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.controllers;
-
-import javax.ws.rs.*;
-import javax.ws.rs.core.Response;
-import com.google.inject.*;
-
-/**
- * Health monitoring controller
- */
-@Singleton
-@Path("/ping")
-public class PingController extends BaseController {
-
-	@GET
-	@Produces("text/plain")
-	public Object ping() {
-
-		// TODO: perform service health tests
-
-		//return non-OK status to pull server from pool
-		return Response.ok("pong");
-	}
-}

duel-mvc-archetype/src/main/resources/archetype-resources/src/main/java/model/ErrorResult.java

-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.model;
-
-import java.io.*;
-
-@javax.xml.bind.annotation.XmlRootElement
-public class ErrorResult {
-
-	private String type;
-	private String error;
-	private String stackTrace;
-
-	public ErrorResult() {}
-
-	public ErrorResult(Throwable ex, boolean showStackTrace) {
-		type = ex.getClass().getSimpleName();
-		error = ex.getMessage();
-
-		if (showStackTrace) {
-			StringWriter writer = new StringWriter();
-			ex.printStackTrace(new PrintWriter(writer, true));
-			stackTrace = writer.toString();
-		}
-	}
-
-	public String getType() { return type; }
-	public void setType(String value) { type = value; }
-
-	public String getError() { return error; }
-	public void setError(String value) { error = value; }
-
-	public String getStackTrace() { return stackTrace; }
-	public void setStackTrace(String value) { stackTrace = value; }
-}

duel-mvc-archetype/src/main/resources/archetype-resources/src/main/java/model/Foo.java

-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.model;
-
-import java.util.Date;
-
-@javax.xml.bind.annotation.XmlRootElement
-public class Foo {
-
-	private String path;
-	private Date date;
-
-	public Foo() {}
-
-	public Foo(String path, Date date) {
-		this.path = path;
-		this.date = date;
-	}
-
-	public String getPath() { return path; }
-	public void setPath(String value) { path = value; }
-
-	public Date getDate() { return date; }
-	public void setDate(Date value) { date = value; }
-}

duel-mvc-archetype/src/main/resources/archetype-resources/src/main/resources/views/ErrorPage.duel

-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<view name="ErrorPage"><call view="Page">
-
-<part name="head">
-	<title>${artifactId} ERROR: <%= data.error %></title>
-</part>
-
-<h1>${artifactId} ERROR</h1>
-<p><strong><%= data.type %>:</strong> <%= data.error %></p>
-<pre class="box" if="data.stackTrace"><%= data.stackTrace %></pre>

duel-mvc-archetype/src/main/resources/archetype-resources/src/main/resources/views/FooPage.duel

-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<view name="FooPage"><call view="Page">
-
-<part name="head">
-	<title>${artifactId}: <%= data.path %></title>
-</part>
-
-<h1>${artifactId}: <%= data.path %></h1>
-<p><%= data.date %></p>

duel-mvc-archetype/src/main/resources/archetype-resources/src/main/resources/views/Menu.duel

-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<view name="Menu">
-<nav class="box">
-	<h2>Configuration Tests</h2>
-	<ul>
-		<li><strong>HTML:</strong> <a href="/Foo%20object">Foo object</a></li>
-		<li><strong>JSON:</strong> <a href="/Foo%20object.json">Foo object</a></li>
-		<li><strong>XML:</strong> <a href="/Foo%20object.xml">Foo object</a></li>
-	</ul><ul>
-		<li><strong>HTML:</strong> <a href="/throw">Throw an exception</a></li>
-		<li><strong>JSON:</strong> <a href="/throw.json">Throw an exception</a></li>
-		<li><strong>XML:</strong> <a href="/throw.xml">Throw an exception</a></li>
-	<ul>
-</nav>

duel-mvc-archetype/src/main/resources/archetype-resources/src/main/resources/views/Page.duel

-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<view name="Page">
-<!DOCTYPE html>
-<html lang="en">
-<head>
-	<meta charset="UTF-8">
-<part name="head">
-	<title></title>
-</part>
-	<link rel="stylesheet" type="text/css" href="/css/main.merge" />
-	<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
-
-	<!--[if lt IE 9]><script type="text/javascript" src="/js/html5shiv/html5.js"></script><![endif]-->
-</head>
-<body>
-	<script type="text/javascript" src="/js/main.merge"></script>
-<div id="content">
-	<part />
-
-	<call view="Menu" defer />
-</div>
-</body>
-</html>

duel-mvc-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml

-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.5"
-	xmlns="http://java.sun.com/xml/ns/javaee"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
-
-	<listener>
-		<listener-class>${package}.AppRoot</listener-class>
-	</listener>
-	<filter>
-		<filter-name>jersey-guice</filter-name>
-		<filter-class>com.google.inject.servlet.GuiceFilter</filter-class>
-	</filter>
-	<filter-mapping>
-		<filter-name>jersey-guice</filter-name>
-		<url-pattern>/*</url-pattern>
-	</filter-mapping>
-</web-app>

duel-mvc-archetype/src/main/resources/archetype-resources/src/main/webapp/css/main.css

-html {
-	height: 100%;
-	margin: 0;
-	padding: 0;
-	width: 100%;
-	-webkit-font-smoothing: antialiased;
-}
-body, input, button, select, option {
-	font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;
-	font-size: 100%;
-}
-body {
-	background-color: #BFBAB2; /*shine: #F8F8F8*/
-	background-image: -webkit-radial-gradient(50% 50%, farthest-side, #F8F8F8, #BFBAB2);
-	background-image: -moz-radial-gradient(50% 50%, farthest-side, #F8F8F8, #BFBAB2);
-	background-attachment: fixed;
-
-	color: #333;
-	height: 100%;
-	margin: 0;
-	overflow: hidden;
-	padding: 0;
-	text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
-	width: 100%;
-}
-header, footer, menu, nav, section, article, aside {
-	/* non-HTML5 browser patch */
-	display: block;
-}
-img, embed, object, video {
-	/* fluid image patch */
-	border: none;
-	margin: 0;
-	max-width: 100%;
-	padding: 0;
-	-ms-interpolation-mode: bicubic;
-}
-h1, h2, h3, h4, h5, h6 {
-	clear: both;
-	font-weight: bold;
-}
-a {
-	color: #990000;
-	text-decoration: none;
-}
-a:hover, a:active {
-	text-decoration: underline;
-}
-h1, h1 a, h1 a:hover, h1 a:active, h2 {
-	color: #F1F1F1;
-	text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.75);
-}
-h1 {
-	border: 0 solid rgba(0, 0, 0, 0.25);
-	border-bottom-width: 1px;
-	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
-	-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
-	-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
-	font-size: 2em;
-	letter-spacing: -1px;
-	margin-bottom: 0.25em;
-	padding-bottom: 0.25em;
-}
-h2 {
-	border: 0 solid rgba(0, 0, 0, 0.25);
-	border-bottom-width: 1px;
-	font-size: 1.5em;
-	margin: 0;
-	margin-bottom: 0.5em;
-	padding-bottom: 0.5em;
-}
-hr {
-	border: 0 solid rgba(0, 0, 0, 0.25);
-	border-top-width: 1px;
-	box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
-	-moz-box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
-	-webkit-box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
-	clear: both;
-}
-
-ul {
-	list-style: square;
-	margin-left: 2em;
-}
-li {
-	padding-bottom: 0.25em;
-}
-
-.box {
-	background-color: #A1AAB3; /*shine: #C3CED9*/
-	background-image: -webkit-radial-gradient(50% 50%, farthest-side, #C3CED9, #A1AAB3);
-	background-image: -moz-radial-gradient(50% 50%, farthest-side, #C3CED9, #A1AAB3);
-	background-attachment: fixed;
-	border-radius: 8px;
-	-moz-border-radius: 4px;
-	-webkit-border-radius: 4px;
-	
-	border: 1px solid rgba(0, 0, 0, 0.25);
-	box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
-	-moz-box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
-	-webkit-box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
-
-	color: black;
-
-	margin: 1em 0;
-	overflow: hidden;
-	padding: 1em;
-}
-
-#content {
-	padding: 1em;
-}
-
-@media screen and (max-width: 640px) {
-	body {
-		font-size: 75%;
-	}
-}
-@media screen and (max-width: 480px) {
-	body {
-		font-size: 50%;
-	}