1. Stephen McKamey
  2. duel-mvc

Commits

Stephen McKamey  committed 1cd45b5

updating versions; reordering dependencies to allow better overriding

  • Participants
  • Parent commits c34c8d8
  • Branches default

Comments (0)

Files changed (5)

File duel-mvc-archetype/pom.xml

View file
  • Ignore whitespace
 
 	<groupId>org.duelengine</groupId>
 	<artifactId>duel-mvc-archetype</artifactId>
-	<version>0.9.0</version>
+	<version>0.9.1</version>
 	<packaging>maven-archetype</packaging>
 
 	<name>DUEL MVC Archetype</name>

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

View file
  • Ignore whitespace
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<resourcesDir>${project.basedir}/src/main/resources</resourcesDir>
 
-		<mvc.version>0.9.0</mvc.version>
-		<duel.version>0.8.4</duel.version>
-		<merge.version>0.5.5</merge.version>
-		<jackson.version>2.0.4</jackson.version>
-		<jacksonXML.version>2.0.3</jacksonXML.version>
+		<mvc.version>0.9.1</mvc.version>
+		<duel.version>0.8.5</duel.version>
+		<merge.version>0.5.7</merge.version>
+		<jackson.version>2.1.2</jackson.version>
+		<jacksonXML.version>2.1.2</jacksonXML.version>
 		<guice.version>3.0</guice.version>
 		<jersey.version>1.9.1</jersey.version>
-		<slf4j.version>1.6.6</slf4j.version>
+		<slf4j.version>1.7.2</slf4j.version>
 		<servlet.version>3.0.1</servlet.version>
-		<junit.version>4.9</junit.version>
-		<m2e.version>1.0.0</m2e.version>
-		<jrebel.version>1.1.0</jrebel.version>
+		<junit.version>4.11</junit.version>
+		<m2e.version>1.0.1</m2e.version>
+		<jrebel.version>1.1.3</jrebel.version>
 		<javac.version>1.6</javac.version>
 
 		<duel.clientPrefix>App</duel.clientPrefix>
 	</properties>
 
 	<dependencies>
-		<!-- DUEL-MVC runtime -->
+		<!-- JUnit runtime -->
 		<dependency>
-			<groupId>org.duelengine</groupId>
-			<artifactId>duel-mvc</artifactId>
-			<version>${mvc.version}</version>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>${junit.version}</version>
+			<scope>test</scope>
 		</dependency>
 
-		<!-- Jackson JAX-RS provider -->
+		<!-- Servlet interfaces -->
 		<dependency>
-			<groupId>com.fasterxml.jackson.jaxrs</groupId>
-			<artifactId>jackson-jaxrs-json-provider</artifactId>
-			<version>${jackson.version}</version>
+			<groupId>javax.servlet</groupId>
+			<artifactId>javax.servlet-api</artifactId>
+			<version>${servlet.version}</version>
+			<scope>provided</scope>
+		</dependency>
+
+		<!-- SLF4J runtime -->
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+			<version>${slf4j.version}</version>
 		</dependency>
 		<dependency>
-			<groupId>com.fasterxml.jackson.jaxrs</groupId>
-			<artifactId>jackson-jaxrs-xml-provider</artifactId>
-			<version>${jacksonXML.version}</version>
+			<groupId>com.pseudocode</groupId>
+			<artifactId>slf4j-compact</artifactId>
+			<version>${slf4j.version}</version>
 		</dependency>
 
 		<!-- Guice runtime -->
 			<version>${jersey.version}</version>
 		</dependency>
 
-		<!-- SLF4J runtime -->
+		<!-- Jackson JAX-RS provider -->
 		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-api</artifactId>
-			<version>${slf4j.version}</version>
+			<groupId>com.fasterxml.jackson.jaxrs</groupId>
+			<artifactId>jackson-jaxrs-json-provider</artifactId>
+			<version>${jackson.version}</version>
 		</dependency>
 		<dependency>
-			<groupId>com.pseudocode</groupId>
-			<artifactId>slf4j-compact</artifactId>
-			<version>${slf4j.version}</version>
+			<groupId>com.fasterxml.jackson.jaxrs</groupId>
+			<artifactId>jackson-jaxrs-xml-provider</artifactId>
+			<version>${jacksonXML.version}</version>
 		</dependency>
 
