You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:58:41 UTC

[sling-org-apache-sling-provisioning-model] annotated tag org.apache.sling.provisioning.model-1.5.0 created (now da24be8)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a change to annotated tag org.apache.sling.provisioning.model-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-provisioning-model.git.


      at da24be8  (tag)
 tagging 1a36a40dc70b0c098da7b4456251cc9f16d58f05 (commit)
      by Carsten Ziegeler
      on Fri Oct 28 05:15:01 2016 +0000

- Log -----------------------------------------------------------------
org.apache.sling.provisioning.model-1.5.0
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new 11a204a  Add slingstart model
     new 03f094c  Add slingstart model
     new a86fcd4  Update javadocs and rename subsystem to deliverable and run mode to feature
     new 58cc5a6  Add simple txt parser
     new 43a5c06  Add simple txt parser
     new fdc1ccf  Fully support Apach Felix config file format. Move from properties to getter and setter methods
     new 470e4bc  Fully support Apach Felix config file format. Move from properties to getter and setter methods
     new 9857e6c  Fully support Apach Felix config file format. Move from properties to getter and setter methods
     new 75a411c  Simplify model, move completely to getter/setter methods
     new 1a36bd0  Implement txt format for reading and writing
     new 7bee16a  Add merger utility and variable replacement
     new ca9289e  Finish configuration support
     new 245be2d  Add resolver to resolve variables from environment, system properties etc.
     new ffb35f8  Don't output jar extension if not necessary
     new 252bf2d  Remove support for xml
     new 456ebb1  Implement provisioning model
     new 380d68e  Rename some constants
     new c58f1ab  Cleanup methods and constants
     new d3b6bc4  Update to Sling Parent POM 22 with baselining enabled
     new 5154296  Correct method name
     new 55e51ed  Remove old slingstart model
     new 4b98c32  Refactor model and add basic read/write test
     new 98736d5  Consistent method naming and javadocs
     new 2341da7  Rename to provisoning model
     new 4d55db0  Rename to provisioning model
     new dc48bc1  Keep ${sling.home} in settings
     new fb3de37  Remove artifact on merge regardless of the start level
     new 43e7bcf  Fix writing out raw configs
     new 54361e3  Fix writing out raw configs
     new d71c810  Fix reading configs
     new bbe9bcd  Allow comments in configurations
     new bccda6c  Add some tests to verify the parsed and effective models
     new c47da2f  [maven-release-plugin] prepare release org.apache.sling.provisioning.model-1.0.0
     new e93aff8  [maven-release-plugin] prepare for next development iteration
     new 7aee9d5  Fix comments
     new ee05f2c  Update to latest launchpad base release
     new 523138f  SLING-4473 : Provide a way to remove settings, artifacts and features through a model SLING-4475 : Artifact is twice in feature after merge
     new 94c918f  [maven-release-plugin] prepare release org.apache.sling.provisioning.model-1.1.0
     new 15d9a12  [maven-release-plugin] prepare for next development iteration
     new 89e8cf9  Add test case for run modes
     new 97ac28f  Update test case
     new 52ee32c  Fix javadocs
     new 7a21cc8  Add missing licence headers
     new ceeb1f7  SLING-4698 - Set parent.relativePath to empty for all modules
     new 43429c2  SLING-4768 : Sort entries alphabetical in written model
     new fba2533  SLING-4768 : Sort entries alphabetical in written model
     new ee04adc  SLING-4768 : Sort entries alphabetical in written model
     new 9c0eaaa  SLING-4766 Provisioning Model does not support adding variables to Sling Settings - allow escaping with \${var}
     new 9dcb074  SLING-4768 : Sort entries alphabetical in written model
     new 1f2cf68  SLING-4782 : Update to latest format from Apache Felix config admin
     new f66c21e  SLING-4786 : Attributes and configuration format are wronlgy written out
     new 2192bda  SLING-4126 : Provide a mechanism to merge configurations
     new 5f9f27c  SLING-4126 : Provide a mechanism to merge configurations
     new bd96e54  SLING-4124 : Bootstrap command file can't be appended
     new c2b343f  SLING-4790 : Removal of artifacts from inherited model is not possible
     new 9c0fcd5  [maven-release-plugin] prepare release org.apache.sling.provisioning.model-1.2.0
     new 690eb71  [maven-release-plugin] prepare for next development iteration
     new 0972528  SLING-4807 : Variables in configurations are not replaced
     new 312ade9  Update to Sling Parent 23
     new 1d0ef5f  Remove superflous sling.java.version=6 as it's the default now
     new 58dbd4a  set parent version to 24 and add empty relativePath where missing
     new 3509c1f  SLING-4645 Update Tika to 1.9
     new bbf7873  SLING-4880 Allow to get artifact versions from POM
     new 6a392fa  SLING-4879 refactor model processing logic from ModelUtility#getEffectiveModel into separate class to make it reusable
     new 82e4d3f  SLING-4879 move resolver/replace logic to separate class ModelResolverUtility
     new 7d6e31f  SLING-4807 make sure variable replacement is applied whether custom resolver exists or not
     new 5eea7de  SLING-4879 add ModelUtility.applyVariables method that allows to inject further variables from a custom variable resolver
     new ce9607f  SLING-4880 apply resolved dependencies to raw model instead of attaching effective model add new optional parameter "allowUnresolvedPomDependencies" (default: false)
     new 84e3f39  fix some javadoc errors java 8 complains about
     new 9a36bf7  SLING-4807 introduce explicit boolean flag to make sure variable replacement does not take place when merging models
     new e3b7720  [maven-release-plugin] prepare release org.apache.sling.provisioning.model-1.3.0
     new b0181cd  [maven-release-plugin] prepare for next development iteration
     new 9a80232  Update the main reactor to parent 25
     new b36cc99  SLING-5148 : Support OSGi Subsystems in the Sling Provisioning model. Apply patch from David Bosschaert
     new d0779ce  SLING-5172 : Provide support for custom sections in the provisioning model
     new 7fa8736  SLING-5148 : Support OSGi Subsystems in the Sling Provisioning model.
     new 94bc251  SLING-5174 : Refactor merging of models into separate utility class and add merge options
     new 4a90126  git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/support/provisioning-model@1709754 13f79535-47bb-0310-9956-ffa450edef68
     new b0f38e7  SLING-5172 : Provide support for custom sections in the provisioning model
     new 42a911c  SLING-5174 : Refactor merging of models into separate utility class and add merge options
     new b05b9ce  [maven-release-plugin] prepare release org.apache.sling.provisioning.model-1.4.0
     new d7059e2  [maven-release-plugin] prepare for next development iteration
     new 6bb2a5e  SLING-5185 : Version comparision is wrong in case of qualifiers
     new 2c05c45  SLING-5189 : Improve start level handling when merging models
     new 967d25a  SLING-5318 : Sling provisioning model does not propagate Artifact metadata during processing. Apply patch from David Bosschaert
     new a4b997d  [maven-release-plugin] prepare release org.apache.sling.provisioning.model-1.4.2
     new 7da6bc0  [maven-release-plugin] prepare for next development iteration
     new 90c365d  SLING-5355 - test multiline strings in configs
     new 5ba03f6  Switch to parent pom 26
     new f1b113a  SLING-5765 : No way to remove an artifact from a special runmode
     new 609d205  [maven-release-plugin] prepare release org.apache.sling.provisioning.model-1.4.4
     new 3bd7409  [maven-release-plugin] prepare for next development iteration
     new 636f387  SLING-5914 - add tests that demonstrate the current behavior
     new af9d553  SLING-6181 : Support adding version info to Feature
     new 62c933d  [maven-release-plugin] prepare release org.apache.sling.provisioning.model-1.5.0
     new 1a36a40  [maven-release-plugin] copy for tag org.apache.sling.provisioning.model-1.5.0

