brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Svetoslav Neykov (JIRA)" <>
Subject [jira] [Commented] (BROOKLYN-353) Best-practice for adding endpoints to the REST interface?
Date Thu, 29 Sep 2016 11:10:20 GMT


Svetoslav Neykov commented on BROOKLYN-353:

> Do you have any directions to do this?
If you can make the war file approach outlined below by [~rdowner] and [~andreaturli] work
then you'll be better off going this way. Note that the rest resources are not contained in
the war file so you can't add to them. Still you can create your own servlets which process
the request and have access to Brooklyn's internals.

Just in case though - to override the BrooklynRestApi file:
  * create a normal java maven project
  * add a dependency on brooklyn-rest-resources
  * create a new java class "", copying & pasting
the content of the original one
  * add your classes
  * build the project and put the jar in the patches folder

> Is there any way we can make a Maven project which actually depends on Brooklyn, instead?

Yes, the clocker project is a good example of how to do it -
The steps are to:
  * create a java project which contains your classes.
  * create a maven project which generates a brooklyn distribution (using assembly maven plugin)
with your changes in (depends on the above one). 

These two are combined in a single project in

The project also has an example of how to generate patches in

Also you can come to our IRC channel #brooklyncentral on Freenode to ask any questions.

> Best-practice for adding endpoints to the REST interface?
> ---------------------------------------------------------
>                 Key: BROOKLYN-353
>                 URL:
>             Project: Brooklyn
>          Issue Type: Question
>    Affects Versions: 0.9.0
>            Reporter: Francesco Chicchiriccò
> At the [CHOReVOLUTION|] project we are using Apache Brooklyn
to manage the whole deployment.
> As we need to add some endpoints to the REST interface, is there any best practice around?
At the moment we are just adding our classes to the Brooklyn codebase - which does not look
particularly fancy.

This message was sent by Atlassian JIRA

View raw message