-		<!-- Servlet interfaces -->
+		<!-- DUEL-MVC runtime -->
 		<dependency>
-			<groupId>javax.servlet</groupId>
-			<artifactId>javax.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>
+			<groupId>org.duelengine</groupId>
+			<artifactId>duel-mvc</artifactId>
+			<version>${mvc.version}</version>
 		</dependency>
 	</dependencies>
 

File duel-mvc/pom.xml

View file
  • Ignore whitespace
 
 	<groupId>org.duelengine</groupId>
 	<artifactId>duel-mvc</artifactId>
-	<version>0.9.0</version>
+	<version>0.9.1</version>
 	<packaging>jar</packaging>
 
 	<name>DUEL-MVC</name>
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 
-		<duel.version>0.8.4</duel.version>
+		<duel.version>0.8.5</duel.version>
 		<guice.version>3.0</guice.version>
 		<jersey.version>1.9.1</jersey.version>
 		<ehcache.version>2.0.4</ehcache.version>
 		<servlet.version>3.0.1</servlet.version>
-		<junit.version>4.10</junit.version>
+		<junit.version>4.11</junit.version>
 		<jvm.version>1.6</jvm.version>
 	</properties>
 
 	<dependencies>
-		<!-- DUEL runtime -->
+		<!-- JUnit runtime -->
 		<dependency>
-			<groupId>org.duelengine</groupId>
-			<artifactId>duel-runtime</artifactId>
-			<version>${duel.version}</version>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>${junit.version}</version>
+			<scope>test</scope>
+		</dependency>
+
+		<!-- Servlet interfaces -->
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>javax.servlet-api</artifactId>
+			<version>${servlet.version}</version>
+			<scope>provided</scope>
+		</dependency>
+
+		<!-- GZIP servlet filter -->
+		<dependency>
+			<groupId>net.sf.ehcache</groupId>
+			<artifactId>ehcache-web</artifactId>
+			<version>${ehcache.version}</version>
 		</dependency>
 
 		<!-- Guice runtime -->
 			<version>${jersey.version}</version>
 		</dependency>
 
-		<!-- GZIP servlet filter -->
+		<!-- DUEL runtime -->
 		<dependency>
-			<groupId>net.sf.ehcache</groupId>
-			<artifactId>ehcache-web</artifactId>
-			<version>${ehcache.version}</version>
-		</dependency>
-
-		<!-- Servlet interfaces -->
-		<dependency>
-			<groupId>javax.servlet</groupId>
-			<artifactId>javax.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>
+			<groupId>org.duelengine</groupId>
+			<artifactId>duel-runtime</artifactId>
+			<version>${duel.version}</version>
 		</dependency>
 	</dependencies>
 

File duel-mvc/src/main/java/org/duelengine/duel/mvc/NeverExpireFilter.java

View file
  • Ignore whitespace
  * http://www.w3.org/TR/cors/#access-control-allow-origin-response-hea
  * https://developer.mozilla.org/En/HTTP_access_control#Access-Control-Allow-Origin
  */
