brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [07/22] incubator-brooklyn git commit: copy the brooklyn/default.catalog.bom from the usage/cli project into the dist
Date Wed, 24 Jun 2015 08:05:18 GMT
copy the brooklyn/default.catalog.bom from the usage/cli project into the dist

this allows the same default bom to be used from the IDE as included in the dist,
and changes only need to be made in a single place (in the cli project)


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/e3db4f20
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/e3db4f20
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/e3db4f20

Branch: refs/heads/master
Commit: e3db4f20455302f6e9cb316f876bd628119ad4cf
Parents: 7b9d0e0
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Mon Jun 15 17:34:16 2015 +0100
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Wed Jun 24 00:40:32 2015 -0700

----------------------------------------------------------------------
 usage/cli/pom.xml                               | 23 ++++++++
 .../main/resources/brooklyn/default.catalog.bom | 58 +++++++++++++-------
 usage/dist/pom.xml                              | 29 ++++++++++
 .../dist/src/main/config/build-distribution.xml |  9 +++
 .../main/dist/conf/brooklyn/default.catalog.bom | 41 --------------
 5 files changed, 99 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e3db4f20/usage/cli/pom.xml
----------------------------------------------------------------------
diff --git a/usage/cli/pom.xml b/usage/cli/pom.xml
index ac4f0fc..91894f1 100644
--- a/usage/cli/pom.xml
+++ b/usage/cli/pom.xml
@@ -133,6 +133,29 @@
                     </execution>
                 </executions>
             </plugin>
+            
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>attach-catalog</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    <file>${project.build.directory}/classes/brooklyn/default.catalog.bom</file>
+                                    <type>bom</type>
+                                    <classifier>dist</classifier>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
 
             <!-- Disable the automatic LICENSE/NOTICE placement from the upstream pom,
because we need to include
                  bloodhound.js. See "resources" section below for where we include the new
LICENSE/NOTICE -->

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e3db4f20/usage/cli/src/main/resources/brooklyn/default.catalog.bom
----------------------------------------------------------------------
diff --git a/usage/cli/src/main/resources/brooklyn/default.catalog.bom b/usage/cli/src/main/resources/brooklyn/default.catalog.bom
index 0db2f20..42672ae 100644
--- a/usage/cli/src/main/resources/brooklyn/default.catalog.bom
+++ b/usage/cli/src/main/resources/brooklyn/default.catalog.bom
@@ -1,23 +1,41 @@
-# 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.
-#
 
-# this catalog bom simply scans.
-# in a dist a default.catalog.bom from the conf/ dir takes precedence.
+# this catalog bom is an illustration supplying a few useful sample items
+# and templates to get started using Brooklyn
 
 brooklyn.catalog:
-  scanJavaAnnotations: true
+  version: 0.7.0-SNAPSHOT  # BROOKLYN_VERSION
+  items:
+
+  # load everything in the classpath with a @Catalog annotation
+  - scanJavaAnnotations: true
+
+  - id: server
+    description: |
+      Provision a server, with customizable provisioning.properties and credentials installed,

+      but no other special software process or scripts executed.
+    item:
+      type: brooklyn.entity.basic.EmptySoftwareProcess
+      name: Server
+
+  - id: server-template
+    itemType: template
+    name: Server Template
+    description: |
+      Sample YAML to provision a server in a cloud with illustrative VM properties
+    item:
+      name: My App with a single VM
+      services:
+      - type: server
+        name: My VM
+      location:
+        jclouds:aws-ec2:
+          identity: <REPLACE>
+          credential: <REPLACE>
+          region: eu-west-1
+          # we want Ubuntu, with a lot of RAM
+          osFamily: ubuntu
+          minRam: 8gb
+          # set up this user and password (default is to authorize a public key)
+          user: sample
+          password: s4mpl3
+

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e3db4f20/usage/dist/pom.xml
----------------------------------------------------------------------
diff --git a/usage/dist/pom.xml b/usage/dist/pom.xml
index 401433d..f884372 100644
--- a/usage/dist/pom.xml
+++ b/usage/dist/pom.xml
@@ -63,6 +63,35 @@
     <build>
         <plugins>
             <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <!-- copy the config file from the CLI project -->
+                <executions>
+                    <execution>
+                        <id>copy</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>copy</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <!-- this can fail in eclipse trying to copy _from_
target/classes.
+                                         see http://jira.codehaus.org/browse/MDEP-259 -->
+                                    <groupId>${project.groupId}</groupId>
+                                    <artifactId>brooklyn-cli</artifactId>
+                                    <version>${project.version}</version>
+                                    <type>bom</type>
+                                    <classifier>dist</classifier>
+                                    <overWrite>true</overWrite>
+                                    <outputDirectory>target</outputDirectory>
+                                    <destFileName>default.catalog.bom</destFileName>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.rat</groupId>
                 <artifactId>apache-rat-plugin</artifactId>
                 <configuration>

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e3db4f20/usage/dist/src/main/config/build-distribution.xml
----------------------------------------------------------------------
diff --git a/usage/dist/src/main/config/build-distribution.xml b/usage/dist/src/main/config/build-distribution.xml
index d3792bc..78569e8 100644
--- a/usage/dist/src/main/config/build-distribution.xml
+++ b/usage/dist/src/main/config/build-distribution.xml
@@ -55,6 +55,15 @@
             </excludes>
         </fileSet>
         <fileSet>
+            <directory>${project.basedir}/target</directory>
+            <outputDirectory>conf/brooklyn</outputDirectory>
+            <fileMode>0644</fileMode>
+            <directoryMode>0755</directoryMode>
+            <includes>
+                <include>default.catalog.bom</include>
+            </includes>
+        </fileSet>
+        <fileSet>
             <!-- Add an empty patch folder (so need to reference an existing dir, and
exclude everything) -->
             <directory>${project.basedir}/src/main/dist</directory>
             <outputDirectory>lib/patch</outputDirectory>

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e3db4f20/usage/dist/src/main/dist/conf/brooklyn/default.catalog.bom
----------------------------------------------------------------------
diff --git a/usage/dist/src/main/dist/conf/brooklyn/default.catalog.bom b/usage/dist/src/main/dist/conf/brooklyn/default.catalog.bom
deleted file mode 100644
index 42672ae..0000000
--- a/usage/dist/src/main/dist/conf/brooklyn/default.catalog.bom
+++ /dev/null
@@ -1,41 +0,0 @@
-
-# this catalog bom is an illustration supplying a few useful sample items
-# and templates to get started using Brooklyn
-
-brooklyn.catalog:
-  version: 0.7.0-SNAPSHOT  # BROOKLYN_VERSION
-  items:
-
-  # load everything in the classpath with a @Catalog annotation
-  - scanJavaAnnotations: true
-
-  - id: server
-    description: |
-      Provision a server, with customizable provisioning.properties and credentials installed,

-      but no other special software process or scripts executed.
-    item:
-      type: brooklyn.entity.basic.EmptySoftwareProcess
-      name: Server
-
-  - id: server-template
-    itemType: template
-    name: Server Template
-    description: |
-      Sample YAML to provision a server in a cloud with illustrative VM properties
-    item:
-      name: My App with a single VM
-      services:
-      - type: server
-        name: My VM
-      location:
-        jclouds:aws-ec2:
-          identity: <REPLACE>
-          credential: <REPLACE>
-          region: eu-west-1
-          # we want Ubuntu, with a lot of RAM
-          osFamily: ubuntu
-          minRam: 8gb
-          # set up this user and password (default is to authorize a public key)
-          user: sample
-          password: s4mpl3
-


Mime
View raw message