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 97287200D29 for ; Thu, 26 Oct 2017 14:37:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 95D89160BF2; Thu, 26 Oct 2017 12:37:04 +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 B751D1609E8 for ; Thu, 26 Oct 2017 14:37:03 +0200 (CEST) Received: (qmail 58686 invoked by uid 500); 26 Oct 2017 12:37:02 -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 58673 invoked by uid 99); 26 Oct 2017 12:37:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Oct 2017 12:37:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id B33791808A2 for ; Thu, 26 Oct 2017 12:37:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.38 X-Spam-Level: X-Spam-Status: No, score=0.38 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id k6j39hfbCX0I for ; Thu, 26 Oct 2017 12:37:00 +0000 (UTC) Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 1B01B5FD41 for ; Thu, 26 Oct 2017 12:37:00 +0000 (UTC) Received: by mail-wm0-f50.google.com with SMTP id y83so2744565wmc.4 for ; Thu, 26 Oct 2017 05:37:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=b7VlkIFNp9ls+v5nr3Qnt+W2ltutNJLS8yxgJIwkkLc=; b=gRfFMpzfvJeayAG7ZrV87sAjvC4qwkvVPPjg1RrlDXtaHXHi/9YqlUHsZC4OR2g+Rl xNI6Y6yhoIPkHa4Qggkeac53No7NZRSc8Z2CCIiMUt2NsBedptUKg02Te3jFpomg3FPV RXAOjjJouXnPhz+MvnXvvB6sC4DER9xww4WrC4vyl2oJKhL53xqO2uNcxxZ4BsGac2iW JVUrO3amck/Fj5pihN8jfwzChXOVTVtz7mjCfkxWTbga0CZYRWEuoZiYVBqsYFTIE7PC QXK7oe5ubevNbv6lTA7sq0d4r5VLbLmQOKVLNP+L7ol30SKGWp5YTk9oFJmSDjYmZdWj uNGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=b7VlkIFNp9ls+v5nr3Qnt+W2ltutNJLS8yxgJIwkkLc=; b=K2Y2ikm4IKNsF61Ahd1UEhvs3jdHBwBdAmxNp/XVotMthaVpr3i0C5CHfr57iNM7N9 HzcmSZDfuKR93ML+CySQSO39ZukHqCxLX2nyAJM1VnaQDUwu71jwhLfGoBU5p/gnZLuG UQNeqeCtIbWchhiMtHy6tH5iUh4OEzHPiTTpx0goEh/oh4rjiIjkSV5XGLeI7n9mucsC ZKZNI2lRhJPo8V/C5epw7mznaEXQ5nNEB0d8OqFH3NcqMjCfihdWEXy9Dk2VTRG98tsq YB8jdHGVznFS4Nx6UrpyEjH8kG2A14Q2z3YGKVlCIH5/SQBY/shjFpLHDSky6L4r95QH zyUA== X-Gm-Message-State: AMCzsaV30Cg2rlAasR8y6LOJnvNT9ng6cqetBgV4Jk8j1P50BUGEXBUB pRfah4WYpywZhDgxmtT+bPg= X-Google-Smtp-Source: ABhQp+RQ8FCmI/ZDLzXbsO0IMdznUg7B4rhgZFORshSL0EKjJ22Ty5gqugWwJ9b2u+S637c64JKhjg== X-Received: by 10.28.4.135 with SMTP id 129mr1502649wme.34.1509021418799; Thu, 26 Oct 2017 05:36:58 -0700 (PDT) Received: from Aleds-MacBook-Pro-2.local (cpc75719-york6-2-0-cust54.7-1.cable.virginm.net. [81.102.132.55]) by smtp.gmail.com with ESMTPSA id m37sm7560549wrm.4.2017.10.26.05.36.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Oct 2017 05:36:57 -0700 (PDT) Subject: Re: Blueprint project structure To: dev@brooklyn.apache.org, Geoff Macartney References: <1cc638ca-a18e-140b-07c0-7818913e3469@cloudsoft.io> From: Aled Sage Message-ID: <79c5b3dd-8c9b-e275-9441-65bf6fbf4a6d@gmail.com> Date: Thu, 26 Oct 2017 13:36:56 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB archived-at: Thu, 26 Oct 2017 12:37:04 -0000 Hi all, I agree with Geoff: documenting the different approaches as you've done here sounds like the best way forward. --- Note that:     br catalog add https://github.com/brooklyncentral/brooklyn-dns/archive/master.zip is not the same as:     br catalog add target/brooklyn-dns-0.2.0-SNAPSHOT.jar For the latter, the bundle has symbolic name "io.brooklyn.dns.brooklyn-dns" (which it gets from the way the pom.xml builds it as an OSGi bundle). The former has no bundle name, so gets an auto-generated anonymous bundle name. I was assuming we would not tell people they must include `bundle: ` in the .bom file if they are explicitly building it as a bundle anyway. That is a violation of DRY (Don't Repeat Yourself). However, it would be necessary if we want to support adding via the zip and the jar. Aled On 25/10/2017 16:03, Geoff Macartney wrote: > The phrase "win - win" springs to mind. > > I'm not sure we need to go quite so far as saying that 2 is always best > practice. I'd tend toward using your description as the basis for a new > page in the docs that explains how projects can be structured and the > significance of having the `catalog.bom` in the root position, and leaves > it up to people to use what suits them. If someone wants to use approach 1 > they shouldn't feel they're deviating from best practice. > > > > > > On Wed, 25 Oct 2017 at 15:58 Alex Heneveld > wrote: > >> Hi All- >> >> With the move towards bundles, people have been experimenting with >> project structure, and there seem to be two schools: >> >> (1) use maven, include a `pom.xml` in root, and put the `catalog.bom` >> and blueprints into either `src/main/resources/` or a custom resources >> directory eg `catalog/` >> >> (2) put `catalog.bom` in root, and have yaml blueprint files, and >> scripts and other resources, in whatever structure underneath makes sense >> >> Both have benefits. For instance with (2) you can deploy straight from >> the root, or even `br catalog add >> https://github.com/brooklyncentral/brooklyn-dns/archive/master.zip` >> , and >> it's obvious where the entry point is. With (1) you can build and >> install to maven, and access the dependency as `mvn:...` URLs in karaf; >> and it of course becomes very useful when including java. >> >> I've done some experimenting at [1] on a pom.xml configuration that >> works with (2). This means a blueprint developer can do what they like >> without ever touching maven, not having a pom.xml, etc. Then if they >> want maven at some point it can be added on without having to change >> anything else in the project. It also means community blueprints can be >> used as (1) or as (2), and people looking at them just look at the >> subset of bom and yaml files that are the blueprint and it will be >> sensible, without any odd structure imposed by maven. And we can >> encourage putting a `catalog.bom` in the root of every project on the >> planet so there is never ever any question about how to deploy software >> ever again. :) >> >> Is this structure something we should converge on as a recommendation >> for blueprints projects? Basically I'm proposing we say (2) is _always_ >> best practice, even when is needed (1), and we have (one so far and more >> to follow if we like this) exemplars for how to structure projects. >> >> Best >> Alex >> >> >> [1] https://github.com/brooklyncentral/brooklyn-dns/pull/7 >> >>