diff --git a/.travis.yml b/.travis.yml
index 68a107639..c8ed11b83 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,5 @@
language: java
-jdk: openjdk8
+jdk: openjdk11
cache:
directories:
- "$HOME/.m2"
diff --git a/pom.xml b/pom.xml
index 5f1da2ba0..c4429c52b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,9 @@
2.0.0-SNAPSHOT
pom
transitclock
+
http://www.transitclock.org//
+
transitclock
transitclockApi
diff --git a/transitclock/pom.xml b/transitclock/pom.xml
index 8833bb1ba..cab10d5d0 100755
--- a/transitclock/pom.xml
+++ b/transitclock/pom.xml
@@ -1,28 +1,82 @@
-
+
4.0.0
- TheTransitClock
transitclockCore
- 2.0.0-SNAPSHOT
+
+
+ transitclockCore
+
+ TheTransitClock
+ transitclock
+ 2.0.0-SNAPSHOT
+
UTF-8
+ 1.2.0
+ 3.0.2
+ 1.18.24
+ 5.4..Final
+ 6.0.21.Final
+ 6.0.21.Final
+
- transitclockCore
-
-
-
-
- repo.obaweb.org
- http://repo.obaweb.org:8080/archiva/repository/releases
-
+
+
+ com.sun.activation
+ javax.activation
+ ${javax.activation.version}
+
+
+
+
+
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+ 3.0.1
+
+
+
+
+ com.sun.xml.bind
+ jaxb-impl
+ 3.0.2
+ runtime
+
+
+
+
+ org.projectlombok
+ lombok
+ ${lombok.version}
+ provided
+
TheTransitClock
transitclockBarefootClient
@@ -38,17 +92,11 @@
esri-geometry-api
1.1
-
-
- io.kevinlee
- one-jar-boot
- 0.97.4
-
-
mysql
@@ -56,34 +104,28 @@
5.1.35
- org.postgresql
- postgresql
- 9.3-1103-jdbc41
-
+ org.postgresql
+ postgresql
+ 42.6.0
+
+
+
+
- org.hibernate
- hibernate-core
- 4.3.9.Final
-
-
- org.hibernate.common
- hibernate-commons-annotations
- 4.0.5.Final
-
-
- org.hibernate
- hibernate-c3p0
- 4.3.9.Final
+ org.hibernate
+ hibernate-core
+ 5.5.7.Final
-
-
+
@@ -98,9 +140,9 @@
1.1.3
- org.hsqldb
- hsqldb
- 2.2.4
+ org.hsqldb
+ hsqldb
+ 2.2.4
@@ -144,7 +186,7 @@
1.2
-
@@ -166,10 +208,10 @@
1.3.0
-
org.json
@@ -184,7 +226,7 @@
1.1
-
net.jcip
@@ -221,15 +263,18 @@
test
+
+
- com.google.guava
- guava
- 18.0
+ com.google.guava
+ guava
+ 30.1.1-jre
-
- org.ehcache
- ehcache
- 3.4.0
+
+
+ org.ehcache
+ ehcache
+ 3.4.0
org.slf4j
@@ -239,18 +284,18 @@
- com.esotericsoftware
- kryo
- 4.0.0
+ com.esotericsoftware
+ kryo
+ 4.0.0
-
+
- org.apache.commons
- commons-jcs-core
- 2.2
+ org.apache.commons
+ commons-jcs-core
+ 2.2
-
+
javax.servlet
@@ -259,12 +304,12 @@
provided
-
+
- com.github.haifengl
- smile-core
- 1.5.1
-
+ com.github.haifengl
+ smile-core
+ 1.5.1
+
@@ -273,31 +318,31 @@
1.11
-
+
- com.github.haifengl
- smile-core
- 1.5.1
-
+ com.github.haifengl
+ smile-core
+ 1.5.1
+
- net.spy
- spymemcached
- 2.12.3
+ net.spy
+ spymemcached
+ 2.12.3
-
+ org.apache.maven.plugins
maven-compiler-plugin
- 2.5.1
+ 3.8.1
- 1.8
- 1.8
+ 17
+ 17
@@ -434,83 +479,79 @@
-
-
-
-
-
-
-
-
- PredictionsAccuracyIntegrationTest
-
-
-
- org.codehaus.mojo
- truezip-maven-plugin
- 1.2
-
-
- unzip-database
-
- copy
-
- test
-
- true
-
- ${project.basedir}/src/test/resources/database/transitime_test.zip
- ${project.basedir}/src/test/resources/database/data
-
-
-
-
-
-
- org.onebusaway.plugins
- maven-hsqldb-plugin
-
- 1.0.1
-
-
- user-database-start
- test
-
- run
-
-
- true
- ${project.basedir}/src/test/resources/database/data/transitime_test
- 9001
-
-
-
-
-
- org.codehaus.mojo
- exec-maven-plugin
- 1.1.1
-
-
- test
- test-case-execution
-
- java
-
-
- org.transitclock.applications.PredictionsAccuracyIntegrationTest
- -c transitime/src/test/resources/transiTimeConfigIntegrationTest.xml -gtfsDirectoryName transitime/src/test/resources/wmata_gtfs -storeNewRevs -maxTravelTimeSegmentLength 1000
-
-
-
-
-
-
-
+
+ PredictionsAccuracyIntegrationTest
+
+
+
+ org.codehaus.mojo
+ truezip-maven-plugin
+ 1.2
+
+
+ unzip-database
+
+ copy
+
+ test
+
+ true
+
+ ${project.basedir}/src/test/resources/database/transitime_test.zip
+ ${project.basedir}/src/test/resources/database/data
+
+
+
+
+
+
+ org.onebusaway.plugins
+ maven-hsqldb-plugin
+
+ 1.0.1
+
+
+ user-database-start
+ test
+
+ run
+
+
+ true
+ ${project.basedir}/src/test/resources/database/data/transitime_test
+ 9001
+
+
+
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 1.1.1
+
+
+ test
+ test-case-execution
+
+ java
+
+
+ org.transitclock.applications.PredictionsAccuracyIntegrationTest
+ -c
+ transitime/src/test/resources/transiTimeConfigIntegrationTest.xml
+ -gtfsDirectoryName transitime/src/test/resources/wmata_gtfs
+ -storeNewRevs -maxTravelTimeSegmentLength 1000
+
+
+
+
+
+
+
diff --git a/transitclock/src/main/java/org/transitclock/applications/SchemaGenerator.java b/transitclock/src/main/java/org/transitclock/applications/SchemaGenerator.java
index 9a749b594..b7fe34661 100644
--- a/transitclock/src/main/java/org/transitclock/applications/SchemaGenerator.java
+++ b/transitclock/src/main/java/org/transitclock/applications/SchemaGenerator.java
@@ -31,7 +31,10 @@
import java.nio.file.StandardCopyOption;
import java.sql.Types;
import java.util.ArrayList;
+import java.util.EnumSet;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import org.apache.commons.cli.BasicParser;
import org.apache.commons.cli.CommandLine;
@@ -40,9 +43,15 @@
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
+import org.hibernate.boot.Metadata;
+import org.hibernate.boot.MetadataSources;
+import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.cfg.Configuration;
import org.hibernate.dialect.MySQLDialect;
+import org.hibernate.service.ServiceRegistry;
import org.hibernate.tool.hbm2ddl.SchemaExport;
+import org.hibernate.tool.hbm2ddl.SchemaExport.Action;
+import org.hibernate.tool.schema.TargetType;
import com.google.common.reflect.ClassPath;
@@ -68,9 +77,10 @@
*
*/
public class SchemaGenerator {
- private final Configuration cfg;
+
private final String packageName;
private final String outputDirectory;
+ private static List> classList=null;
private static final Logger logger =
LoggerFactory.getLogger(SchemaGenerator.class);
@@ -96,11 +106,10 @@ public ImprovedMySQLDialect() {
@SuppressWarnings("unchecked")
public SchemaGenerator(String packageName, String outputDirectory) throws Exception {
- this.cfg = new Configuration();
- this.cfg.setProperty("hibernate.hbm2ddl.auto", "create");
-
+
+ classList=new ArrayList>();
for (Class