Adding Jersey support to an existing plugin Follow
Hi. I am the author of the tcWebHooks plugin which provides outbound Webhooks support for TeamCity.
I've had a number of requests to provide a REST API for my plugin and would like to move to utilising the same API for my plugin UI (eg, JQuery calling Jersey).
Is there an easy way to add Jersey to a plugin? I've looked at the TeamCity REST API plugin source, but it seems like a lot of code to just get Jersey working.
I also looked at extending the plugin, but it's not very MAVEN friendly and would take a lot to fit into my existing plugin structure.
Is there a simple HelloWorld Jersey in TeamCity project somewhere?
Or is there an extension point in TeamCity that is not the full Spring MVC one that would allow Jersey integration?
Many thanks in advance, Net Wolf.
Please sign in to leave a comment.
I have made good progress by copying the CCTray contrib plugin and now have a simple HelloWorld REST request object extending the REST API.
I am using TeamCity 9
I have had a number of misleading errors however. I have learnt the following:
I was trying to load the libraries into my jar and it was failing to do the spring registration.
I'll push my code to github later today or tomorrow.
This commit has a working plugin which supports standard teamcity spring mvc with jsp and a Jersey REST endpoint.
https://github.com/tcplugins/tcWebHooks/commit/64ad147cb80993e2727af7db294a3c7429330c83
The jersey part just does hello world, when hitting the following URI: teamcity_server/app/rest/webhooks/hello