The 96 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].

[sling-org-apache-sling-provisioning-model] 04/05: [maven-release-plugin] prepare release org.apache.sling.provisioning.model-1.5.0

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.provisioning.model-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-provisioning-model.git

commit 62c933d7f23393be3525586b2252dd8661dc80af
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Oct 28 05:14:48 2016 +0000

    [maven-release-plugin] prepare release org.apache.sling.provisioning.model-1.5.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/support/provisioning-model@1766922 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index c5a3548..f789de8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
     </parent>
 
     <artifactId>org.apache.sling.provisioning.model</artifactId>
-    <version>1.4.5-SNAPSHOT</version>
+    <version>1.5.0</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Provisioning Model</name>
@@ -31,9 +31,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/tooling/support/provisioning-model</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/tooling/support/provisioning-model</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/tooling/support/provisioning-model</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.provisioning.model-1.5.0</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.provisioning.model-1.5.0</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.provisioning.model-1.5.0</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-provisioning-model] 03/05: SLING-6181 : Support adding version info to Feature

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.provisioning.model-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-provisioning-model.git

commit af9d553d597f187a45a3e283f8773cb919f10d46
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun Oct 23 08:47:59 2016 +0000

    SLING-6181 : Support adding version info to Feature
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/support/provisioning-model@1766252 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            |  4 +-
 .../apache/sling/provisioning/model/Feature.java   | 22 ++++++++
 .../sling/provisioning/model/io/ModelReader.java   |  3 +-
 .../sling/provisioning/model/io/ModelWriter.java   |  4 ++
 .../sling/provisioning/model/package-info.java     |  2 +-
 .../sling/provisioning/model/FeatureTest.java      | 60 ++++++++++++++++++++++
 .../org/apache/sling/provisioning/model/U.java     | 20 ++++----
 src/test/resources/feature.txt                     | 27 ++++++++++
 8 files changed, 128 insertions(+), 14 deletions(-)

