How to plug in new build views
Hi. I'd like to extend Team City with a new HTML view that shows the current state of just one build with information gathered from a local user directory or website (pictures of who checked in, etc.). E.g. something like the output of Buildomatic.
What's the best way of doing this? Where do I plug in? Can it be done purely in JSP?
Any help much appreciated
Please sign in to leave a comment.
Hi Nat,
Please take a look at page http://www.jetbrains.net/confluence/display/TW/Plugin+Development ,
section "Server-side development". This page is short but should provide basic overview on how to
write a plugin with additional Web content.
This page also has an attachment - sources of coverage plugin for TeamCity - which you may find useful as well.
Kind regards,
KIR
According to that page, my plugin needs to register web resources with the WebResourcesManager. However, I cannot find that class anywhere in the TeamCity JARs. Where is it?
Found it. You also have to add the WEB-INF/classes directory to your classpath.
Answering my own questions so I can find the answer later...
You can't write this in pure JSP. You need to write a Spring MVC controller that creates a ModelAndView, populates it with named objects and then redirects to a JSP view that gets hold of those objects with the jsp:useBean tag.
I've raised another question about the best way to specify the URL mapping for the a plugin's controller.