A example project using the gtfs validator libraries from maven central.
This project contains a single java file (GtfsValidatorExample.java) that runs the validator on a fixed example gtfs dataset.
Included are minimal configration for building with maven or gradle.
To build and run with maven, first edit pom.xml to set the desired version of the gtfs-validator package, then from the root of the project:
mvn compile packagejava -cp "target/Example-1.0.jar:target/libs/*" GtfsValidatorExample
To build with gradle, first edit build.gradle to set the desired version of the gtfs-validator package, then from the root of the project:
./gradlew build deployLocally- the
deployLocallytask is there to make all the dependencies available to run locally.
- the
To run:
-
java -cp "build/libs/*" GtfsValidatorExampleTo build with snapshot versions of the gtfs-validator libraries.
-
./gradlew build deployLocally --refresh-dependencies--refresh-dependenciesis there to ensure that the latest snapshot versions are downloaded from the repo and we are not using a cached version.