diff --git a/pom.xml b/pom.xml
index 4205d2e..c5a3548 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,7 +17,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>26</version>
+        <version>29</version>
         <relativePath />
     </parent>
 
@@ -57,7 +57,7 @@
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.configadmin</artifactId>
-            <version>1.8.6</version>
+            <version>1.8.10</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
diff --git a/src/main/java/org/apache/sling/provisioning/model/Feature.java b/src/main/java/org/apache/sling/provisioning/model/Feature.java
index 0f27e84..65d5fbc 100644
--- a/src/main/java/org/apache/sling/provisioning/model/Feature.java
+++ b/src/main/java/org/apache/sling/provisioning/model/Feature.java
@@ -25,6 +25,7 @@ import java.util.List;
 /**
  * A feature is a collection of
  * - a name
+ * - a version
  * - variables
  * - run modes
  */
@@ -38,6 +39,9 @@ public class Feature
     /** The type of feature */
     private volatile String type = FeatureTypes.PLAIN;
 
+    /** The version of the feature */
+    private volatile String version;
+
     /** Variables. */
     private final KeyValueMap<String> variables = new KeyValueMap<String>();
 
@@ -64,6 +68,15 @@ public class Feature
     }
 
     /**
+     * Get the version of the feature.
+     * @return The version string or {@code null}
+     * @since 1.6.0
+     */
+    public String getVersion() {
+        return this.version;
+    }
+
+    /**
      * Special feature?
      * @return true if the feature is special
      */
