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 10:21:16 UTC

[sling-org-apache-sling-testing-osgi-mock] annotated tag org.apache.sling.testing.osgi-mock-2.1.0 created (now 40a5909)

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

rombert pushed a change to annotated tag org.apache.sling.testing.osgi-mock-2.1.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git.


      at 40a5909  (tag)
 tagging 88c5214511a9524790df29a7a29a57008e586432 (commit)
      by Stefan Seifert
      on Wed Sep 14 21:27:47 2016 +0000

- Log -----------------------------------------------------------------
org.apache.sling.testing.osgi-mock-2.1.0
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new e5ba840  SLING-4042 Donate sling-mock, jcr-mock, osgi-mock implementation
     new e1ee5ad  svn:ignore
     new 8d20817  SLING-4042 move all mock projects to mocks/ subdirectory
     new ad838b2  SLING-4042 add missing package-info files
     new 740687d  SLING-4042 make sure dependency injection is continued even if not all injections succeeded, and report root cause of invocation target exceptions
     new 7e5bc2d  SLING-4042 add README files
     new 21a5152  add/update SCM urls
     new 74be83a  [maven-release-plugin] prepare release org.apache.sling.testing.osgi-mock-1.0.0
     new d794a37  [maven-release-plugin] prepare for next development iteration
     new 0a80e0c  SLING-4090 Define package versions for Sling Mock, JCR Mock, OSGi Mock
     new 59f74f6  SLING-4142 MockOsgi: Activate/Deactivate method does not support different signatures
     new a822c76  SLING-4162 Introduce "OsgiContext" junit rule for OSGi and OsgiContextImpl
     new b30dd56  SLING-4162 fix javadoc
     new c40b2dd  SLING-4163 OSGi Mock: Reference bind/unbind method picking order
     new abe8b21  fix some javadoc copy&paste errors and formatting
     new 7c2b519  SLING-4166 OSGi Mock: Support for "modified" SCR lifecycle method
     new 4d131cd  SLING-4166 update package version
     new 907c7df  SLING-4165 OSGi Mock: Fail-fast when calling methods requiring SCR metadata and this is not present
     new 5538cda  SLING-4201 MockOsgi.activate()/deactivate()/modified() should fail fast if method is declared but can't be found
     new 50112aa  SLING-4202 OSGi Mock: Fail-fast when mandatory references cannot be injected
     new 70f5447  fix some javadoc errors/warnings
     new d7f336c  [maven-release-plugin] prepare release org.apache.sling.testing.osgi-mock-1.1.0
     new 5022c27  [maven-release-plugin] prepare for next development iteration
     new b910746  rename package-private class ReflectinServiceUtil to OsgiServiceUtil because it does not any longer use reflection to do it's job (no functional change)
     new 68de5d4  SLING-4435 OSGi Mock: Cache reading of OSGi SCR Metadata files
     new dc9866e  SLING-4439 add support for unregistering services and prepare dynamic service reference handling
     new e3e8bb1  SLING-4439 implement dynamic service registration
     new e6baa2c  SLING-4439 implement dynamic service registration
     new a980473  SLING-4439 implement dynamic service registration
     new e828e3d  SLING-4439 implement dynamic service registration - support string array properties in osgi metadata as well - merge properties from osgi metadata with those specified on activation/registration call - support "old-style" scr component metadata file as well (and test this case)
     new 5afcfc6  [maven-release-plugin] prepare release org.apache.sling.testing.osgi-mock-1.2.0
     new cea3da7  [maven-release-plugin] prepare for next development iteration
     new c389c24  SLING-4472 MockBundleContent.getProperty should return null
     new 4900b9b  Add missing licence headers and ignores for rat
     new 174e654  SLING-4670 : SCR metadata can't be read if components element is missing
     new c1ab86f  SLING-4698 - Set parent.relativePath to empty for all modules
     new ad91a5b  SLING-4718 Support OSGi component name different from implementation class
     new dd63020  SLING-4719 osgi-mock: Add Mock EventAdmin implementation
     new aede0b4  SLING-4720 Add support for "Long" and "Boolean" property types in SCR metadata
     new bd78f8a  SLING-4725 osgi-mock: Make compatible to OSGi 5/6
     new 9a4208d  SLING-4470 introduce separate "logging-mock" project for default log configuration in mock tests, remove compile-dependency on slf4j-simple
     new 61fec88  update dependencies for release
     new 20100ff  [maven-release-plugin] prepare release org.apache.sling.testing.osgi-mock-1.3.0
     new 1e80946  [maven-release-plugin] prepare for next development iteration
     new 62541d8  update to next development snapshot unit released artifacts are in maven central
     new c5653dd  SLING-4756 - ServiceListener notifications are not filtered
     new cd84d7c  SLING-4756 - ServiceListener notifications are not filtered
     new 88790a8  SLING-4756 - ServiceListener notifications are not filtered
     new 3704cb2  update to released mock versions
     new 0f222f7  SLING-4769 Osgi Mock: Add support for bundle headers
     new 5644c49  SLING-4756 add support for filtering via felix.framework FilterImpl implementation
     new f4513f8  SLING-4771 Osgi Mock: Allow to set mock bundle symbolic name
     new 9b26d4c  OsgiServiceUtil: clarify exception message when no matching references were found
     new 7da1c22  MockBundleTest - cast once in the @BeforeMethod instead of every test
     new 4d21da0  SLING-4780 - Implement MockBundle.getLastModified
     new 9248ced  SLING-4781 - Implement MockBundle.getEntryPaths
     new ed82c56  SLING-4781 - Implement MockBundle.getEntryPaths
     new 456e603  SLING-4813 - Support CGLIB enhanced classes for Mockito based service mocks
     new 8d9a404  [maven-release-plugin] prepare release org.apache.sling.testing.osgi-mock-1.4.0
     new 1e43ffc  [maven-release-plugin] prepare for next development iteration
     new 2cd752f  Update to Sling Parent 23
     new 5e5797b  Testing: remove superflous sling.java.version=6 as it's the default now
     new 384b81a  Update rat exclude rules
     new a69eb1b  @no-jira : test failed with a timeout on jenkins - tring with 2sec timeout
     new 64dc2d0  SLING-4845 - MockBundleContext is not thread-safe
     new 9260a58  SLING-4845 - MockBundleContext is not thread-safe
     new e283546  set parent version to 24 and add empty relativePath where missing
     new e996493  remove unused LOG variable
     new 45d1dbc  SLING-4901 osgi-mock: Add support for ComponentContext.getUsingBundle()
     new ec78cea  [maven-release-plugin] prepare release org.apache.sling.testing.osgi-mock-1.5.0
     new b693d17  [maven-release-plugin] prepare for next development iteration
     new 1e64d07  cosmetic: beautify error messages when setup/teardown fails
     new 2b257a4  SLING-5083 osgi-mock: Eliminate compile dependency to org.apache.felix.scr.annotations
     new ee4eeb2  SLING-5089 mock-osgi: Deactivate all services on shutdown
     new 3747fc7  SLING-5089 deactivate services in reverse order
     new 571dcdb  SLING-5090 osgi-mock: Support ServiceFactory
     new 29e4a32  SLING-5088 properly shutdown executor service in MockEventAdmin
     new a80c2f8  SLING-5088 deprecate activate/deactivate methods without bundleContext parameter because there is a small risk for memory leaks
     new 3e81888  cosmetic: fix javadoc errors
     new 07870d2  Update the main reactor to parent 25
     new 5f24bfb  [maven-release-plugin] prepare release org.apache.sling.testing.osgi-mock-1.6.0
     new b52bba4  [maven-release-plugin] prepare for next development iteration
     new 5bdecdf  SLING-5143 osgi-mock: MockBundleContext is not thread-safe when using iterators
     new 3c17662  SLING-5198 osgi-mock: Add basic ConfigurationAdmin support
     new 4aa8c55  [maven-release-plugin] prepare release org.apache.sling.testing.osgi-mock-1.7.0
     new d38d8c1  [maven-release-plugin] prepare for next development iteration
     new 505f211  SLING-5312 osgi-mock: Eliminate runtime-depenency to Felix SCR annotations
     new 9618e26  SLING-5323 Update to OSGi R6
     new 3f5a172  SLING-5324 osgi-mock: Support OSGi R6 field-based reference bindings
     new bf51720  SLING-5325 osgi-mock: Support target filtering on DS references
     new 5e0ac1d  SLING-5323 no need to update to JDK 1.7, we stick with JDK 1.6.
     new eb580c3  SLING-5327 refactor and unify lifecycle method handling (and fix missing argument variants for modified methods - should support the same as the activate method)
     new db27b68  SLING-5327 osgi-mock: Support OSGi R6 Component propert types for configuration
     new b29a918  SLING-5327 inline the required classes from org.apache.felix.scr
     new 5d2ecfe  SLING-5372 osgi-mock: MockBundleContext.getServices(Class,String) throws NPE when no services found
     new 4e489a6  [maven-release-plugin] prepare release org.apache.sling.testing.osgi-mock-2.0.0
     new 9c07ff3  [maven-release-plugin] prepare for next development iteration
     new b3f468c  SLING-5391 osgi-mock: Switch to osgi.core and osgi.cmpn dependencies
     new 2efd6e6  Switch to parent pom 26
     new 6759271  SLING-5453 implement MockBundleContext.getDataFile
     new 7d50f99  SLING-5453 implement MockBundleContext.getDataFile
     new c79ef61  SLING-5462 - demonstrate the wrong sorting of mock service references
     new 0e10e45  SLING-5462 ensure service references are sorted ascending by service ranking, not descending
     new fe2625e  SLING-5462 switch to comparable implementation from commons.osgi and change wrong assumptions in unit test
     new 09964b1  [maven-release-plugin] prepare release org.apache.sling.testing.osgi-mock-2.0.2
     new a8a4072  [maven-release-plugin] prepare for next development iteration
     new 8a090aa  SLING-5544 osgi-mock: Catch RejectedExecutionException in MockEventAdmin
     new 1c6b586  SLING-5667 MockBundleContext.getServiceReference(...) does not return service reference with highest ranking
     new b251609  [maven-release-plugin] prepare release org.apache.sling.testing.osgi-mock-2.0.4
     new eff1945  [maven-release-plugin] prepare for next development iteration
     new 4f1cc0f  SLING-5871 osgi-mock: Update to org.apache.felix.scr 2.0.4
     new 9e41f2c  SLING-5905 osgi-mock: Shade and relocate Sling and Felix Dependencies
     new 6b59209  cosmetic: fix typo in error message
     new 3171277  SLING-5905 some files from felix.framework where missing includes shaded source attachments
     new 9583f78  SLING-5970 mocks: Update to Parent Pom 28
     new a6a37d7  SLING-5970 switch to osgi annotations
     new c5195c6  add git ignore files for testing projects
     new 8ec500d  SLING-6051 osgi-mock: Support passing map/dictionary properties with object vararg parameter
     new 4dcc5a8  update dependencies
     new 423c717  [maven-release-plugin] prepare release org.apache.sling.testing.osgi-mock-2.1.0
     new 88c5214  [maven-release-plugin] copy for tag org.apache.sling.testing.osgi-mock-2.1.0

