Skip to content

Commit

Permalink
Reuse each bundle's catalog.bom file to build global catalog.bom
Browse files Browse the repository at this point in the history
  • Loading branch information
tbouron committed Sep 20, 2017
1 parent 4b555fc commit 3779d9c
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 6 deletions.
21 changes: 21 additions & 0 deletions karaf/config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,27 @@
<type>cfg</type>
<classifier>osgilauncher</classifier>
</artifact>
<artifact>
<file>
${project.basedir}/src/main/resources/catalog/catalog.bom
</file>
<type>bom</type>
<classifier>catalog</classifier>
</artifact>
<artifact>
<file>
${project.basedir}/src/main/resources/catalog/catalog-core.bom
</file>
<type>bom</type>
<classifier>catalog-core</classifier>
</artifact>
<artifact>
<file>
${project.basedir}/src/main/resources/catalog/catalog-templates.bom
</file>
<type>bom</type>
<classifier>catalog-templates</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
Expand Down
23 changes: 23 additions & 0 deletions karaf/config/src/main/resources/catalog/catalog-core.bom
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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: |
Expand Down
23 changes: 23 additions & 0 deletions karaf/config/src/main/resources/catalog/catalog.bom
Original file line number Diff line number Diff line change
@@ -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'
13 changes: 13 additions & 0 deletions karaf/features/src/main/feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,21 @@
</configfile>
</feature>

<feature name="brooklyn-catalog" version="${project.version}">
<configfile finalname="${karaf.home}/catalog/catalog.bom" override="false">
mvn:${project.groupId}/brooklyn-dist-config/${project.version}/bom/catalog
</configfile>
<configfile finalname="${karaf.home}/catalog/catalog-core.bom" override="false">
mvn:${project.groupId}/brooklyn-dist-config/${project.version}/bom/catalog-core
</configfile>
<configfile finalname="${karaf.home}/catalog/catalog-templates.bom" override="false">
mvn:${project.groupId}/brooklyn-dist-config/${project.version}/bom/catalog-templates
</configfile>
</feature>

<feature name="brooklyn-headless" version="${project.version}" description="All Brooklyn bundles witht the exception of the launcher">
<feature prerequisite="true">brooklyn-config</feature>
<feature prerequisite="true">brooklyn-catalog</feature>
<feature prerequisite="true">brooklyn-standard-karaf</feature>
<feature prerequisite="true">brooklyn-guava-optional-deps</feature>
<feature>brooklyn-core</feature>
Expand Down

0 comments on commit 3779d9c

Please sign in to comment.