OneBusAway / onebusaway-gtfs-realtime-api

Java classes generated for GTFS-realtime extensions.
https://github.com/OneBusAway/onebusaway-gtfs-realtime-api/wiki
Other
21 stars 16 forks source link

Add rudimentary round-trip test #18

Closed kurtraschke closed 4 years ago

kurtraschke commented 4 years ago

This PR adds a rudimentary round-trip test which also demonstrates the use of extensions with GTFS-realtime and the Java protobuf runtime.

barbeau commented 4 years ago

@kurtraschke I tried running mvn test from the command line and got this:

E:\Git Projects\onebusaway-gtfs-realtime-api>mvn test
[INFO] Scanning for projects...
Downloading: https://repo.camsys-apps.com/third-party/com/amazonaws/aws-java-sdk-servicediscovery/1.11.276/aws-java-sdk-servicediscovery-1.11.276.pom
...
Downloading: http://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.6.0/jackson-annotations-2.6.0.jar
Downloading: https://repo.camsys-apps.com/third-party/org/junit/junit-bom/5.6.0/junit-bom-5.6.0.pom
Downloading: https://repo.camsys-apps.com/releases/org/junit/junit-bom/5.6.0/junit-bom-5.6.0.pom
Downloading: http://repo.maven.apache.org/maven2/org/junit/junit-bom/5.6.0/junit-bom-5.6.0.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project org.onebusaway:onebusaway-gtfs-realtime-api:1.2.13-SNAPSHOT (E:\Git Projects\onebusaway-gtfs-realtime-api\pom.xml) has 3 errors
[ERROR]     Non-resolvable import POM: Could not transfer artifact org.junit:junit-bom:pom:5.6.0 from/to central (http://repo.maven.apache.org/maven2)
: Failed to transfer file: http://repo.maven.apache.org/maven2/org/junit/junit-bom/5.6.0/junit-bom-5.6.0.pom. Return code is: 501, ReasonPhrase: HTTPS
 Required. @ line 63, column 19 -> [Help 2]
[ERROR]     'dependencies.dependency.version' for org.junit.jupiter:junit-jupiter-api:jar is missing. @ line 79, column 17
[ERROR]     'dependencies.dependency.version' for org.junit.jupiter:junit-jupiter-engine:jar is missing. @ line 84, column 17
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
barbeau commented 4 years ago

@kurtraschke So, looks like you missing the version numbers for jupiter dependencies.

kurtraschke commented 4 years ago

We're using the JUnit BOM to manage versions for JUnit dependencies, but it looks like your build wasn't able to fetch it?

Non-resolvable import POM: Could not transfer artifact org.junit:junit-bom:pom:5.6.0 from/to central (http://repo.maven.apache.org/maven2)
: Failed to transfer file: http://repo.maven.apache.org/maven2/org/junit/junit-bom/5.6.0/junit-bom-5.6.0.pom. Return code is: 501, ReasonPhrase: HTTPS
 Required. @ line 63, column 19 -> [Help 2]

It should be possible to resolve this issue by building with Maven >= 3.2.3 (see https://issues.apache.org/jira/browse/MNG-5672).

barbeau commented 4 years ago

@kurtraschke Thanks! Looks likes that was it. I was running Maven v3.2.2, and updating to Maven v3.6.3 fixed it - mvn test works fine now.