@@ -129,6 +142,15 @@ public class Feature
     }
 
     /**
+     * Set the version.
+     * @param v The new version
+     * @since 1.6.0
+     */
+    public void setVersion(final String v) {
+        this.version = v;
+    }
+
+    /**
      * Set the feature type.
      * @param t The new type
      * @since 1.4.0
diff --git a/src/main/java/org/apache/sling/provisioning/model/io/ModelReader.java b/src/main/java/org/apache/sling/provisioning/model/io/ModelReader.java
index 98619a4..a5a1779 100644
--- a/src/main/java/org/apache/sling/provisioning/model/io/ModelReader.java
+++ b/src/main/java/org/apache/sling/provisioning/model/io/ModelReader.java
@@ -40,7 +40,7 @@ public class ModelReader {
 
     private enum CATEGORY {
         NONE(null, null),
-        FEATURE("feature", new String[] {"name", "type"}),
+        FEATURE("feature", new String[] {"name", "type", "version"}),
         VARIABLES("variables", null),
         ARTIFACTS("artifacts", new String[] {"runModes", "startLevel"}),
         SETTINGS("settings", new String[] {"runModes"}),
@@ -200,6 +200,7 @@ public class ModelReader {
                                    }
                                    this.feature = model.getOrCreateFeature(name);
                                    this.feature.setType(parameters.get("type"));
+                                   this.feature.setVersion(parameters.get("version"));
                                    this.init(this.feature);
                                    this.runMode = null;
                                    this.artifactGroup = null;
diff --git a/src/main/java/org/apache/sling/provisioning/model/io/ModelWriter.java b/src/main/java/org/apache/sling/provisioning/model/io/ModelWriter.java
index de004d9..d503628 100644
--- a/src/main/java/org/apache/sling/provisioning/model/io/ModelWriter.java
+++ b/src/main/java/org/apache/sling/provisioning/model/io/ModelWriter.java
@@ -93,6 +93,10 @@ public class ModelWriter {
                 pw.print(" type=");
                 pw.print(feature.getType());
             }
+            if ( feature.getVersion() != null ) {
+                pw.print(" version=");
+                pw.print(feature.getVersion());
+            }
             pw.println("]");
             pw.println();
 
diff --git a/src/main/java/org/apache/sling/provisioning/model/package-info.java b/src/main/java/org/apache/sling/provisioning/model/package-info.java
index a8beffb..9821b30 100644
--- a/src/main/java/org/apache/sling/provisioning/model/package-info.java
+++ b/src/main/java/org/apache/sling/provisioning/model/package-info.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-@Version("1.5.0")
+@Version("1.6.0")
 package org.apache.sling.provisioning.model;
 
 import aQute.bnd.annotation.Version;
diff --git a/src/test/java/org/apache/sling/provisioning/model/FeatureTest.java b/src/test/java/org/apache/sling/provisioning/model/FeatureTest.java
index 3ac3c36..879a4f4 100644
--- a/src/test/java/org/apache/sling/provisioning/model/FeatureTest.java
+++ b/src/test/java/org/apache/sling/provisioning/model/FeatureTest.java
@@ -17,7 +17,14 @@
 package org.apache.sling.provisioning.model;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
+import java.io.StringReader;
+import java.io.StringWriter;
+
+import org.apache.sling.provisioning.model.io.ModelReader;
+import org.apache.sling.provisioning.model.io.ModelWriter;
 import org.junit.Test;
 
 public class FeatureTest {
@@ -30,4 +37,57 @@ public class FeatureTest {
         f.setType(FeatureTypes.SUBSYSTEM_APPLICATION);
         assertEquals(FeatureTypes.SUBSYSTEM_APPLICATION, f.getType());
     }
+
+    @Test
+    public void testFeatureVersion() {
+        Feature f = new Feature("blah");
+        assertNull(f.getVersion());
+
+        f.setVersion("1.0.0");
+        assertEquals("1.0.0", f.getVersion());
+    }
+
+    @Test
+    public void testFeatureVersions() throws Exception {
+        final Model m = U.readTestModel("feature.txt");
+
+        assertEquals(3, m.getFeatures().size());
+        Feature a = m.getFeature("a");
+        assertNotNull(a);
+        assertEquals("1.0", a.getVersion());
+
+        Feature b = m.getFeature("b");
+        assertNotNull(b);
+        assertNull(b.getVersion());
+
+        Feature c = m.getFeature("c");
+        assertNotNull(c);
+        assertEquals("2.0", c.getVersion());
+
+        // Write the model
+        StringWriter writer = new StringWriter();
+        try {
+            ModelWriter.write(writer, m);
+        } finally {
+            writer.close();
+        }
+
+        // read it again
+        StringReader reader = new StringReader(writer.toString());
+        final Model readModel = ModelReader.read(reader, "memory");
+        reader.close();
+
+        assertEquals(3, readModel.getFeatures().size());
+        a = readModel.getFeature("a");
+        assertNotNull(a);
+        assertEquals("1.0", a.getVersion());
+
+        b = readModel.getFeature("b");
+        assertNotNull(b);
+        assertNull(b.getVersion());
+
+        c = readModel.getFeature("c");
+        assertNotNull(c);
+        assertEquals("2.0", c.getVersion());
+    }
 }
diff --git a/src/test/java/org/apache/sling/provisioning/model/U.java b/src/test/java/org/apache/sling/provisioning/model/U.java
index 064cc0e..5c7fdea 100644
--- a/src/test/java/org/apache/sling/provisioning/model/U.java
+++ b/src/test/java/org/apache/sling/provisioning/model/U.java
@@ -16,6 +16,14 @@
  */
 package org.apache.sling.provisioning.model;
 