The 121 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-testing-osgi-mock] 11/12: [maven-release-plugin] prepare release org.apache.sling.testing.osgi-mock-2.1.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.testing.osgi-mock-2.1.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git

commit 423c717dbb1c151a70d8cd3ab65849b4f9e0add2
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Wed Sep 14 21:27:34 2016 +0000

    [maven-release-plugin] prepare release org.apache.sling.testing.osgi-mock-2.1.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/osgi-mock@1760776 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index cdff5e4..96d9b89 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,16 +28,16 @@
     </parent>
 
     <artifactId>org.apache.sling.testing.osgi-mock</artifactId>
-    <version>2.0.5-SNAPSHOT</version>
+    <version>2.1.0</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Testing OSGi Mock</name>
     <description>Mock implementation of selected OSGi APIs.</description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/mocks/osgi-mock</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/osgi-mock</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/testing/mocks/osgi-mock</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.osgi-mock-2.1.0</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.osgi-mock-2.1.0</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.testing.osgi-mock-2.1.0</url>
     </scm>
     
     <dependencies>

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

[sling-org-apache-sling-testing-osgi-mock] 04/12: cosmetic: fix typo in error message

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.testing.osgi-mock-2.1.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git

commit 6b59209d836b47d3a4c62d293924ac3844c6a393
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Thu Jul 28 11:16:00 2016 +0000

    cosmetic: fix typo in error message
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/osgi-mock@1754395 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/sling/testing/mock/osgi/OsgiMetadataUtil.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/testing/mock/osgi/OsgiMetadataUtil.java b/src/main/java/org/apache/sling/testing/mock/osgi/OsgiMetadataUtil.java
index c3ad237..3d5f3a9 100644
--- a/src/main/java/org/apache/sling/testing/mock/osgi/OsgiMetadataUtil.java
+++ b/src/main/java/org/apache/sling/testing/mock/osgi/OsgiMetadataUtil.java
@@ -414,7 +414,7 @@ final class OsgiMetadataUtil {
                 try {
                     this.targetFilter = new FilterImpl(this.target);
                 } catch (InvalidSyntaxException ex) {
-                    throw new RuntimeException("Invalid target filet in reference '" + this.name + "' of class " + clazz.getName(), ex);
+                    throw new RuntimeException("Invalid target filter in reference '" + this.name + "' of class " + clazz.getName(), ex);
                 }
             }
             else {

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

[sling-org-apache-sling-testing-osgi-mock] 06/12: SLING-5970 mocks: Update to Parent Pom 28

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.testing.osgi-mock-2.1.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git

commit 9583f78610aa52dc5c3d948582339e03b291d4a3
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Tue Aug 16 15:03:14 2016 +0000

    SLING-5970 mocks: Update to Parent Pom 28
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/osgi-mock@1756521 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index f9f4723..ede3650 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>26</version>
+        <version>28</version>
         <relativePath />
     </parent>
 
@@ -42,17 +42,14 @@
     
     <dependencies>
   
-        <!-- This version of OSGi mocks is targeted at OSGi R6. osgi-mocks 1.x is compatible with older versions. -->
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>osgi.core</artifactId>
-            <version>6.0.0</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>osgi.cmpn</artifactId>
-            <version>6.0.0</version>
             <scope>compile</scope>
         </dependency>
 
@@ -118,7 +115,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.logging-mock</artifactId>
-            <version>1.0.0</version>
+            <version>2.0.0-SNAPSHOT</version>
             <scope>test</scope>
         </dependency>
 

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

[sling-org-apache-sling-testing-osgi-mock] 03/12: SLING-5905 osgi-mock: Shade and relocate Sling and Felix Dependencies

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.testing.osgi-mock-2.1.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git

commit 9e41f2c068ffd1686f7897d0cbdf3f4c4e2d2d02
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Tue Jul 26 20:37:00 2016 +0000

    SLING-5905 osgi-mock: Shade and relocate Sling and Felix Dependencies
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/osgi-mock@1754175 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 112 +++++++++++++++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 83 insertions(+), 29 deletions(-)

diff --git a/pom.xml b/pom.xml
index ec4f891..e261538 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,27 +55,6 @@
             <version>6.0.0</version>
             <scope>compile</scope>
         </dependency>
-    
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.commons.osgi</artifactId>
-            <version>2.4.0</version>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.felix</groupId>
-            <artifactId>org.apache.felix.framework</artifactId>
-            <version>5.0.0</version>
-            <scope>compile</scope>
-        </dependency>
-        <!-- The required classes o.a.f.scr.impl.helper.Annotations and o.a.f.scr.impl.helper.Coercions are inlined -->
-        <dependency>
-            <groupId>org.apache.felix</groupId>
-            <artifactId>org.apache.felix.scr</artifactId>
-            <version>2.0.4</version>
-            <scope>provided</scope>
-        </dependency>
 
         <dependency>
             <groupId>com.google.guava</groupId>
@@ -103,6 +82,28 @@
             <scope>compile</scope>
         </dependency>
     
+        <!-- Artifact is shaded and inlined, only some classes included (see below) -->
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.commons.osgi</artifactId>
+            <version>2.4.0</version>
+            <scope>compile</scope>
+        </dependency>
+        <!-- Artifact is shaded and inlined, only some classes included (see below) -->
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.framework</artifactId>
+            <version>5.0.0</version>
+            <scope>compile</scope>
+        </dependency>
+        <!-- Artifact is shaded and inlined, only some classes included (see below) -->
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr</artifactId>
+            <version>2.0.4</version>
+            <scope>compile</scope>
+        </dependency>
+    
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-all</artifactId>
@@ -130,13 +131,6 @@
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
                 <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Embed-Dependency>
-                            org.apache.felix.scr;inline="org/apache/felix/scr/impl/inject/Annotations*|org/apache/felix/scr/impl/helper/Coercions*"
-                        </Embed-Dependency>
-                    </instructions>
-                </configuration>
             </plugin>
       
             <plugin>
@@ -152,10 +146,70 @@
                         <exclude>src/test/resources/META-INF/test.txt</exclude>
                         <exclude>src/test/resources/bundleData/nested/first.txt</exclude>
                         <exclude>src/test/resources/bundleData/nested/second.txt</exclude>
+                        <exclude>dependency-reduced-pom.xml</exclude>
                     </excludes>
                 </configuration>
             </plugin>
-    
+
+           <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <version>2.4.3</version>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <artifactSet>
+                                <includes>
+                                    <include>org.apache.sling:org.apache.sling.commons.osgi</include>
+                                    <include>org.apache.felix:org.apache.felix.framework</include>
+                                    <include>org.apache.felix:org.apache.felix.scr</include>
+                                </includes>
+                            </artifactSet>
+                            <relocations>
+                                <relocation>
+                                    <pattern>org.apache.sling.commons.osgi</pattern>
+                                    <shadedPattern>osgimock.org.apache.sling.commons.osgi</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.apache.felix.framework</pattern>
+                                    <shadedPattern>osgimock.org.apache.felix.framework</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.apache.felix.scr.impl</pattern>
+                                    <shadedPattern>osgimock.org.apache.felix.scr.impl</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <filters>
+                                <filter>
+                                    <artifact>org.apache.sling:org.apache.sling.commons.osgi</artifact>
+                                    <includes>
+                                        <include>org/apache/sling/commons/osgi/ServiceUtil*</include>
+                                        <include>org/apache/sling/commons/osgi/Order*</include>
+                                    </includes>
+                                </filter>
+                                <filter>
+                                    <artifact>org.apache.felix:org.apache.felix.framework</artifact>
+                                    <includes>
+                                        <include>org/apache/felix/framework/FilterImpl*</include>
+                                    </includes>
+                                </filter>
+                                <filter>
+                                    <artifact>org.apache.felix:org.apache.felix.scr</artifact>
+                                    <includes>
+                                        <include>org/apache/felix/scr/impl/inject/Annotations*</include>
+                                        <include>org/apache/felix/scr/impl/helper/Coercions*</include>
+                                    </includes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
         </plugins>
     </build>
     

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

[sling-org-apache-sling-testing-osgi-mock] 12/12: [maven-release-plugin] copy for tag org.apache.sling.testing.osgi-mock-2.1.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.testing.osgi-mock-2.1.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git

commit 88c5214511a9524790df29a7a29a57008e586432
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Wed Sep 14 21:27:47 2016 +0000

    [maven-release-plugin] copy for tag org.apache.sling.testing.osgi-mock-2.1.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.osgi-mock-2.1.0@1760777 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-testing-osgi-mock] 08/12: add git ignore files for testing projects

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.testing.osgi-mock-2.1.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git

