From 3779d9cce298cbf74d2be98702f6151a32224914 Mon Sep 17 00:00:00 2001 From: Thomas Bouron Date: Wed, 20 Sep 2017 11:54:44 +0100 Subject: [PATCH 1/3] Reuse each bundle's catalog.bom file to build global catalog.bom --- karaf/config/pom.xml | 21 +++++++++++++++++ .../main/resources/catalog/catalog-core.bom | 23 +++++++++++++++++++ .../resources/catalog/catalog-templates.bom} | 23 ++++++++++++++----- .../src/main/resources/catalog/catalog.bom | 23 +++++++++++++++++++ karaf/features/src/main/feature/feature.xml | 13 +++++++++++ 5 files changed, 97 insertions(+), 6 deletions(-) create mode 100644 karaf/config/src/main/resources/catalog/catalog-core.bom rename karaf/{apache-brooklyn/src/main/resources/catalog/catalog.bom => config/src/main/resources/catalog/catalog-templates.bom} (94%) create mode 100644 karaf/config/src/main/resources/catalog/catalog.bom diff --git a/karaf/config/pom.xml b/karaf/config/pom.xml index 50c11f4e0b..484247d16e 100644 --- a/karaf/config/pom.xml +++ b/karaf/config/pom.xml @@ -45,6 +45,27 @@ cfg osgilauncher + + + ${project.basedir}/src/main/resources/catalog/catalog.bom + + bom + catalog + + + + ${project.basedir}/src/main/resources/catalog/catalog-core.bom + + bom + catalog-core + + + + ${project.basedir}/src/main/resources/catalog/catalog-templates.bom + + bom + catalog-templates + diff --git a/karaf/config/src/main/resources/catalog/catalog-core.bom b/karaf/config/src/main/resources/catalog/catalog-core.bom new file mode 100644 index 0000000000..4d5e81e28a --- /dev/null +++ b/karaf/config/src/main/resources/catalog/catalog-core.bom @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +brooklyn.catalog: + version: "0.13.0-SNAPSHOT" # BROOKLYN_VERSION + + items: + - classpath://org.apache.brooklyn.karaf-init:0.13.0-SNAPSHOT:catalog.bom # BROOKLYN_VERSION + - classpath://org.apache.brooklyn.library-catalog:0.13.0-SNAPSHOT:catalog.bom # BROOKLYN_VERSION \ No newline at end of file diff --git a/karaf/apache-brooklyn/src/main/resources/catalog/catalog.bom b/karaf/config/src/main/resources/catalog/catalog-templates.bom similarity index 94% rename from karaf/apache-brooklyn/src/main/resources/catalog/catalog.bom rename to karaf/config/src/main/resources/catalog/catalog-templates.bom index f6081a6dc0..d54275231d 100644 --- a/karaf/apache-brooklyn/src/main/resources/catalog/catalog.bom +++ b/karaf/config/src/main/resources/catalog/catalog-templates.bom @@ -1,13 +1,24 @@ - -# this catalog bom is an illustration supplying a few useful sample items -# and templates to get started using Brooklyn - +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# brooklyn.catalog: version: "0.13.0-SNAPSHOT" # BROOKLYN_VERSION - include: classpath://library-catalog-classes.bom items: - - id: server itemType: entity description: | diff --git a/karaf/config/src/main/resources/catalog/catalog.bom b/karaf/config/src/main/resources/catalog/catalog.bom new file mode 100644 index 0000000000..7684b8e587 --- /dev/null +++ b/karaf/config/src/main/resources/catalog/catalog.bom @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +brooklyn.catalog: + version: "0.13.0-SNAPSHOT" # BROOKLYN_VERSION + + items: + - 'file:catalog/catalog-core.bom' + - 'file:catalog/catalog-templates.bom' diff --git a/karaf/features/src/main/feature/feature.xml b/karaf/features/src/main/feature/feature.xml index 818fc8603d..2c58c76166 100644 --- a/karaf/features/src/main/feature/feature.xml +++ b/karaf/features/src/main/feature/feature.xml @@ -67,8 +67,21 @@ + + + mvn:${project.groupId}/brooklyn-dist-config/${project.version}/bom/catalog + + + mvn:${project.groupId}/brooklyn-dist-config/${project.version}/bom/catalog-core + + + mvn:${project.groupId}/brooklyn-dist-config/${project.version}/bom/catalog-templates + + + brooklyn-config + brooklyn-catalog brooklyn-standard-karaf brooklyn-guava-optional-deps brooklyn-core From 4f4037ec3911ce86d711951434d7aac2411ac503 Mon Sep 17 00:00:00 2001 From: Thomas Bouron Date: Wed, 20 Sep 2017 11:55:19 +0100 Subject: [PATCH 2/3] Update RPM and DEB packages to match new catalog.bom files structure --- deb-packaging/pom.xml | 7 ++++--- rpm-packaging/pom.xml | 5 ----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/deb-packaging/pom.xml b/deb-packaging/pom.xml index 32bddb7d3d..cb67027a28 100644 --- a/deb-packaging/pom.xml +++ b/deb-packaging/pom.xml @@ -117,11 +117,12 @@ - ${project.build.directory}/deps/apache-brooklyn-${project.version}/catalog - directory + template + + /opt/brooklyn-${project.version}/catalog + perm - /opt/brooklyn-${project.version}/catalog brooklyn brooklyn ${brooklyn.file.permission.default} diff --git a/rpm-packaging/pom.xml b/rpm-packaging/pom.xml index 27f4770692..3396516b1e 100644 --- a/rpm-packaging/pom.xml +++ b/rpm-packaging/pom.xml @@ -132,11 +132,6 @@ /opt/brooklyn-${project.version}/catalog - - - ${project.build.directory}/deps/apache-brooklyn-${project.version}/catalog - - /opt/brooklyn-${project.version}/data From 97769fd30383e845e79930ef48c92f56d9a6256c Mon Sep 17 00:00:00 2001 From: Thomas Bouron Date: Mon, 25 Sep 2017 13:01:12 +0200 Subject: [PATCH 3/3] Use `mvn:` syntax with `brooklyn.libraries` to load OSGi bundles --- karaf/config/src/main/resources/catalog/catalog-core.bom | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/karaf/config/src/main/resources/catalog/catalog-core.bom b/karaf/config/src/main/resources/catalog/catalog-core.bom index 4d5e81e28a..87957e79f1 100644 --- a/karaf/config/src/main/resources/catalog/catalog-core.bom +++ b/karaf/config/src/main/resources/catalog/catalog-core.bom @@ -18,6 +18,6 @@ brooklyn.catalog: version: "0.13.0-SNAPSHOT" # BROOKLYN_VERSION - items: - - classpath://org.apache.brooklyn.karaf-init:0.13.0-SNAPSHOT:catalog.bom # BROOKLYN_VERSION - - classpath://org.apache.brooklyn.library-catalog:0.13.0-SNAPSHOT:catalog.bom # BROOKLYN_VERSION \ No newline at end of file + brooklyn.libraries: + - mvn:org.apache.brooklyn/brooklyn-karaf-init/0.13.0-SNAPSHOT # BROOKLYN_VERSION + - mvn:org.apache.brooklyn/brooklyn-library-catalog/0.13.0-SNAPSHOT # BROOKLYN_VERSION \ No newline at end of file