aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-04-14 11:57:43 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-04-14 11:57:43 +1200
commitf1bfd2e7e8791c8658f2196bc0ebd3f8294ac38e (patch)
tree9b81b90d6c4a78d205bdcea6d0df8230e9e44cb6
parent15f3258905e964ab3b23d9c11fde4a1946ef10b0 (diff)
downloadtrackermap-server-f1bfd2e7e8791c8658f2196bc0ebd3f8294ac38e.tar.gz
trackermap-server-f1bfd2e7e8791c8658f2196bc0ebd3f8294ac38e.tar.bz2
trackermap-server-f1bfd2e7e8791c8658f2196bc0ebd3f8294ac38e.zip
Add bytecode version check
-rw-r--r--pom.xml34
-rw-r--r--src/org/traccar/Context.java5
-rw-r--r--src/org/traccar/geocoder/JsonGeocoder.java4
-rw-r--r--src/org/traccar/geolocation/OpenCellIdGeolocationProvider.java4
-rw-r--r--src/org/traccar/geolocation/UniversalGeolocationProvider.java4
-rw-r--r--src/org/traccar/geolocation/UnwiredGeolocationProvider.java4
-rw-r--r--src/org/traccar/notification/EventForwarder.java2
7 files changed, 43 insertions, 14 deletions
diff --git a/pom.xml b/pom.xml
index fab4a20a0..2553673e2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -69,9 +69,9 @@
<version>3.10.6.Final</version>
</dependency>
<dependency>
- <groupId>org.asynchttpclient</groupId>
+ <groupId>com.ning</groupId> <!-- org.asynchttpclient starting from version 2.0 and requires Java 8 -->
<artifactId>async-http-client</artifactId>
- <version>2.0.31</version>
+ <version>1.9.40</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
@@ -254,6 +254,36 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.4.1</version>
+ <executions>
+ <execution>
+ <id>enforce-bytecode-version</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <enforceBytecodeVersion>
+ <maxJdkVersion>1.7</maxJdkVersion>
+ <ignoreClasses>
+ <ignoreClass>*JDBC42*</ignoreClass>
+ </ignoreClasses>
+ </enforceBytecodeVersion>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>extra-enforcer-rules</artifactId>
+ <version>1.0-beta-6</version>
+ </dependency>
+ </dependencies>
+ </plugin>
</plugins>
</build>
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index e84e14b4c..1a35a2cb4 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -17,14 +17,13 @@ package org.traccar;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
+import com.ning.http.client.AsyncHttpClient;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Properties;
import org.apache.velocity.app.VelocityEngine;
-import org.asynchttpclient.AsyncHttpClient;
-import org.asynchttpclient.DefaultAsyncHttpClient;
import org.eclipse.jetty.util.URIUtil;
import org.traccar.database.AliasesManager;
import org.traccar.database.CalendarManager;
@@ -156,7 +155,7 @@ public final class Context {
return velocityEngine;
}
- private static final AsyncHttpClient ASYNC_HTTP_CLIENT = new DefaultAsyncHttpClient();
+ private static final AsyncHttpClient ASYNC_HTTP_CLIENT = new AsyncHttpClient();
public static AsyncHttpClient getAsyncHttpClient() {
return ASYNC_HTTP_CLIENT;
diff --git a/src/org/traccar/geocoder/JsonGeocoder.java b/src/org/traccar/geocoder/JsonGeocoder.java
index a914f26d8..6d1380729 100644
--- a/src/org/traccar/geocoder/JsonGeocoder.java
+++ b/src/org/traccar/geocoder/JsonGeocoder.java
@@ -15,8 +15,8 @@
*/
package org.traccar.geocoder;
-import org.asynchttpclient.AsyncCompletionHandler;
-import org.asynchttpclient.Response;
+import com.ning.http.client.AsyncCompletionHandler;
+import com.ning.http.client.Response;
import org.traccar.Context;
import javax.json.Json;
diff --git a/src/org/traccar/geolocation/OpenCellIdGeolocationProvider.java b/src/org/traccar/geolocation/OpenCellIdGeolocationProvider.java
index 690a050e1..d6e45b550 100644
--- a/src/org/traccar/geolocation/OpenCellIdGeolocationProvider.java
+++ b/src/org/traccar/geolocation/OpenCellIdGeolocationProvider.java
@@ -15,8 +15,8 @@
*/
package org.traccar.geolocation;
-import org.asynchttpclient.AsyncCompletionHandler;
-import org.asynchttpclient.Response;
+import com.ning.http.client.AsyncCompletionHandler;
+import com.ning.http.client.Response;
import org.traccar.Context;
import org.traccar.model.CellTower;
import org.traccar.model.Network;
diff --git a/src/org/traccar/geolocation/UniversalGeolocationProvider.java b/src/org/traccar/geolocation/UniversalGeolocationProvider.java
index ee8ed78f2..6416b2633 100644
--- a/src/org/traccar/geolocation/UniversalGeolocationProvider.java
+++ b/src/org/traccar/geolocation/UniversalGeolocationProvider.java
@@ -16,8 +16,8 @@
package org.traccar.geolocation;
import com.fasterxml.jackson.core.JsonProcessingException;
-import org.asynchttpclient.AsyncCompletionHandler;
-import org.asynchttpclient.Response;
+import com.ning.http.client.AsyncCompletionHandler;
+import com.ning.http.client.Response;
import org.traccar.Context;
import org.traccar.model.Network;
diff --git a/src/org/traccar/geolocation/UnwiredGeolocationProvider.java b/src/org/traccar/geolocation/UnwiredGeolocationProvider.java
index f9cef3de6..dcc5a4e7a 100644
--- a/src/org/traccar/geolocation/UnwiredGeolocationProvider.java
+++ b/src/org/traccar/geolocation/UnwiredGeolocationProvider.java
@@ -20,8 +20,8 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.asynchttpclient.AsyncCompletionHandler;
-import org.asynchttpclient.Response;
+import com.ning.http.client.AsyncCompletionHandler;
+import com.ning.http.client.Response;
import org.traccar.Context;
import org.traccar.model.CellTower;
import org.traccar.model.Network;
diff --git a/src/org/traccar/notification/EventForwarder.java b/src/org/traccar/notification/EventForwarder.java
index 32556808c..bd7cfc0c5 100644
--- a/src/org/traccar/notification/EventForwarder.java
+++ b/src/org/traccar/notification/EventForwarder.java
@@ -16,7 +16,7 @@
package org.traccar.notification;
import com.fasterxml.jackson.core.JsonProcessingException;
-import org.asynchttpclient.BoundRequestBuilder;
+import com.ning.http.client.AsyncHttpClient.BoundRequestBuilder;
import org.traccar.Context;
import org.traccar.helper.Log;
import org.traccar.model.Device;