From cdad01fd747650c1943bc68c1ffb4faf145f2a01 Mon Sep 17 00:00:00 2001 From: Kedar Mhaswade Date: Sat, 4 Sep 2010 16:09:47 -0700 Subject: [PATCH] Implemented the change requested in the discussion: http://groups.google.com/group/asynchttpclient/browse_thread/thread/ad594c12c9fc498d?hl=en In summary: 1. We now "require" JDK 1.6 for "compilation". This ensures we use recent compiler. 2. We produce byte code compatible with JRE 1.5. Thus, if any user is using JRE 1.5 s/he does not need to upgrade to 1.6+. 3. Source is 1.5 and so is target. This means we treat the source code to be compatible with 1.5. 4. Any 1.6 language constructs (e.g. @Override on interface methods) and library constructs (e.g. any 1.6-only JDK classes/methods) are detected at compile time and build fails if any are found. This ensures that the 1.6 compiled sources will run on JRE 1.5 (and not fail with RuntimeException). Use of animal sniffer enables this. Tested on Linux. --- pom.xml | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 0cec9d46..5ec21848 100644 --- a/pom.xml +++ b/pom.xml @@ -74,6 +74,15 @@ log4j 1.2.13 + + + org.jvnet + animal-sniffer-annotation + 1.0 + true + + + @@ -134,7 +143,7 @@ 2.0.9 - 1.5 + [1.6.0,] @@ -151,6 +160,28 @@ 1024m + + + org.jvnet + animal-sniffer + 1.2 + + + org.jvnet.animal-sniffer + java1.5 + 1.0 + + + + + dont-let-unwanted-apis-to-sneak-in + compile + + check + + + + org.apache.maven.plugins maven-resources-plugin @@ -181,8 +212,7 @@ maven-javadoc-plugin 2.5 - 1.6 - 1.6 + 1.5 UTF-8 1g