-class NeverExpireFilter implements Filter {
+public class NeverExpireFilter implements Filter {
 
 	// this just needs to be far out, do not need to worry about leap year
-	private static final long ONE_YEAR = 365L * 24L * 60L * 60L * 1000L;
+	private static final long ONE_YEAR_SEC = 365L * 24L * 60L * 60L;
+	private static final long ONE_YEAR_MS = ONE_YEAR_SEC * 1000L;
 
 	public void init(FilterConfig config) {}
 
 			HttpServletResponse httpResponse = (HttpServletResponse)response;
 
 			// expire one year from now
-			long expiryDate = new Date().getTime() + ONE_YEAR;
+			long expiryDate = new Date().getTime() + ONE_YEAR_MS;
 
 			// add cache control response headers
 			httpResponse.setDateHeader("Expires", expiryDate);
+			httpResponse.setHeader("Cache-Control", "public, max-age="+ONE_YEAR_SEC);
+
+			// add header to encourage CDN to vary cache on compression
+			httpResponse.setHeader("Vary", "Accept-Encoding");
 
 			// add header to enable CDN cross-origin access
 			// not conditionally sent since CDN will cache

File mvcapp/pom.xml

View file
  • Ignore whitespace
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<resourcesDir>${project.basedir}/src/main/resources</resourcesDir>
 
-		<mvc.version>0.9.0</mvc.version>
-		<duel.version>0.8.4</duel.version>
-		<merge.version>0.5.5</merge.version>
-		<jackson.version>2.0.4</jackson.version>
-		<jacksonXML.version>2.0.3</jacksonXML.version>
+		<mvc.version>0.9.1</mvc.version>
+		<duel.version>0.8.5</duel.version>
+		<merge.version>0.5.7</merge.version>
+		<jackson.version>2.1.2</jackson.version>
+		<jacksonXML.version>2.1.2</jacksonXML.version>
 		<guice.version>3.0</guice.version>
 		<jersey.version>1.9.1</jersey.version>
-		<slf4j.version>1.6.6</slf4j.version>
+		<slf4j.version>1.7.2</slf4j.version>
 		<servlet.version>3.0.1</servlet.version>
-		<junit.version>4.9</junit.version>
+		<junit.version>4.11</junit.version>
 		<m2e.version>1.0.0</m2e.version>
-		<jrebel.version>1.1.0</jrebel.version>
+		<jrebel.version>1.1.3</jrebel.version>
 		<javac.version>1.6</javac.version>
 
 		<duel.clientPrefix>App</duel.clientPrefix>
 	</properties>
 
 	<dependencies>
-		<!-- DUEL-MVC runtime -->
+		<!-- JUnit runtime -->
 		<dependency>
-			<groupId>org.duelengine</groupId>
-			<artifactId>duel-mvc</artifactId>
-			<version>${mvc.version}</version>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>${junit.version}</version>
+			<scope>test</scope>
 		</dependency>
 
-		<!-- Jackson JAX-RS provider -->
+		<!-- Servlet interfaces -->
 		<dependency>
-			<groupId>com.fasterxml.jackson.jaxrs</groupId>
-			<artifactId>jackson-jaxrs-json-provider</artifactId>
-			<version>${jackson.version}</version>
+			<groupId>javax.servlet</groupId>
+			<artifactId>javax.servlet-api</artifactId>
+			<version>${servlet.version}</version>
+			<scope>provided</scope>
+		</dependency>
+
+		<!-- SLF4J runtime -->
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+			<version>${slf4j.version}</version>
 		</dependency>
 		<dependency>
-			<groupId>com.fasterxml.jackson.jaxrs</groupId>
-			<artifactId>jackson-jaxrs-xml-provider</artifactId>
-			<version>${jacksonXML.version}</version>
+			<groupId>com.pseudocode</groupId>
+			<artifactId>slf4j-compact</artifactId>
+			<version>${slf4j.version}</version>
 		</dependency>
 
 		<!-- Guice runtime -->
 			<version>${jersey.version}</version>
 		</dependency>
 
-		<!-- SLF4J runtime -->
+		<!-- Jackson JAX-RS provider -->
 		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-api</artifactId>
-			<version>${slf4j.version}</version>
+			<groupId>com.fasterxml.jackson.jaxrs</groupId>
+			<artifactId>jackson-jaxrs-json-provider</artifactId>
+			<version>${jackson.version}</version>
 		</dependency>
 		<dependency>
-			<groupId>com.pseudocode</groupId>
-			<artifactId>slf4j-compact</artifactId>
-			<version>${slf4j.version}</version>
+			<groupId>com.fasterxml.jackson.jaxrs</groupId>
+			<artifactId>jackson-jaxrs-xml-provider</artifactId>
+			<version>${jacksonXML.version}</version>
 		</dependency>
 
-		<!-- Servlet interfaces -->
+		<!-- DUEL-MVC runtime -->
 		<dependency>
-			<groupId>javax.servlet</groupId>
-			<artifactId>javax.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>
+			<groupId>org.duelengine</groupId>
+			<artifactId>duel-mvc</artifactId>
+			<version>${mvc.version}</version>
 		</dependency>
 	</dependencies>