+import static org.apache.sling.provisioning.model.ModelConstants.DEFAULT_RUN_MODE;
+import static org.apache.sling.provisioning.model.ModelConstants.DEFAULT_START_LEVEL;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.io.InputStreamReader;
 import java.io.Reader;
 import java.util.ArrayList;
@@ -25,14 +33,6 @@ import java.util.Map;
 
 import org.apache.sling.provisioning.model.io.ModelReader;
 
-import static org.apache.sling.provisioning.model.ModelConstants.DEFAULT_RUN_MODE;
-import static org.apache.sling.provisioning.model.ModelConstants.DEFAULT_START_LEVEL;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
 /** Test utilities */
 public class U {
 
@@ -84,7 +84,7 @@ public class U {
                 if (errors != null ) {
                     throw new Exception("Invalid model at " + name + " : " + errors);
                 }
-                ModelUtility.merge(result, current);
+                MergeUtility.merge(result, current);
             } finally {
                 reader.close();
             }
@@ -144,7 +144,7 @@ public class U {
         final RunMode defaultExampleRM = exampleFeature.getRunMode();
         final List<Configuration> configs = assertConfigurationsInRunMode(defaultExampleRM, 3);
         assertEquals(FeatureTypes.SUBSYSTEM_COMPOSITE, exampleFeature.getType());
-        final Configuration cfg = assertConfiguration(configs, "org.apache.sling.another.config");
+        assertConfiguration(configs, "org.apache.sling.another.config");
     }
 
     public static Configuration assertConfiguration(final List<Configuration> configs, final String pid) {
diff --git a/src/test/resources/feature.txt b/src/test/resources/feature.txt
new file mode 100644
index 0000000..c7b5cc6
--- /dev/null
+++ b/src/test/resources/feature.txt
@@ -0,0 +1,27 @@
+#
+#  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.
+#
+[feature name=a version=1.0]
+    org.apache.jackrabbit/oak-core/1.0.0/jar
+
+[feature name=b]
+    org.apache.jackrabbit/oak-core/1.0.0/jar
+
+[feature name=c version=2.0]
+    org.apache.jackrabbit/oak-core/2.0.0/jar
+    
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-provisioning-model] 05/05: [maven-release-plugin] copy for tag org.apache.sling.provisioning.model-1.5.0

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.provisioning.model-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-provisioning-model.git

commit 1a36a40dc70b0c098da7b4456251cc9f16d58f05
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Oct 28 05:15:01 2016 +0000

    [maven-release-plugin] copy for tag org.apache.sling.provisioning.model-1.5.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.provisioning.model-1.5.0@1766923 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-provisioning-model] 01/05: [maven-release-plugin] prepare for next development iteration

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.provisioning.model-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-provisioning-model.git

commit 3bd74093fe6d2101cb77d50beb304808e4a48e63
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Jun 6 13:56:35 2016 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/support/provisioning-model@1747003 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 8646c3b..4205d2e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
     </parent>
 
     <artifactId>org.apache.sling.provisioning.model</artifactId>