commit c5195c64c39e3d53974c6f5be454a32e66b021fc
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Mon Sep 5 15:26:21 2016 +0000

    add git ignore files for testing projects
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/osgi-mock@1759304 13f79535-47bb-0310-9956-ffa450edef68
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2e73990
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+dependency-reduced-pom.xml
\ 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-testing-osgi-mock] 01/12: [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.testing.osgi-mock-2.1.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git

commit eff1945c41a161c35bcef86dae842812128a8f61
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Jun 10 12:13:26 2016 +0000

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

diff --git a/pom.xml b/pom.xml
index dcd1300..5ef04c3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,16 +28,16 @@
     </parent>
 
     <artifactId>org.apache.sling.testing.osgi-mock</artifactId>
-    <version>2.0.4</version>
+    <version>2.0.5-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Testing OSGi Mock</name>
     <description>Mock implementation of selected OSGi APIs.</description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.osgi-mock-2.0.4</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.osgi-mock-2.0.4</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.testing.osgi-mock-2.0.4</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/mocks/osgi-mock</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/osgi-mock</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/testing/mocks/osgi-mock</url>
     </scm>
     
     <dependencies>

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

[sling-org-apache-sling-testing-osgi-mock] 07/12: SLING-5970 switch to osgi annotations

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.testing.osgi-mock-2.1.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git

commit a6a37d73d475a5b6b6f4064df489712173ffe682
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Tue Aug 16 15:31:30 2016 +0000

    SLING-5970 switch to osgi annotations
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/osgi-mock@1756527 13f79535-47bb-0310-9956-ffa450edef68
---
 .../org/apache/sling/testing/mock/osgi/context/OsgiContextImpl.java    | 3 +--
 .../java/org/apache/sling/testing/mock/osgi/context/package-info.java  | 2 +-
 .../java/org/apache/sling/testing/mock/osgi/junit/package-info.java    | 2 +-
 src/main/java/org/apache/sling/testing/mock/osgi/package-info.java     | 2 +-
 4 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImpl.java b/src/main/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImpl.java
index 4847a2d..5953fef 100644
--- a/src/main/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImpl.java
+++ b/src/main/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImpl.java
@@ -26,13 +26,12 @@ import java.util.Map;
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.sling.testing.mock.osgi.MockEventAdmin;
 import org.apache.sling.testing.mock.osgi.MockOsgi;
+import org.osgi.annotation.versioning.ConsumerType;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.component.ComponentContext;
 
-import aQute.bnd.annotation.ConsumerType;
-
 /**
  * Defines OSGi context objects and helper methods. Should not be used directly
  * but via the {@link org.apache.sling.testing.mock.osgi.junit.OsgiContext} JUnit rule.
diff --git a/src/main/java/org/apache/sling/testing/mock/osgi/context/package-info.java b/src/main/java/org/apache/sling/testing/mock/osgi/context/package-info.java
index 1ac49a4..c51be33 100644
--- a/src/main/java/org/apache/sling/testing/mock/osgi/context/package-info.java
+++ b/src/main/java/org/apache/sling/testing/mock/osgi/context/package-info.java
@@ -19,5 +19,5 @@
 /**
  * OSGi context implementation for unit tests.
  */
-@aQute.bnd.annotation.Version("1.0")
+@org.osgi.annotation.versioning.Version("1.0.1")
 package org.apache.sling.testing.mock.osgi.context;
diff --git a/src/main/java/org/apache/sling/testing/mock/osgi/junit/package-info.java b/src/main/java/org/apache/sling/testing/mock/osgi/junit/package-info.java
index dd18eb6..b055517 100644
--- a/src/main/java/org/apache/sling/testing/mock/osgi/junit/package-info.java
+++ b/src/main/java/org/apache/sling/testing/mock/osgi/junit/package-info.java
@@ -19,5 +19,5 @@
 /**
  * Rule for providing easy access to OSGi context in JUnit tests.
  */
-@aQute.bnd.annotation.Version("1.0")
+@org.osgi.annotation.versioning.Version("1.0")
 package org.apache.sling.testing.mock.osgi.junit;
diff --git a/src/main/java/org/apache/sling/testing/mock/osgi/package-info.java b/src/main/java/org/apache/sling/testing/mock/osgi/package-info.java
index f15b6d0..69c2fa1 100644
--- a/src/main/java/org/apache/sling/testing/mock/osgi/package-info.java
+++ b/src/main/java/org/apache/sling/testing/mock/osgi/package-info.java
@@ -19,5 +19,5 @@
 /**
  * Mock implementation of selected OSGi APIs.
  */
-@aQute.bnd.annotation.Version("3.0")
+@org.osgi.annotation.versioning.Version("3.0")
 package org.apache.sling.testing.mock.osgi;

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

[sling-org-apache-sling-testing-osgi-mock] 02/12: SLING-5871 osgi-mock: Update to org.apache.felix.scr 2.0.4

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.testing.osgi-mock-2.1.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git

commit 4f1cc0f023ecfb725649d9c78a698e1aaad5e3fe
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Tue Jul 19 19:24:11 2016 +0000

    SLING-5871 osgi-mock: Update to org.apache.felix.scr 2.0.4
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/osgi-mock@1753418 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                                               | 4 ++--
 src/main/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtil.java | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 5ef04c3..ec4f891 100644
--- a/pom.xml
+++ b/pom.xml
@@ -73,7 +73,7 @@
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.scr</artifactId>
-            <version>2.0.2</version>
+            <version>2.0.4</version>
             <scope>provided</scope>
         </dependency>
 
@@ -133,7 +133,7 @@
                 <configuration>
                     <instructions>
                         <Embed-Dependency>
-                            org.apache.felix.scr;inline="org/apache/felix/scr/impl/helper/Annotations*|org/apache/felix/scr/impl/helper/Coercions*"
+                            org.apache.felix.scr;inline="org/apache/felix/scr/impl/inject/Annotations*|org/apache/felix/scr/impl/helper/Coercions*"
                         </Embed-Dependency>
                     </instructions>
                 </configuration>
diff --git a/src/main/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtil.java b/src/main/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtil.java
index 3ba8ad4..9a4dafb 100644
--- a/src/main/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtil.java
+++ b/src/main/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtil.java
@@ -30,7 +30,7 @@ import java.util.Map;
 import java.util.SortedSet;
 
 import org.apache.commons.lang3.StringUtils;
-import org.apache.felix.scr.impl.helper.Annotations;
+import org.apache.felix.scr.impl.inject.Annotations;
 import org.apache.sling.testing.mock.osgi.OsgiMetadataUtil.FieldCollectionType;
 import org.apache.sling.testing.mock.osgi.OsgiMetadataUtil.OsgiMetadata;
 import org.apache.sling.testing.mock.osgi.OsgiMetadataUtil.Reference;

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

[sling-org-apache-sling-testing-osgi-mock] 10/12: update dependencies

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.testing.osgi-mock-2.1.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git

commit 4dcc5a8885d090c81d462c628d960ffefdb20d5a
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Wed Sep 14 21:27:05 2016 +0000

    update dependencies
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/osgi-mock@1760775 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index ede3650..cdff5e4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -115,7 +115,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.logging-mock</artifactId>
-            <version>2.0.0-SNAPSHOT</version>
+            <version>2.0.0</version>
             <scope>test</scope>
         </dependency>
 

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

[sling-org-apache-sling-testing-osgi-mock] 05/12: SLING-5905 some files from felix.framework where missing includes shaded source attachments

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.testing.osgi-mock-2.1.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git

commit 317127770a835bb783ca05e1d90892591d048849
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Thu Jul 28 11:30:55 2016 +0000

    SLING-5905 some files from felix.framework where missing
    includes shaded source attachments
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/osgi-mock@1754400 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index e261538..f9f4723 100644
--- a/pom.xml
+++ b/pom.xml
@@ -162,6 +162,8 @@
                             <goal>shade</goal>
                         </goals>
                         <configuration>
+                            <createSourcesJar>true</createSourcesJar>
+                            <shadeSourcesContent>true</shadeSourcesContent>
                             <artifactSet>
                                 <includes>
                                     <include>org.apache.sling:org.apache.sling.commons.osgi</include>
@@ -194,7 +196,7 @@
                                 <filter>
                                     <artifact>org.apache.felix:org.apache.felix.framework</artifact>
                                     <includes>
-                                        <include>org/apache/felix/framework/FilterImpl*</include>
+                                        <include>org/apache/felix/framework/**</include>
                                     </includes>
                                 </filter>
                                 <filter>

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

[sling-org-apache-sling-testing-osgi-mock] 09/12: SLING-6051 osgi-mock: Support passing map/dictionary properties with object vararg parameter

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.testing.osgi-mock-2.1.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git

commit 8ec500da8cb1d3cc5b30914f13c1ac4ee5696df8
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Tue Sep 13 09:30:53 2016 +0000

    SLING-6051 osgi-mock: Support passing map/dictionary properties with object vararg parameter
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/osgi-mock@1760503 13f79535-47bb-0310-9956-ffa450edef68
---
 .../testing/mock/osgi/ComponentContextBuilder.java |  5 ++
 .../mock/osgi/{MapUtil.java => MapMergeUtil.java}  | 45 +++++------
 .../apache/sling/testing/mock/osgi/MapUtil.java    | 94 +++++++++++-----------
 .../sling/testing/mock/osgi/MockBundleContext.java |  2 +-
 .../apache/sling/testing/mock/osgi/MockOsgi.java   | 56 ++++++++++++-
 .../testing/mock/osgi/context/OsgiContextImpl.java | 31 ++++++-
 .../testing/mock/osgi/context/package-info.java    |  2 +-
 .../testing/mock/osgi/junit/package-info.java      |  2 +-
 .../sling/testing/mock/osgi/package-info.java      |  2 +-
 .../sling/testing/mock/osgi/MapUtilTest.java       | 57 +++++++++++++
 .../OsgiServiceUtilActivateDeactivateTest.java     |  2 +-
 .../testing/mock/osgi/OsgiServiceUtilTest.java     |  3 +
 .../mock/osgi/context/OsgiContextImplTest.java     | 19 +++++
 13 files changed, 236 insertions(+), 84 deletions(-)

diff --git a/src/main/java/org/apache/sling/testing/mock/osgi/ComponentContextBuilder.java b/src/main/java/org/apache/sling/testing/mock/osgi/ComponentContextBuilder.java
index 2e8916a..a87ed41 100644
--- a/src/main/java/org/apache/sling/testing/mock/osgi/ComponentContextBuilder.java
+++ b/src/main/java/org/apache/sling/testing/mock/osgi/ComponentContextBuilder.java
@@ -54,6 +54,11 @@ public final class ComponentContextBuilder {
         return this;
     }
         
+    public ComponentContextBuilder properties(Object... properties) {
+        this.properties = MapUtil.toDictionary(properties);
+        return this;
+    }
+        
     public ComponentContextBuilder usingBundle(Bundle usingBundle) {
         this.usingBundle = usingBundle;
         return this;
diff --git a/src/main/java/org/apache/sling/testing/mock/osgi/MapUtil.java b/src/main/java/org/apache/sling/testing/mock/osgi/MapMergeUtil.java
similarity index 78%
copy from src/main/java/org/apache/sling/testing/mock/osgi/MapUtil.java
copy to src/main/java/org/apache/sling/testing/mock/osgi/MapMergeUtil.java
index e53442b..246ecc5 100644
--- a/src/main/java/org/apache/sling/testing/mock/osgi/MapUtil.java
+++ b/src/main/java/org/apache/sling/testing/mock/osgi/MapMergeUtil.java
@@ -18,11 +18,12 @@
  */
 package org.apache.sling.testing.mock.osgi;
 
+import static org.apache.sling.testing.mock.osgi.MapUtil.toDictionary;
+import static org.apache.sling.testing.mock.osgi.MapUtil.toMap;
+
 import java.io.IOException;
 import java.util.Dictionary;
-import java.util.Enumeration;
 import java.util.HashMap;
-import java.util.Hashtable;
 import java.util.Map;
 
 import org.apache.sling.testing.mock.osgi.OsgiMetadataUtil.OsgiMetadata;
@@ -31,31 +32,25 @@ import org.osgi.service.cm.Configuration;
 import org.osgi.service.cm.ConfigurationAdmin;
 
 /**
- * Map util methods.
+ * Map util merge methods.
  */
-final class MapUtil {
+final class MapMergeUtil {
 
-    public static <T, U> Dictionary<T, U> toDictionary(Map<T, U> map) {
-        if (map == null) {
-            return null;
-        }
-        return new Hashtable<T, U>(map);
+    private MapMergeUtil() {
+        // static methods only
     }
-
-    public static <T, U> Map<T, U> toMap(Dictionary<T, U> dictionary) {
-        if (dictionary == null) {
-            return null;
-        }
-        Map<T, U> map = new HashMap<T, U>();
-        Enumeration<T> keys = dictionary.keys();
-        while (keys.hasMoreElements()) {
-            T key = keys.nextElement();
-            map.put(key, dictionary.get(key));
-        }
-        return map;
-    }
-
-    public static Dictionary<String, Object> propertiesMergeWithOsgiMetadata(Object target, 
+    
+    /**
+     * Merge service properties from three sources (with this precedence):
+     * 1. Properties defined in calling unit test code
+     * 2. Properties from ConfigurationAdmin
+     * 3. Properties from OSGi SCR metadata
+     * @param target Target service
+     * @param configAdmin Configuration admin or null if none is registered
+     * @param properties Properties from unit test code or null if none where passed
+     * @return Merged properties
+     */
+    static Dictionary<String, Object> propertiesMergeWithOsgiMetadata(Object target, 
             ConfigurationAdmin configAdmin, 
             Dictionary<String, Object> properties) {
         return toDictionary(propertiesMergeWithOsgiMetadata(target, configAdmin, toMap(properties)));
@@ -71,7 +66,7 @@ final class MapUtil {
      * @param properties Properties from unit test code or null if none where passed
      * @return Merged properties
      */
-    public static Map<String, Object> propertiesMergeWithOsgiMetadata(Object target,
+    static Map<String, Object> propertiesMergeWithOsgiMetadata(Object target,
             ConfigurationAdmin configAdmin,
             Map<String, Object> properties) {
         Map<String, Object> mergedProperties = new HashMap<String, Object>();
diff --git a/src/main/java/org/apache/sling/testing/mock/osgi/MapUtil.java b/src/main/java/org/apache/sling/testing/mock/osgi/MapUtil.java
index e53442b..c596fed 100644
--- a/src/main/java/org/apache/sling/testing/mock/osgi/MapUtil.java
+++ b/src/main/java/org/apache/sling/testing/mock/osgi/MapUtil.java
@@ -18,23 +18,28 @@
  */
 package org.apache.sling.testing.mock.osgi;
 
-import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collections;
 import java.util.Dictionary;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Map;
 
-import org.apache.sling.testing.mock.osgi.OsgiMetadataUtil.OsgiMetadata;
-import org.osgi.framework.Constants;
-import org.osgi.service.cm.Configuration;
-import org.osgi.service.cm.ConfigurationAdmin;
-
 /**
  * Map util methods.
  */
-final class MapUtil {
+public final class MapUtil {
+    
+    private MapUtil() {
+        // static methods only
+    }
 
+    /**
+     * Convert map to dictionary.
+     * @param map Map
+     * @return Dictionary
+     */
     public static <T, U> Dictionary<T, U> toDictionary(Map<T, U> map) {
         if (map == null) {
             return null;
@@ -42,6 +47,11 @@ final class MapUtil {
         return new Hashtable<T, U>(map);
     }
 
+    /**
+     * Convert Dictionary to map
+     * @param dictionary Dictionary
+     * @return Map
+     */
     public static <T, U> Map<T, U> toMap(Dictionary<T, U> dictionary) {
         if (dictionary == null) {
             return null;
@@ -55,55 +65,41 @@ final class MapUtil {
         return map;
     }
 
-    public static Dictionary<String, Object> propertiesMergeWithOsgiMetadata(Object target, 
-            ConfigurationAdmin configAdmin, 
-            Dictionary<String, Object> properties) {
-        return toDictionary(propertiesMergeWithOsgiMetadata(target, configAdmin, toMap(properties)));
+    /**
+     * Convert key/value pairs to dictionary
+     * @param args Key/value pairs
+     * @return Dictionary
+     */
+    public static Dictionary<String, Object> toDictionary(Object... args) {
+        return toDictionary(toMap(args));
     }
     
     /**
-     * Merge service properties from three sources (with this precedence):
-     * 1. Properties defined in calling unit test code
-     * 2. Properties from ConfigurationAdmin
-     * 3. Properties from OSGi SCR metadata
-     * @param target Target service
-     * @param configAdmin Configuration admin or null if none is registered
-     * @param properties Properties from unit test code or null if none where passed
-     * @return Merged properties
+     * Convert key/value pairs to map
+     * @param args Key/value pairs
+     * @return Map
      */
-    public static Map<String, Object> propertiesMergeWithOsgiMetadata(Object target,
-            ConfigurationAdmin configAdmin,
-            Map<String, Object> properties) {
-        Map<String, Object> mergedProperties = new HashMap<String, Object>();
-        
-        OsgiMetadata metadata = OsgiMetadataUtil.getMetadata(target.getClass());
-        if (metadata != null) {
-            Map<String,Object> metadataProperties = metadata.getProperties();
-            if (metadataProperties != null) {
-                mergedProperties.putAll(metadataProperties);
-
-                // merge with configuration from config admin
-                if (configAdmin != null) {
-                    Object pid = metadataProperties.get(Constants.SERVICE_PID);
-                    if (pid != null) {
-                        try {
-                            Configuration config = configAdmin.getConfiguration(pid.toString());
-                            mergedProperties.putAll(toMap(config.getProperties()));
-                        }
-                        catch (IOException ex) {
-                            throw new RuntimeException("Unable to read config for pid " + pid, ex);
-                        }
-                    }
-                }
+    @SuppressWarnings("unchecked")
+    public static Map<String, Object> toMap(Object... args) {
+        if (args == null || args.length == 0) {
+            return Collections.emptyMap();
+        }
+        if (args.length == 1) {
+            if (args[0] instanceof Map) {
+                return (Map)args[0];
+            }
+            else if (args[0] instanceof Dictionary) {
+                return toMap((Dictionary)args[0]);
             }
         }
-        
-        // merge with properties from calling unit test code
-        if (properties != null) {
-            mergedProperties.putAll(properties);
+        if (args.length % 2 != 0) {
+            throw new IllegalArgumentException("args must be an even number of name/values:" + Arrays.asList(args));
+        }
+        final Map<String, Object> result = new HashMap<>();
+        for (int i=0 ; i < args.length; i+=2) {
+            result.put(args[i].toString(), args[i+1]);
         }
-        
-        return mergedProperties;
+        return result;
     }
     
 }
diff --git a/src/main/java/org/apache/sling/testing/mock/osgi/MockBundleContext.java b/src/main/java/org/apache/sling/testing/mock/osgi/MockBundleContext.java
index 827ef43..c57dcc6 100644
--- a/src/main/java/org/apache/sling/testing/mock/osgi/MockBundleContext.java
+++ b/src/main/java/org/apache/sling/testing/mock/osgi/MockBundleContext.java
@@ -112,7 +112,7 @@ class MockBundleContext implements BundleContext {
     @SuppressWarnings("unchecked")
     @Override
     public ServiceRegistration registerService(final String[] clazzes, final Object service, final Dictionary properties) {
-        Dictionary<String, Object> mergedPropertes = MapUtil.propertiesMergeWithOsgiMetadata(service, configAdmin, properties);
+        Dictionary<String, Object> mergedPropertes = MapMergeUtil.propertiesMergeWithOsgiMetadata(service, configAdmin, properties);
         MockServiceRegistration registration = new MockServiceRegistration(this.bundle, clazzes, service, mergedPropertes, this);
         handleRefsUpdateOnRegister(registration);
         this.registeredServices.add(registration);
diff --git a/src/main/java/org/apache/sling/testing/mock/osgi/MockOsgi.java b/src/main/java/org/apache/sling/testing/mock/osgi/MockOsgi.java
index 4834647..a4e9923 100644
--- a/src/main/java/org/apache/sling/testing/mock/osgi/MockOsgi.java
+++ b/src/main/java/org/apache/sling/testing/mock/osgi/MockOsgi.java
@@ -18,7 +18,7 @@
  */
 package org.apache.sling.testing.mock.osgi;
 
-import static org.apache.sling.testing.mock.osgi.MapUtil.propertiesMergeWithOsgiMetadata;
+import static org.apache.sling.testing.mock.osgi.MapMergeUtil.propertiesMergeWithOsgiMetadata;
 import static org.apache.sling.testing.mock.osgi.MapUtil.toDictionary;
 import static org.apache.sling.testing.mock.osgi.MapUtil.toMap;
 
@@ -82,6 +82,14 @@ public final class MockOsgi {
     }
 
     /**
+     * @param properties Properties
+     * @return Mocked {@link ComponentContext} instance
+     */
+    public static ComponentContext newComponentContext(Object... properties) {
+        return componentContext().properties(properties).build();
+    }
+
+    /**
      * @param bundleContext Bundle context
      * @param properties Properties
      * @return Mocked {@link ComponentContext} instance
@@ -96,7 +104,18 @@ public final class MockOsgi {
      * @param properties Properties
      * @return Mocked {@link ComponentContext} instance
      */
-    public static ComponentContext newComponentContext(BundleContext bundleContext, Map<String, Object> properties) {
+    public static ComponentContext newComponentContext(BundleContext bundleContext,
+            Map<String, Object> properties) {
+        return componentContext().bundleContext(bundleContext).properties(properties).build();
+    }
+
+    /**
+     * @param bundleContext Bundle context
+     * @param properties Properties
+     * @return Mocked {@link ComponentContext} instance
+     */
+    public static ComponentContext newComponentContext(BundleContext bundleContext,
+            Object... properties) {
         return componentContext().bundleContext(bundleContext).properties(properties).build();
     }
 
@@ -162,6 +181,17 @@ public final class MockOsgi {
     }
 
     /**
+     * Simulate activation of service instance. Invokes the @Activate annotated method.
+     * @param target Service instance.
+     * @param bundleContext Bundle context
+     * @param properties Properties
+     * @return true if activation method was called. False if no activate method is defined.
+     */
+    public static boolean activate(Object target, BundleContext bundleContext, Object... properties) {
+        return activate(target, bundleContext, toDictionary(properties));
+    }
+
+    /**
      * Simulate deactivation of service instance. Invokes the @Deactivate annotated method.
      * @param target Service instance.
      * @param bundleContext Bundle context.
@@ -196,6 +226,17 @@ public final class MockOsgi {
     }
 
     /**
+     * Simulate activation of service instance. Invokes the @Deactivate annotated method.
+     * @param target Service instance.
+     * @param bundleContext Bundle context
+     * @param properties Properties
+     * @return true if deactivation method was called. False if no deactivate method is defined.
+     */
+    public static boolean deactivate(Object target, BundleContext bundleContext, Object... properties) {
+        return deactivate(target, bundleContext, toDictionary(properties));
+    }
+
+    /**
      * Simulate configuration modification of service instance. Invokes the @Modified annotated method.
      * @param target Service instance.
      * @param bundleContext Bundle context
@@ -220,6 +261,17 @@ public final class MockOsgi {
     }
     
     /**
+     * Simulate configuration modification of service instance. Invokes the @Modified annotated method.
+     * @param target Service instance.
+     * @param bundleContext Bundle context
+     * @param properties Properties
+     * @return true if modified method was called. False if no modified method is defined.
+     */
+    public static boolean modified(Object target, BundleContext bundleContext, Object... properties) {
+        return modified(target, bundleContext, toDictionary(properties));
+    }
+    
+    /**
      * Deactivates all bundles registered in the mocked bundle context.
      * @param bundleContext Bundle context
      */
diff --git a/src/main/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImpl.java b/src/main/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImpl.java
index 5953fef..63b4b41 100644
--- a/src/main/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImpl.java
+++ b/src/main/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImpl.java
@@ -24,6 +24,7 @@ import java.util.Hashtable;
 import java.util.Map;
 
 import org.apache.commons.lang3.ArrayUtils;
+import org.apache.sling.testing.mock.osgi.MapUtil;
 import org.apache.sling.testing.mock.osgi.MockEventAdmin;
 import org.apache.sling.testing.mock.osgi.MockOsgi;
 import org.osgi.annotation.versioning.ConsumerType;
@@ -91,7 +92,7 @@ public class OsgiContextImpl {
      * @return Registered service instance
      */
     public final <T> T registerService(final T service) {
-        return registerService(null, service, null);
+        return registerService(null, service, (Map<String,Object>)null);
     }
 
     /**
@@ -102,7 +103,7 @@ public class OsgiContextImpl {
      * @return Registered service instance
      */
     public final <T> T registerService(final Class<T> serviceClass, final T service) {
-        return registerService(serviceClass, service, null);
+        return registerService(serviceClass, service, (Map<String,Object>)null);
     }
 
     /**
@@ -123,6 +124,18 @@ public class OsgiContextImpl {
     }
 
     /**
+     * Registers a service in the mocked OSGi environment.
+     * @param <T> Service type
+     * @param serviceClass Service class
+     * @param service Service instance
+     * @param properties Service properties (optional)
+     * @return Registered service instance
+     */
+    public final <T> T registerService(final Class<T> serviceClass, final T service, final Object... properties) {
+        return registerService(serviceClass, service, MapUtil.toMap(properties));
+    }
+    
+    /**
      * Injects dependencies, activates and registers a service in the mocked
      * OSGi environment.
      * @param <T> Service type
@@ -130,7 +143,7 @@ public class OsgiContextImpl {
      * @return Registered service instance
      */
     public final <T> T registerInjectActivateService(final T service) {
-        return registerInjectActivateService(service, null);
+        return registerInjectActivateService(service, (Map<String,Object>)null);
     }
 
     /**
@@ -149,6 +162,18 @@ public class OsgiContextImpl {
     }
 
     /**
+     * Injects dependencies, activates and registers a service in the mocked
+     * OSGi environment.
+     * @param <T> Service type
+     * @param service Service instance
+     * @param properties Service properties (optional)
+     * @return Registered service instance
+     */
+    public final <T> T registerInjectActivateService(final T service, final Object... properties) {
+        return registerInjectActivateService(service, MapUtil.toMap(properties));
+    }
+
+    /**
      * Lookup a single service
      * @param <ServiceType> Service type
      * @param serviceType The type (interface) of the service.
diff --git a/src/main/java/org/apache/sling/testing/mock/osgi/context/package-info.java b/src/main/java/org/apache/sling/testing/mock/osgi/context/package-info.java
index c51be33..c54910f 100644
--- a/src/main/java/org/apache/sling/testing/mock/osgi/context/package-info.java
+++ b/src/main/java/org/apache/sling/testing/mock/osgi/context/package-info.java
@@ -19,5 +19,5 @@
 /**
  * OSGi context implementation for unit tests.
  */
-@org.osgi.annotation.versioning.Version("1.0.1")
+@org.osgi.annotation.versioning.Version("1.1")
 package org.apache.sling.testing.mock.osgi.context;
diff --git a/src/main/java/org/apache/sling/testing/mock/osgi/junit/package-info.java b/src/main/java/org/apache/sling/testing/mock/osgi/junit/package-info.java
index b055517..eeb2980 100644
--- a/src/main/java/org/apache/sling/testing/mock/osgi/junit/package-info.java
+++ b/src/main/java/org/apache/sling/testing/mock/osgi/junit/package-info.java
@@ -19,5 +19,5 @@
 /**
  * Rule for providing easy access to OSGi context in JUnit tests.
  */
-@org.osgi.annotation.versioning.Version("1.0")
+@org.osgi.annotation.versioning.Version("1.1")
 package org.apache.sling.testing.mock.osgi.junit;
diff --git a/src/main/java/org/apache/sling/testing/mock/osgi/package-info.java b/src/main/java/org/apache/sling/testing/mock/osgi/package-info.java
index 69c2fa1..b0f0eaf 100644
--- a/src/main/java/org/apache/sling/testing/mock/osgi/package-info.java
+++ b/src/main/java/org/apache/sling/testing/mock/osgi/package-info.java
@@ -19,5 +19,5 @@
 /**
  * Mock implementation of selected OSGi APIs.
  */
-@org.osgi.annotation.versioning.Version("3.0")
+@org.osgi.annotation.versioning.Version("3.1")
 package org.apache.sling.testing.mock.osgi;
diff --git a/src/test/java/org/apache/sling/testing/mock/osgi/MapUtilTest.java b/src/test/java/org/apache/sling/testing/mock/osgi/MapUtilTest.java
new file mode 100644
index 0000000..369abdf
--- /dev/null
+++ b/src/test/java/org/apache/sling/testing/mock/osgi/MapUtilTest.java
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+package org.apache.sling.testing.mock.osgi;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Dictionary;
+import java.util.Map;
+
+import org.junit.Test;
+
+import com.google.common.collect.ImmutableMap;
+
+public class MapUtilTest {
+
+    @Test
+    public void testMapDictionary() {
+        Map<String,Object> map = ImmutableMap.<String, Object>of("param1", "var1", "param2", 123, "param3", true);
+        
+        Dictionary<String, Object> dict = MapUtil.toDictionary(map);
+        Map<String,Object> convertedMap = MapUtil.toMap(dict);
+        
+        assertEquals(map, convertedMap);
+    }
+    
+    @Test
+    public void testMapObjectVarargs() {
+        Map<String, Object> convertedMap = MapUtil.toMap("param1", "var1", "param2", 123, "param3", true);
+        
+        assertEquals(ImmutableMap.<String, Object>of("param1", "var1", "param2", 123, "param3", true), convertedMap);
+    }
+    
+    @Test
+    public void testDictionaryObjectVarargs() {
+        Dictionary<String, Object> dict = MapUtil.toDictionary("param1", "var1", "param2", 123, "param3", true);
+        Map<String,Object> convertedMap = MapUtil.toMap(dict);
+        
+        assertEquals(ImmutableMap.<String, Object>of("param1", "var1", "param2", 123, "param3", true), convertedMap);
+    }
+    
+}
diff --git a/src/test/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtilActivateDeactivateTest.java b/src/test/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtilActivateDeactivateTest.java
index 6974c01..6139710 100644
--- a/src/test/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtilActivateDeactivateTest.java
+++ b/src/test/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtilActivateDeactivateTest.java
@@ -58,7 +58,7 @@ public class OsgiServiceUtilActivateDeactivateTest {
     public void testService2() {
         Service2 service = new Service2();
         
-        assertTrue(MockOsgi.activate(service, bundleContext, map));
+        assertTrue(MockOsgi.activate(service, bundleContext, "prop1", "value1"));
         assertTrue(service.isActivated());
         assertSame(bundleContext, service.getBundleContext());
         
diff --git a/src/test/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtilTest.java b/src/test/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtilTest.java
index 8d086ad..26e6bba 100644
--- a/src/test/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtilTest.java
+++ b/src/test/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtilTest.java
@@ -121,6 +121,9 @@ public class OsgiServiceUtilTest {
         Dictionary<String,Object> newPropertiesDictonary = new Hashtable<String,Object>(newProperties);
         MockOsgi.modified(service3, bundleContext, newPropertiesDictonary);
         assertEquals(newProperties.get("prop3"), service3.getConfig().get("prop3"));
+
+        MockOsgi.modified(service3, bundleContext, "prop3", "value4");
+        assertEquals("value4", service3.getConfig().get("prop3"));
     }
 
     @Test
diff --git a/src/test/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImplTest.java b/src/test/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImplTest.java
index 1977258..65b7251 100644
--- a/src/test/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImplTest.java
+++ b/src/test/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImplTest.java
@@ -82,6 +82,17 @@ public class OsgiContextImplTest {
     }
 
     @Test
+    public void testRegisterServiceWithPropertiesVarargs() {
+        Set<String> myService = new HashSet<String>();
+        context.registerService(Set.class, myService, "prop1", "value1");
+
+        ServiceReference<?> serviceReference = context.bundleContext().getServiceReference(Set.class.getName());
+        Object serviceResult = context.bundleContext().getService(serviceReference);
+        assertSame(myService, serviceResult);
+        assertEquals("value1", serviceReference.getProperty("prop1"));
+    }
+
+    @Test
     public void testRegisterMultipleServices() {
         Set<String> myService1 = new HashSet<String>();
         context.registerService(Set.class, myService1);
@@ -103,6 +114,14 @@ public class OsgiContextImplTest {
         context.registerInjectActivateService(new OsgiServiceUtilTest.Service3());
     }
 
+    @Test
+    public void testRegisterInjectActivateWithProperties() {
+        context.registerService(ServiceInterface1.class, mock(ServiceInterface1.class));
+        context.registerService(ServiceInterface2.class, mock(ServiceInterface2.class));
+        OsgiServiceUtilTest.Service3 service = context.registerInjectActivateService(new OsgiServiceUtilTest.Service3(), "prop1", "value3");
+        assertEquals("value3", service.getConfig().get("prop1"));
+    }
+
     @Test(expected=RuntimeException.class)
     public void testRegisterInjectActivate_RefrenceMissing() {
         context.registerInjectActivateService(new OsgiServiceUtilTest.Service3());

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