brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From drigod...@apache.org
Subject [1/2] brooklyn-server git commit: Makes core-tests.jar installable in the catalog, add metadata
Date Thu, 15 Jun 2017 08:55:00 GMT
Repository: brooklyn-server
Updated Branches:
  refs/heads/master 9fb61c13a -> b97942d59


Makes core-tests.jar installable in the catalog, add metadata

Fixes CatalogDtoTest.testCatalogLookup which installs the jar even though it's not a proper
osgi bundle


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

Branch: refs/heads/master
Commit: 4b50f83bf1aa7dc9bf8a20e4e504a69d9d66edf9
Parents: 6bdad92
Author: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Authored: Tue Jun 13 12:56:11 2017 +0300
Committer: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Committed: Tue Jun 13 12:56:15 2017 +0300

----------------------------------------------------------------------
 .../catalog/internal/BasicBrooklynCatalog.java  |  3 ++-
 core/src/test/resources/catalog.bom             | 20 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/4b50f83b/core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
b/core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
index a3a4e7f..5715b66 100644
--- a/core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
+++ b/core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
@@ -58,6 +58,7 @@ import org.apache.brooklyn.util.guava.Maybe;
 import org.apache.brooklyn.util.javalang.AggregateClassLoader;
 import org.apache.brooklyn.util.javalang.JavaClassNames;
 import org.apache.brooklyn.util.javalang.LoadedClassLoader;
+import org.apache.brooklyn.util.osgi.OsgiUtils;
 import org.apache.brooklyn.util.osgi.VersionedName;
 import org.apache.brooklyn.util.text.Strings;
 import org.apache.brooklyn.util.time.Duration;
@@ -446,7 +447,7 @@ public class BasicBrooklynCatalog implements BrooklynCatalog {
         if (Strings.isBlank(version)) {
             throw new IllegalStateException("Catalog BOM must define version if bundle is
defined");
         }
-        return new VersionedName(bundle, Version.valueOf(version));
+        return new VersionedName(bundle, Version.valueOf(OsgiUtils.toOsgiVersion(version)));
     }
 
     private void collectCatalogItems(String yaml, List<CatalogItemDtoAbstract<?, ?>>
result, Map<?, ?> parentMeta) {

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/4b50f83b/core/src/test/resources/catalog.bom
----------------------------------------------------------------------
diff --git a/core/src/test/resources/catalog.bom b/core/src/test/resources/catalog.bom
new file mode 100644
index 0000000..f162a06
--- /dev/null
+++ b/core/src/test/resources/catalog.bom
@@ -0,0 +1,20 @@
+# 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:
+  bundle: org.apache.brooklyn.core-tests
+  version: "0.12.0-SNAPSHOT" # BROOKLYN_VERSION


Mime
View raw message