{"id":28919507,"url":"https://github.com/googlemaps/java-on-demand-rides-deliveries-stub-provider","last_synced_at":"2026-02-16T09:03:46.941Z","repository":{"id":37074811,"uuid":"423980720","full_name":"googlemaps/java-on-demand-rides-deliveries-stub-provider","owner":"googlemaps","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-09T01:37:43.000Z","size":520,"stargazers_count":13,"open_issues_count":4,"forks_count":15,"subscribers_count":24,"default_branch":"main","last_synced_at":"2025-06-22T03:42:29.849Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/googlemaps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-11-02T19:55:50.000Z","updated_at":"2025-04-04T04:10:30.000Z","dependencies_parsed_at":"2024-02-26T15:27:46.385Z","dependency_job_id":"8daa28bc-4d21-45a9-b3ab-92bb654a5d84","html_url":"https://github.com/googlemaps/java-on-demand-rides-deliveries-stub-provider","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/googlemaps/java-on-demand-rides-deliveries-stub-provider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlemaps%2Fjava-on-demand-rides-deliveries-stub-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlemaps%2Fjava-on-demand-rides-deliveries-stub-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlemaps%2Fjava-on-demand-rides-deliveries-stub-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlemaps%2Fjava-on-demand-rides-deliveries-stub-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/googlemaps","download_url":"https://codeload.github.com/googlemaps/java-on-demand-rides-deliveries-stub-provider/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlemaps%2Fjava-on-demand-rides-deliveries-stub-provider/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29504684,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T08:14:25.707Z","status":"ssl_error","status_checked_at":"2026-02-16T08:14:25.334Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-22T03:41:46.490Z","updated_at":"2026-02-16T09:03:46.936Z","avatar_url":"https://github.com/googlemaps.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Tests/Build](https://github.com/googlemaps/java-on-demand-rides-deliveries-stub-provider/actions/workflows/test.yml/badge.svg)](https://github.com/googlemaps/java-on-demand-rides-deliveries-stub-provider/actions/workflows/test.yml)\n\n![Contributors](https://img.shields.io/github/contributors/googlemaps/java-on-demand-rides-deliveries-stub-provider?color=green)\n[![License](https://img.shields.io/github/license/googlemaps/java-on-demand-rides-deliveries-stub-provider?color=blue)][license]\n[![StackOverflow](https://img.shields.io/stackexchange/stackoverflow/t/google-maps?color=orange\u0026label=google-maps\u0026logo=stackoverflow)](https://stackoverflow.com/questions/tagged/google-maps)\n[![Discord](https://img.shields.io/discord/676948200904589322?color=6A7EC2\u0026logo=discord\u0026logoColor=ffffff)][Discord server]\n\n# Java On-Demand Rides and Deliveries Stub Provider Sample App\n\n## Description\n\nThis repo features a sample app server, a basic Provider implementation for the Journey Sharing Sample\nApps that will communicate with Fleet Engine. It is a standalone server\nproviding endpoints that Journey Sharing Sample Apps can use to create\nvehicles/trips and all the necessary requirements of Journey Sharing for a\nsingle exclusive ride.\n\n## Requirements\n\n- [Sign up with Google Maps Platform]\n- A Google Maps Platform [project] with **App Engine** and the **Fleet Engine APIs** enabled\n- An [API key] associated with the project above\n- Gradle and Java 11+\n\n## Installation\n\nThe server uses the Fleet Engine Auth Library to sign JWTs. This allows\nfor authenticated communications with Fleet Engine. In order to run it properly,\nit's expected that you have set up the proper service accounts. To learn more,\nsee the\n[Fleet Engine Auth Library repository](https://github.com/googlemaps/java-fleetengine-auth).\n\nBy default, the sample provider signs JWTs using impersonation\ninstead of credential files. Impersonation is the preferred\nmethod when signing JWTs because it's inherently more secure than downloading\ncredential files.\n\nThe service account names are configured within\n[./src/main/resources/config.properties](./src/main/resources/config.properties)\n\nIf impersonation is not an option for you, you can\nswitch signers by modifying the `provideMinter` method within\n[./src/main/java/com/example/provider/SampleServletModule.java](./src/main/java/com/example/provider/SampleServletModule.java)\n\n## Running or deploying the Server with Gradle\n\nThis sample provider is running App Engine with Gradle. For more information\nregarding the App Engine plugin with Gradle, go to this\n[website](https://cloud.google.com/appengine/docs/standard/java/using-gradle).\n\nInstall and configure the following prerequisites:\n\n- Make sure your environment is set to Java 17.\n- Make sure that your Cloud project is set up on your Google account. Go to\n  [Setting up and validating your Cloud project](https://cloud.google.com/appengine/docs/standard/java/using-gradle#setting_up_and_validating_your)\n- [gcloud CLI tool](https://cloud.google.com/sdk/install).\n\n## Usage\n\n1. Make sure that the user running the sample provider has the Service Account\n   Token Creator role by following\n   [these instructions](https://developers.google.com/maps/documentation/transportation-logistics/on-demand-rides-deliveries-solution/fleet-engine/auth).\n2. Update `src/main/resources/config.properties` with the provider ID and\n   service account information\n3. Authenticate the current environment by setting the application default\n   credentials. `gcloud auth application-default login`.\n4. This will redirect to signin with your gmail.\n5. Go to the root folder of this project.\n6. Run `./gradlew appengineRun`.\n7. Check that the server is running and accessible on http://10.0.2.2:8080 from the Android Studio\n   Emulator.\n8. To exit the server, there's a Java application that starts up. Quit out of\n   the application to exit the server. You can also run `ps auxw | grep java`\n   to find the PIDs and then do `kill $pid1 $pid2` to kill the process that's\n   running the Java application. Note: there are always two matching PIDs\n   because the Java process forks itself.\n\n### To deploy to App Engine\n\n1. Make sure that the user running the *App Engine* has the Service Account\n   Token Creator role by following\n   [these instructions](https://developers.google.com/maps/documentation/transportation-logistics/on-demand-rides-deliveries-solution/fleet-engine/auth).\n   The `App Engine default service account` default has this format:\n   YOUR-CLOUD-PROJECT@appspot.gserviceaccount.com\n2. Update `src/main/resources/config.properties` with the provider ID and\n   service account information.\n3. Update `YOUR-CLOUD-PROJECT` in your build.gradle to your *App Engine* project.\n4. Update `YOUR-APPID-HERE` in your `src/main/webapp/WEB-INF/appengine-web.xml` file.\n5. Authenticate the current environment by setting the application default\n   credentials. `gcloud auth application-default login`.\n6. This will redirect to signin with your gmail.\n7. Go to the root folder of this project.\n8. Run `./gradlew appengineDeploy`.\n9. Check that the server is running on https://YOUR-CLOUD-PROJECT.as.r.appspot.com/\n\n## Frequent Errors\n\n`Caused by: java.lang.NoSuchMethodException: java.net.SocksSocketImpl.\u003cinit\u003e()` or\n`Exception java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.reflection.ReflectionCache [in thread \"Daemon worker\"]`\n\n- Make sure to set 11. We recommend [SDKMan](https://sdkman.io/usage) to manage this in your system.\n\n`Error injecting constructor, com.google.auth.ServiceAccountSigner$SigningException: Failed to sign the provided bytes`\n\n- Fill in the required Fleet Engine configuration in `src/main/resources/config.properties`.\n\n## Endpoints\n\nThese are the supported endpoints and how to interact with them:\n\n### Token\n\n#### GET\n\nRetrieves a signed JWT to be used to communicate with the Fleet Engine. The\ntoken will expire after 60 minutes of its creation.\n\n```\nGET /token/driver/:vehicleId\nGET /token/consumer/:tripId\n```\n\nSample response:\n\n```json\n{\n  \"jwt\": \"abcdefgh01234567\",\n  \"creationTimestamp\": 1650500000000,\n  \"expirationTimestamp\": 1650503600000\n}\n```\n\n### Vehicle\n\n#### GET\n\nRetrieves the Fleet Engine specification of a registered vehicle. A vehicle ID\n(the vehicle name provided on its creation) should be provided in order to fetch\nits information.\n\n```\nGET /vehicle/:vehicleId\n```\n\nSample response:\n\n```json\n{\n  \"name\": \"providers/testProvider/vehicles/testVehicle\",\n  \"vehicleState\": \"ONLINE\",\n  \"currentTripsIds\": [\n    \"testTrip\"\n  ],\n  \"waypoints\": [\n    {\n      \"location\": {\n        \"point\": {\n          \"latitude\": 3.45,\n          \"longitude\": 4.4\n        }\n      },\n      \"waypointType\": \"PICKUP_WAYPOINT_TYPE\",\n      \"tripId\": \"testTrip\"\n    },\n    {\n      \"location\": {\n        \"point\": {\n          \"latitude\": 3.44,\n          \"longitude\": 4.43\n        }\n      },\n      \"waypointType\": \"DROP_OFF_WAYPOINT_TYPE\",\n      \"tripId\": \"testTrip\"\n    }\n  ],\n  \"supportedTripTypes\": [\n    \"EXCLUSIVE\"\n  ],\n  \"backToBackEnabled\": true,\n  \"maximumCapacity\": 5\n}\n```\n\n#### POST\n\nCreates a new vehicle given the vehicle ID. The vehicle ID is given in the body\nwith the field `vehicleId`. The attributes that can be specified\nare: `supportedTripTypes`, `backToBackEnabled`, and `maximumCapacity`.\n\n```\nPOST /vehicle/new\n```\n\nSample request body:\n\n```json\n{\n  \"vehicleId\": \"testVehicle\",\n  \"supportedTripTypes\": [\n    \"EXCLUSIVE\"\n  ],\n  \"backToBackEnabled\": false,\n  \"maximumCapacity\": 5\n}\n```\n\n#### PUT\n\nUpdates a vehicle with the attributes provided. The vehicle ID is supplied in the url path.\nThe attributes that can be modified are: `supportedTripTypes`, `backToBackEnabled`,\nand `maximumCapacity`.\n\n```\nPUT /vehicle/:vehicleId\n```\n\nSample request body:\n\n```json\n{\n  \"supportedTripTypes\": [\n    \"EXCLUSIVE\"\n  ],\n  \"backToBackEnabled\": false,\n  \"maximumCapacity\": 5\n}\n```\n\n### Trip\n\n#### GET\n\nRetrieves the Fleet Engine specification of a registered trip. If registered a\ntrip object will be returned even if there is no match for it yet. Once a trip\nmatch is found it will be included in the response. If the trip ID is not\nspecified, the most recent trip is return.\n\n```\nGET /trip/:tripId\n```\n\nSample response:\n\n```json\n{\n  \"trip\": {\n    \"name\": \"providers/testProvider/trips/testTrip\",\n    \"vehicleId\": \"testVehicle\",\n    \"tripStatus\": \"ENROUTE_TO_PICKUP\",\n    \"waypoints\": [\n      {\n        \"location\": {\n          \"point\": {\n            \"latitude\": 3.45,\n            \"longitude\": 4.4\n          }\n        },\n        \"waypointType\": \"PICKUP_WAYPOINT_TYPE\",\n        \"tripId\": \"testTrip\"\n      },\n      {\n        \"location\": {\n          \"point\": {\n            \"latitude\": 3.44,\n            \"longitude\": 4.43\n          }\n        },\n        \"waypointType\": \"DROP_OFF_WAYPOINT_TYPE\",\n        \"tripId\": \"testTrip\"\n      }\n    ]\n  }\n}\n```\n\n#### POST\n\nCreates a new trip given the JSON provided by the body of the POST. The pickup\nand the dropoff points are provided and a new trip is configured. If there is an\nexisting vehicle, the sample provider will match the vehicle with the trip.\n\nThe `intermediateDestinations` field is optional and it's used to support multi-destination trips.\n\nThe `tripType` field is optional. The possible values are `EXCLUSIVE` and `SHARED`. In case it is\nnot provided, the provider will default to `EXCLUSIVE`.\n\n```\nPOST /trip/new\n```\n\nSample request body:\n\n```json\n{\n  \"pickup\": {\n    \"latitude\": 3.45,\n    \"longitude\": 4.4\n  },\n  \"dropoff\": {\n    \"latitude\": 3.44,\n    \"longitude\": 4.43\n  },\n  \"intermediateDestinations\": [\n    {\n      \"latitude\": 4.44,\n      \"longitude\": 4.43\n    },\n    {\n      \"latitude\": 5.44,\n      \"longitude\": 2.43\n    }\n  ],\n  \"tripType\": \"EXCLUSIVE\"\n}\n```\n\n#### PUT\n\nUpdates the status of a trip given the trip ID. The status is given in the body\nwith the field `status`. An optional `intermediateDestinationIndex` field can be passed in case this\nis a multi-destination trip and driver is moving between intermediate destinations.\n\n```\nPUT /trip/:tripId\n```\n\nSample request body:\n\n```json\n{\n  \"status\": \"NEW\"\n}\n```\n\nSample request body (updating intermediate destination pointer):\n\n```json\n{\n   \"status\": \"ENROUTE_TO_INTERMEDIATE_DESTINATION\",\n   \"intermediateDestinationIndex\": 0\n}\n```\n\n## Contributing\n\nContributions are welcome and encouraged! If you'd like to contribute, send us a [pull request] and refer to our [code of conduct] and [contributing guide].\n\n## Terms of Service\n\nThis library uses Google Maps Platform services. Use of Google Maps Platform services through this library is subject to the Google Maps Platform [Terms of Service].\n\nThis library is not a Google Maps Platform Core Service. Therefore, the Google Maps Platform Terms of Service (e.g. Technical Support Services, Service Level Agreements, and Deprecation Policy) do not apply to the code in this library.\n\n## Support\n\nThis library is offered via an open source [license]. It is not governed by the Google Maps Platform Support [Technical Support Services Guidelines, the SLA, or the [Deprecation Policy]. However, any Google Maps Platform services used by the library remain subject to the Google Maps Platform Terms of Service.\n\nThis library adheres to [semantic versioning] to indicate when backwards-incompatible changes are introduced. Accordingly, while the library is in version 0.x, backwards-incompatible changes may be introduced at any time.\n\nIf you find a bug, or have a feature request, please [file an issue] on GitHub. If you would like to get answers to technical questions from other Google Maps Platform developers, ask through one of our [developer community channels]. If you'd like to contribute, please check the [contributing guide].\n\nYou can also discuss this library on our [Discord server].\n\n[API key]: https://developers.google.com/maps/documentation/javascript/get-api-key\n[maps-sdk]: https://developers.google.com/maps/documentation/mobility\n[documentation]: https://googlemaps.github.io/java-on-demand-rides-deliveries-stub-provider\n\n[code of conduct]: ?tab=coc-ov-file#readme\n[contributing guide]: CONTRIBUTING.md\n[Deprecation Policy]: https://cloud.google.com/maps-platform/terms\n[developer community channels]: https://developers.google.com/maps/developer-community\n[Discord server]: https://discord.gg/hYsWbmk\n[file an issue]: https://github.com/googlemaps/java-on-demand-rides-deliveries-stub-provider/issues/new/choose\n[license]: LICENSE\n[project]: https://developers.google.com/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/create-project\n[pull request]: https://github.com/googlemaps/java-on-demand-rides-deliveries-stub-provider/compare\n[semantic versioning]: https://semver.org\n[Sign up with Google Maps Platform]: https://console.cloud.google.com/google/maps-apis/start\n[similar inquiry]: https://github.com/googlemaps/java-on-demand-rides-deliveries-stub-provider/issues\n[SLA]: https://cloud.google.com/maps-platform/terms/sla\n[Technical Support Services Guidelines]: https://cloud.google.com/maps-platform/terms/tssg\n[Terms of Service]: https://cloud.google.com/maps-platform/terms\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglemaps%2Fjava-on-demand-rides-deliveries-stub-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglemaps%2Fjava-on-demand-rides-deliveries-stub-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglemaps%2Fjava-on-demand-rides-deliveries-stub-provider/lists"}