OTP V2 Web (Client) customization

33 views
Skip to first unread message

bucch...@fbk.eu

unread,
Jan 12, 2022, 1:10:31 PMJan 12
to OpenTripPlanner Developers
Hi Dear,
I would like to customize a little but the web (client) part of OTP V2. If I modify the source code directly what is the right way to deploy and produce the correct jar that includes the changes done?
Do you have some suggestions? For example I would like to add some menus, buttons, etc.. related to the project I am using the OTP V2.

Thanks a lot
Antonio

Thomas Gran

unread,
Jan 27, 2022, 7:13:14 AMJan 27
to OpenTripPlanner Developers
The future for the OTP "Debug" Client is uncertain, but if you want to contribute you should create an issue on GitHub where you describe the changes in detail. If your changes is specific to you, we might not accept them, but usually we can find a generalization that is useful to everyone. 

If you just want to make your own changes you can fork the project.


Thomas

Andrew Byrd

unread,
Feb 15, 2022, 10:06:54 AMFeb 15
to Thomas Gran, opentripplanner-dev
Hi Thomas and Antonio,

I think it won't be obvious to people just approaching the project what "debug client" means. If you go to the src/client directory there is no indication that this is one client among many that can talk to the OpenTripPlanner API. Many current contributors who use other clients in production refer to this built-in client as the "debug client" with the understanding that it will be minimally maintained as a convenient way to test out OTP during development. This is something that long-time users of OpenTripPlanner might already know, or that people might pick up by joining developer meetings, but it's probably quite confusing for people just approaching the project. 

Based on a quick look at the project documentation, there is no mention of this fact or suggestion that people use any other client software. This is something that should definitely be clarified in the documentation. As a start, from my recent message to Gabór: many public OTP deployments use other frontends such as https://github.com/opentripplanner/otp-ui or https://github.com/HSLdevcom/digitransit-ui.

Antonio, if I understand your question correctly you just want to make your own modifications to this client, in a local copy of the source code or a fork on Github, then have that client available when you run OTP. If you just build OTP with "mvn package" the resulting shaded JAR file in the target/ subdirectory will contain your modified client code. If I'm not mistaken a server started from that JAR file will serve up the modified client files.

Hope this helps,
Andrew

--
You received this message because you are subscribed to the Google Groups "OpenTripPlanner Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentripplanner...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/opentripplanner-dev/ae5c402a-1670-4534-bc65-1079f1a84cf3n%40googlegroups.com.

Antonio Bucchiarone

unread,
Feb 15, 2022, 10:12:11 AMFeb 15
to Andrew Byrd, Thomas Gran, opentripplanner-dev
Thanks a lot Andrew for this clear explanation. At the end I did something very closed to what you are suggesting and it works perfectly.

Thanks a lot again
Antonio

T


--
Le informazioni contenute nella presente comunicazione sono di natura privata e come tali sono da considerarsi riservate ed indirizzate esclusivamente ai destinatari indicati e per le finalità strettamente legate al relativo contenuto. Se avete ricevuto questo messaggio per errore, vi preghiamo di eliminarlo e di inviare una comunicazione all’indirizzo e-mail del mittente.
--
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you received this in error, please contact the sender and delete the material.
Reply all
Reply to author
Forward
0 new messages