Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B3766200BA0 for ; Thu, 29 Sep 2016 13:10:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B23DC160AE3; Thu, 29 Sep 2016 11:10:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0D4A2160AD7 for ; Thu, 29 Sep 2016 13:10:21 +0200 (CEST) Received: (qmail 9835 invoked by uid 500); 29 Sep 2016 11:10:21 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 9795 invoked by uid 99); 29 Sep 2016 11:10:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2016 11:10:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id DF2BC2C2A62 for ; Thu, 29 Sep 2016 11:10:20 +0000 (UTC) Date: Thu, 29 Sep 2016 11:10:20 +0000 (UTC) From: "Svetoslav Neykov (JIRA)" To: dev@brooklyn.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (BROOKLYN-353) Best-practice for adding endpoints to the REST interface? MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 29 Sep 2016 11:10:22 -0000 [ https://issues.apache.org/jira/browse/BROOKLYN-353?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D15= 532486#comment-15532486 ]=20 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 [~an= dreaturli] work then you'll be better off going this way. Note that the res= t resources are not contained in the war file so you can't add to them. Sti= ll you can create your own servlets which process the request and have acce= ss 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 "org.apache.brooklyn.rest.BrooklynRestApi", cop= ying & 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 Br= ooklyn, instead?=20 Yes, the clocker project is a good example of how to do it - https://github= .com/brooklyncentral/clocker. The steps are to: * create a java project which contains your classes. * create a maven project which generates a brooklyn distribution (using a= ssembly maven plugin) with your changes in (depends on the above one).=20 These two are combined in a single project in https://github.com/brooklynce= ntral/clocker/tree/master/dist. The project also has an example of how to generate patches in https://githu= b.com/brooklyncentral/clocker/tree/master/patches. Also you can come to our IRC channel #brooklyncentral on Freenode to ask an= y questions. > Best-practice for adding endpoints to the REST interface? > --------------------------------------------------------- > > Key: BROOKLYN-353 > URL: https://issues.apache.org/jira/browse/BROOKLYN-353 > Project: Brooklyn > Issue Type: Question > Affects Versions: 0.9.0 > Reporter: Francesco Chicchiricc=C3=B2 > > At the [CHOReVOLUTION|http://www.chorevolution.eu] project we are using A= pache 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 Brook= lyn codebase - which does not look particularly fancy. -- This message was sent by Atlassian JIRA (v6.3.4#6332)