-    <version>1.4.4</version>
+    <version>1.4.5-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Provisioning Model</name>
@@ -31,9 +31,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.provisioning.model-1.4.4</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.provisioning.model-1.4.4</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.provisioning.model-1.4.4</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/tooling/support/provisioning-model</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/tooling/support/provisioning-model</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/tooling/support/provisioning-model</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-provisioning-model] 02/05: SLING-5914 - add tests that demonstrate the current behavior

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.provisioning.model-1.5.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-provisioning-model.git

commit 636f38774dd4a8665a12c6ebcaa26a705d385cf5
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Fri Jul 29 08:07:45 2016 +0000

    SLING-5914 - add tests that demonstrate the current behavior
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/support/provisioning-model@1754482 13f79535-47bb-0310-9956-ffa450edef68
---
 .../apache/sling/provisioning/model/io/IOTest.java | 13 ++++++++++-
 src/test/resources/configadmin.txt                 | 27 ++++++++++++++++++++--
 2 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/src/test/java/org/apache/sling/provisioning/model/io/IOTest.java b/src/test/java/org/apache/sling/provisioning/model/io/IOTest.java
index 6a7395a..a217e90 100644
--- a/src/test/java/org/apache/sling/provisioning/model/io/IOTest.java
+++ b/src/test/java/org/apache/sling/provisioning/model/io/IOTest.java
@@ -93,7 +93,7 @@ public class IOTest {
             configs.add(c);
         }
 
-        assertEquals(4, configs.size());
+        assertEquals(5, configs.size());
 
         final Configuration cfgA = configs.get(0);
         assertEquals("org.apache.test.A", cfgA.getPid());
@@ -119,6 +119,17 @@ public class IOTest {
         assertEquals("org.apache.test.D", cfgD.getPid());
         assertEquals("Here is\na multiline\nstring", cfgD.getProperties().get("textA"));
         assertEquals("Another one\nusing\nescaped newlines", cfgD.getProperties().get("textB"));
+        
+        final Configuration cfgE = configs.get(4);
+        assertEquals("org.apache.test.E", cfgE.getPid());
+        assertNull(cfgE.getFactoryPid());
+        assertEquals(4, cfgE.getProperties().size());
+        
+        // TODO values will need to change once SLING-5914 is fixed
+        assertEquals(6.0995758E-316, cfgE.getProperties().get("doubleValue"));
+        assertEquals(6.461264E-31f, cfgE.getProperties().get("floatValue"));
+        assertArrayEquals(new Double[] { 1.598088874E-315d, 2.09215452E-315d }, (Double[]) cfgE.getProperties().get("doubles"));
+        assertArrayEquals(new Float[] { 3.7971794E-20f, 1.4675382E-16f }, (Float[]) cfgE.getProperties().get("floats"));
     }
 
     @Test public void testAddition() throws Exception {
diff --git a/src/test/resources/configadmin.txt b/src/test/resources/configadmin.txt
index 9c9d6f6..690a5d3 100644
--- a/src/test/resources/configadmin.txt
+++ b/src/test/resources/configadmin.txt
@@ -32,7 +32,7 @@ org.apache.test.B
       "two",
       "three"
     ]
-    name="B"    
+    name="B"
 
 org.apache.test.C
     array=I[
@@ -46,4 +46,27 @@ org.apache.test.D
   textA="Here is
     a multiline
     string"     
-  textB="Another one\nusing\nescaped newlines"     
\ No newline at end of file
+  textB="Another one\nusing\nescaped newlines"
+  
+# TODO SLING-5914 this is the input format that's
+# specified by the provisioning model, fails with 
+# NumberFormatException if activated  
+#org.apache.test.E
+#    doubleValue=D"5.5"
+#    floatValue=F"1.0"
+#	doubles=D["0.0", "3.0"]
+#	floats=F[
+#	  "-1.0",
+#	  "1.0"
+#    ]
+	 
+# TODO deactivate this once
+# the previous variant works
+org.apache.test.E
+    doubleValue=D"123456789"
+    floatValue=F"223456789"
+   doubles=D["323456789", "423456789"]
+   floats=F[
+     "523456789",
+     "623456789"
+    ]     	 
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.