From afa2f643790ffaa3f43b2df9160d830d2432092d Mon Sep 17 00:00:00 2001 From: costin_leau Date: Fri, 18 Jan 2008 19:11:24 +0000 Subject: [PATCH 01/53] 1.0.x branch --- annotation/pom.xml | 2 +- bundle-archetype/pom.xml | 2 +- changelog.txt | 3 +++ core/.classpath | 2 +- core/pom.xml | 2 +- docs/pom.xml | 2 +- .../docbkx/appendix/appendix-compendium.xml | 6 +++--- docs/src/docbkx/reference/service-registry.xml | 8 ++++---- extender/pom.xml | 2 +- .../.classpath | 2 +- .../annotation.dependency.test.bundle/pom.xml | 2 +- .../bundles/annotation.test.bundle/.classpath | 2 +- .../bundles/annotation.test.bundle/pom.xml | 2 +- .../bundles/cardinality.0to1.bundle/pom.xml | 2 +- .../config.bundle/async.nowait.bundle/pom.xml | 2 +- .../config.bundle/async.wait.bundle/pom.xml | 2 +- .../config.bundle/no.publish.bundle/pom.xml | 2 +- .../bundles/config.bundle/pom.xml | 2 +- .../config.bundle/sync.nowait.bundle/pom.xml | 2 +- .../config.bundle/sync.tail.bundle/pom.xml | 2 +- .../config.bundle/sync.wait.bundle/pom.xml | 2 +- .../config.file.with.dots.bundle/pom.xml | 2 +- .../bundles/configuration.test.bundle/pom.xml | 2 +- .../bundles/deadlock.bundle/pom.xml | 2 +- .../bundles/dependency.factory.bundle/pom.xml | 2 +- .../bundles/dependency.test.bundle/pom.xml | 2 +- integration-tests/bundles/error.bundle/pom.xml | 2 +- .../bundles/extender.version.bundle/pom.xml | 2 +- .../bundles/io.fragment.1.bundle/pom.xml | 2 +- .../bundles/io.fragment.2.bundle/pom.xml | 2 +- .../bundles/lifecycle.test.bundle/pom.xml | 2 +- integration-tests/bundles/pom.xml | 2 +- .../bundles/reference.test.bundle/pom.xml | 2 +- .../bundles/scoped.a.bundle/pom.xml | 2 +- .../bundles/scoped.b.bundle/pom.xml | 2 +- .../bundles/scoped.common.bundle/pom.xml | 2 +- .../bundles/service.listener.bundle/pom.xml | 2 +- .../bundles/simple.service.2.bundle/pom.xml | 2 +- .../bundles/simple.service.3.bundle/pom.xml | 2 +- .../simple.service.bundle.2.identical/pom.xml | 2 +- .../simple.service.bundle.identical/pom.xml | 2 +- .../bundles/simple.service.bundle/pom.xml | 2 +- integration-tests/bundles/tccl.bundle/pom.xml | 2 +- .../bundles/trivial.bundle/pom.xml | 2 +- .../bundles/trivial.test.bundle/pom.xml | 2 +- integration-tests/pom.xml | 2 +- integration-tests/tests-tiger/.classpath | 8 ++++---- integration-tests/tests-tiger/pom.xml | 2 +- integration-tests/tests/.classpath | 18 +++++++++--------- integration-tests/tests/pom.xml | 2 +- io/.classpath | 2 +- io/pom.xml | 2 +- mock/pom.xml | 2 +- pom.xml | 2 +- release/pom.xml | 2 +- .../petclinic.sample.contract/pom.xml | 4 ++-- .../petclinic/petclinic.sample.hsqldb/pom.xml | 4 ++-- .../petclinic/petclinic.sample.jdbc/pom.xml | 4 ++-- .../petclinic/petclinic.sample.mysql/pom.xml | 4 ++-- samples/petclinic/pom.xml | 2 +- samples/pom.xml | 2 +- samples/simple-service/pom.xml | 2 +- .../simple-service-bundle/pom.xml | 2 +- .../simple-service-integration-test/pom.xml | 2 +- samples/weather/pom.xml | 2 +- samples/weather/weather-dao/pom.xml | 2 +- samples/weather/weather-extension/pom.xml | 2 +- .../.classpath | 2 +- .../weather-service-integration-test/pom.xml | 2 +- samples/weather/weather-service-test/pom.xml | 2 +- samples/weather/weather-service/pom.xml | 2 +- samples/weather/wiring-bundle/.classpath | 4 ++-- samples/weather/wiring-bundle/pom.xml | 2 +- test-support/.classpath | 4 ++-- test-support/pom.xml | 2 +- .../osgi/test/internal/boot-bundles.properties | 2 +- 76 files changed, 100 insertions(+), 97 deletions(-) diff --git a/annotation/pom.xml b/annotation/pom.xml index bfd909b4d..085239e2a 100644 --- a/annotation/pom.xml +++ b/annotation/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/bundle-archetype/pom.xml b/bundle-archetype/pom.xml index 52a29599b..7895c4218 100644 --- a/bundle-archetype/pom.xml +++ b/bundle-archetype/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/changelog.txt b/changelog.txt index c261b18af..63696020b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,9 @@ SPRING DYNAMIC MODULES FRAMEWORK CHANGELOG ========================================== http://www.springframework.org/osgi +Changes in version 1.0.1 (200y-mm-dd) +----------------------------------------- + Changes in version 1.0 final (2008-01-22) ----------------------------------------- diff --git a/core/.classpath b/core/.classpath index 6704625f6..85d0cb830 100644 --- a/core/.classpath +++ b/core/.classpath @@ -7,7 +7,7 @@ - + diff --git a/core/pom.xml b/core/pom.xml index 7184ea63a..391b787b7 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/docs/pom.xml b/docs/pom.xml index d279ce7d6..30c50bdff 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -4,7 +4,7 @@ org.springframework.osgi spring-osgi pom - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT Spring OSGi http://www.springframework.org/osgi diff --git a/docs/src/docbkx/appendix/appendix-compendium.xml b/docs/src/docbkx/appendix/appendix-compendium.xml index eda546ef3..b111926b0 100644 --- a/docs/src/docbkx/appendix/appendix-compendium.xml +++ b/docs/src/docbkx/appendix/appendix-compendium.xml @@ -18,11 +18,11 @@ xmlns:osgix="http://www.springframework.org/schema/osgi-compendium" xmlns:beans="http://www.springframework.org/schema/beans" xsi:schemaLocation="http://www.springframework.org/schema/osgi - http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd + http://www.springframework.org/schema/osgi/spring-osgi.xsd http://www.springframework.org/schema/osgi-compendium - http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium-1.0.xsd + http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> + http://www.springframework.org/schema/beans/spring-beans.xsd"> + http://www.springframework.org/schema/osgi/spring-osgi.xsd"> @@ -80,9 +80,9 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans" xsi:schemaLocation="http://www.springframework.org/schema/osgi - http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd + http://www.springframework.org/schema/osgi/spring-osgi.xsd http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> + http://www.springframework.org/schema/beans/spring-beans.xsd"> diff --git a/extender/pom.xml b/extender/pom.xml index 3f2914277..474dedf20 100644 --- a/extender/pom.xml +++ b/extender/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/annotation.dependency.test.bundle/.classpath b/integration-tests/bundles/annotation.dependency.test.bundle/.classpath index d27e472c7..5ca6a4a4a 100644 --- a/integration-tests/bundles/annotation.dependency.test.bundle/.classpath +++ b/integration-tests/bundles/annotation.dependency.test.bundle/.classpath @@ -5,6 +5,6 @@ - + diff --git a/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml b/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml index 619de3223..7094c33de 100644 --- a/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml +++ b/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/annotation.test.bundle/.classpath b/integration-tests/bundles/annotation.test.bundle/.classpath index 037aebc7c..3eff5016e 100644 --- a/integration-tests/bundles/annotation.test.bundle/.classpath +++ b/integration-tests/bundles/annotation.test.bundle/.classpath @@ -5,6 +5,6 @@ - + diff --git a/integration-tests/bundles/annotation.test.bundle/pom.xml b/integration-tests/bundles/annotation.test.bundle/pom.xml index 2741ce4fd..fcfef096d 100644 --- a/integration-tests/bundles/annotation.test.bundle/pom.xml +++ b/integration-tests/bundles/annotation.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/cardinality.0to1.bundle/pom.xml b/integration-tests/bundles/cardinality.0to1.bundle/pom.xml index 43335fe2e..a618edb1b 100644 --- a/integration-tests/bundles/cardinality.0to1.bundle/pom.xml +++ b/integration-tests/bundles/cardinality.0to1.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml b/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml index 518d74fcf..1d91ca952 100644 --- a/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml b/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml index 10be2512c..01a90e646 100644 --- a/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml b/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml index c22217f7a..61d5feb6b 100644 --- a/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.bundle/pom.xml b/integration-tests/bundles/config.bundle/pom.xml index f51f3453d..1704564fa 100644 --- a/integration-tests/bundles/config.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/pom.xml @@ -3,7 +3,7 @@ org.springframework.osgi spring-osgi-integration-test-bundles - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml b/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml index cbe67c64a..b43a7c9d2 100644 --- a/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml b/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml index 579fae651..67fd4fc59 100644 --- a/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml b/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml index 5d257549f..ae01846ed 100644 --- a/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.file.with.dots.bundle/pom.xml b/integration-tests/bundles/config.file.with.dots.bundle/pom.xml index ab7b7754d..9948b4b63 100644 --- a/integration-tests/bundles/config.file.with.dots.bundle/pom.xml +++ b/integration-tests/bundles/config.file.with.dots.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/configuration.test.bundle/pom.xml b/integration-tests/bundles/configuration.test.bundle/pom.xml index 4dab58f6e..206cfd4f4 100644 --- a/integration-tests/bundles/configuration.test.bundle/pom.xml +++ b/integration-tests/bundles/configuration.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/deadlock.bundle/pom.xml b/integration-tests/bundles/deadlock.bundle/pom.xml index 013535422..e0300467c 100644 --- a/integration-tests/bundles/deadlock.bundle/pom.xml +++ b/integration-tests/bundles/deadlock.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/dependency.factory.bundle/pom.xml b/integration-tests/bundles/dependency.factory.bundle/pom.xml index f9aa8b36b..908856ce2 100644 --- a/integration-tests/bundles/dependency.factory.bundle/pom.xml +++ b/integration-tests/bundles/dependency.factory.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/dependency.test.bundle/pom.xml b/integration-tests/bundles/dependency.test.bundle/pom.xml index a7ae38d22..978724540 100644 --- a/integration-tests/bundles/dependency.test.bundle/pom.xml +++ b/integration-tests/bundles/dependency.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/error.bundle/pom.xml b/integration-tests/bundles/error.bundle/pom.xml index 5ef71b056..d73c22872 100644 --- a/integration-tests/bundles/error.bundle/pom.xml +++ b/integration-tests/bundles/error.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/extender.version.bundle/pom.xml b/integration-tests/bundles/extender.version.bundle/pom.xml index 1ac6bec40..11de3dcf9 100644 --- a/integration-tests/bundles/extender.version.bundle/pom.xml +++ b/integration-tests/bundles/extender.version.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/io.fragment.1.bundle/pom.xml b/integration-tests/bundles/io.fragment.1.bundle/pom.xml index de0ef1ea6..f6220755a 100644 --- a/integration-tests/bundles/io.fragment.1.bundle/pom.xml +++ b/integration-tests/bundles/io.fragment.1.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/io.fragment.2.bundle/pom.xml b/integration-tests/bundles/io.fragment.2.bundle/pom.xml index 1e6b9dad4..ab0041c20 100644 --- a/integration-tests/bundles/io.fragment.2.bundle/pom.xml +++ b/integration-tests/bundles/io.fragment.2.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/lifecycle.test.bundle/pom.xml b/integration-tests/bundles/lifecycle.test.bundle/pom.xml index bb233628f..0b241da0d 100644 --- a/integration-tests/bundles/lifecycle.test.bundle/pom.xml +++ b/integration-tests/bundles/lifecycle.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/pom.xml b/integration-tests/bundles/pom.xml index 797dad1ee..e00678559 100644 --- a/integration-tests/bundles/pom.xml +++ b/integration-tests/bundles/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/reference.test.bundle/pom.xml b/integration-tests/bundles/reference.test.bundle/pom.xml index 63d74d6e4..cfba76fe7 100644 --- a/integration-tests/bundles/reference.test.bundle/pom.xml +++ b/integration-tests/bundles/reference.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/scoped.a.bundle/pom.xml b/integration-tests/bundles/scoped.a.bundle/pom.xml index 95476d997..521fa3627 100644 --- a/integration-tests/bundles/scoped.a.bundle/pom.xml +++ b/integration-tests/bundles/scoped.a.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/scoped.b.bundle/pom.xml b/integration-tests/bundles/scoped.b.bundle/pom.xml index 04108dfe0..17e37ec60 100644 --- a/integration-tests/bundles/scoped.b.bundle/pom.xml +++ b/integration-tests/bundles/scoped.b.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/scoped.common.bundle/pom.xml b/integration-tests/bundles/scoped.common.bundle/pom.xml index 8f1df845b..ec62ac4ac 100644 --- a/integration-tests/bundles/scoped.common.bundle/pom.xml +++ b/integration-tests/bundles/scoped.common.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/service.listener.bundle/pom.xml b/integration-tests/bundles/service.listener.bundle/pom.xml index 1060ade62..98711a24a 100644 --- a/integration-tests/bundles/service.listener.bundle/pom.xml +++ b/integration-tests/bundles/service.listener.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.2.bundle/pom.xml b/integration-tests/bundles/simple.service.2.bundle/pom.xml index 17b485de4..6abb65262 100644 --- a/integration-tests/bundles/simple.service.2.bundle/pom.xml +++ b/integration-tests/bundles/simple.service.2.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.3.bundle/pom.xml b/integration-tests/bundles/simple.service.3.bundle/pom.xml index f63dd97d0..8a707c996 100644 --- a/integration-tests/bundles/simple.service.3.bundle/pom.xml +++ b/integration-tests/bundles/simple.service.3.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml b/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml index 41561fcf1..4b8a95049 100644 --- a/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml +++ b/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.bundle.identical/pom.xml b/integration-tests/bundles/simple.service.bundle.identical/pom.xml index 440c3e853..f5952c27a 100644 --- a/integration-tests/bundles/simple.service.bundle.identical/pom.xml +++ b/integration-tests/bundles/simple.service.bundle.identical/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.bundle/pom.xml b/integration-tests/bundles/simple.service.bundle/pom.xml index 45ded112e..1ccd3a3e4 100644 --- a/integration-tests/bundles/simple.service.bundle/pom.xml +++ b/integration-tests/bundles/simple.service.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/tccl.bundle/pom.xml b/integration-tests/bundles/tccl.bundle/pom.xml index 19d71e20a..0d8a153e5 100644 --- a/integration-tests/bundles/tccl.bundle/pom.xml +++ b/integration-tests/bundles/tccl.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/trivial.bundle/pom.xml b/integration-tests/bundles/trivial.bundle/pom.xml index b01d0cc89..56a7e0118 100644 --- a/integration-tests/bundles/trivial.bundle/pom.xml +++ b/integration-tests/bundles/trivial.bundle/pom.xml @@ -2,7 +2,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/trivial.test.bundle/pom.xml b/integration-tests/bundles/trivial.test.bundle/pom.xml index 6bb37657a..d6a8818a5 100644 --- a/integration-tests/bundles/trivial.test.bundle/pom.xml +++ b/integration-tests/bundles/trivial.test.bundle/pom.xml @@ -2,7 +2,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index f048361b3..3b9f6289e 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/tests-tiger/.classpath b/integration-tests/tests-tiger/.classpath index f18b2c7d6..31ce7211d 100644 --- a/integration-tests/tests-tiger/.classpath +++ b/integration-tests/tests-tiger/.classpath @@ -5,7 +5,7 @@ - + @@ -17,9 +17,9 @@ - - - + + + diff --git a/integration-tests/tests-tiger/pom.xml b/integration-tests/tests-tiger/pom.xml index 268df093f..c101bd6c9 100644 --- a/integration-tests/tests-tiger/pom.xml +++ b/integration-tests/tests-tiger/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/tests/.classpath b/integration-tests/tests/.classpath index 4539ecf30..37afc58b8 100644 --- a/integration-tests/tests/.classpath +++ b/integration-tests/tests/.classpath @@ -11,16 +11,16 @@ - - - + + + - + - - + + @@ -31,8 +31,8 @@ - - - + + + diff --git a/integration-tests/tests/pom.xml b/integration-tests/tests/pom.xml index dfe3c240b..c434af9ce 100644 --- a/integration-tests/tests/pom.xml +++ b/integration-tests/tests/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/io/.classpath b/io/.classpath index b331c360b..ba66de1e0 100644 --- a/io/.classpath +++ b/io/.classpath @@ -5,7 +5,7 @@ - + diff --git a/io/pom.xml b/io/pom.xml index f73f34a83..1f4b3b522 100644 --- a/io/pom.xml +++ b/io/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/mock/pom.xml b/mock/pom.xml index 9ca537663..0b67f7660 100644 --- a/mock/pom.xml +++ b/mock/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/pom.xml b/pom.xml index 58008069c..02d2e2925 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.springframework.osgi spring-osgi pom - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT Spring Dynamic Modules http://www.springframework.org/osgi diff --git a/release/pom.xml b/release/pom.xml index 8837399ad..a6e01ad46 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -12,7 +12,7 @@ org.springframework.osgi spring-osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT .. diff --git a/samples/petclinic/petclinic.sample.contract/pom.xml b/samples/petclinic/petclinic.sample.contract/pom.xml index 06a588e9d..c856a928d 100644 --- a/samples/petclinic/petclinic.sample.contract/pom.xml +++ b/samples/petclinic/petclinic.sample.contract/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 @@ -11,7 +11,7 @@ contract jar Spring OSGi Samples: Simple Petclinic Contract - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT http://www.springframework.org/osgi diff --git a/samples/petclinic/petclinic.sample.hsqldb/pom.xml b/samples/petclinic/petclinic.sample.hsqldb/pom.xml index 7e623ff63..648fb8339 100644 --- a/samples/petclinic/petclinic.sample.hsqldb/pom.xml +++ b/samples/petclinic/petclinic.sample.hsqldb/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 @@ -11,7 +11,7 @@ hsqldb-impl jar Spring OSGi Samples: Simple Petclinic HSQLDB - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT http://www.springframework.org/osgi diff --git a/samples/petclinic/petclinic.sample.jdbc/pom.xml b/samples/petclinic/petclinic.sample.jdbc/pom.xml index eca09ab24..c303fc36d 100644 --- a/samples/petclinic/petclinic.sample.jdbc/pom.xml +++ b/samples/petclinic/petclinic.sample.jdbc/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 @@ -11,7 +11,7 @@ jdbc jar Spring OSGi Samples: Simple Petclinic JDBC - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT http://www.springframework.org/osgi diff --git a/samples/petclinic/petclinic.sample.mysql/pom.xml b/samples/petclinic/petclinic.sample.mysql/pom.xml index a1cd3c899..f01d040f6 100644 --- a/samples/petclinic/petclinic.sample.mysql/pom.xml +++ b/samples/petclinic/petclinic.sample.mysql/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 @@ -11,7 +11,7 @@ mysql-impl jar Spring OSGi Samples: Simple Petclinic MySQL - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT http://www.springframework.org/osgi diff --git a/samples/petclinic/pom.xml b/samples/petclinic/pom.xml index 3e16be6a4..322cd9be4 100644 --- a/samples/petclinic/pom.xml +++ b/samples/petclinic/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/pom.xml b/samples/pom.xml index b290a6c6b..5ee3bc6ef 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/simple-service/pom.xml b/samples/simple-service/pom.xml index bc8cb91ec..c5da46577 100644 --- a/samples/simple-service/pom.xml +++ b/samples/simple-service/pom.xml @@ -3,7 +3,7 @@ samples org.springframework.osgi.samples - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/simple-service/simple-service-bundle/pom.xml b/samples/simple-service/simple-service-bundle/pom.xml index cfa2d952c..83f4a0531 100644 --- a/samples/simple-service/simple-service-bundle/pom.xml +++ b/samples/simple-service/simple-service-bundle/pom.xml @@ -2,7 +2,7 @@ simple-service org.springframework.osgi.samples - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/simple-service/simple-service-integration-test/pom.xml b/samples/simple-service/simple-service-integration-test/pom.xml index e6185ccc7..3d3b4bc3f 100644 --- a/samples/simple-service/simple-service-integration-test/pom.xml +++ b/samples/simple-service/simple-service-integration-test/pom.xml @@ -3,7 +3,7 @@ simple-service org.springframework.osgi.samples - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/weather/pom.xml b/samples/weather/pom.xml index 1a43213d1..c1168fb88 100644 --- a/samples/weather/pom.xml +++ b/samples/weather/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/weather/weather-dao/pom.xml b/samples/weather/weather-dao/pom.xml index 87cf66716..39b804fed 100755 --- a/samples/weather/weather-dao/pom.xml +++ b/samples/weather/weather-dao/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT org.springframework.osgi.samples weather-dao diff --git a/samples/weather/weather-extension/pom.xml b/samples/weather/weather-extension/pom.xml index 6dc9258de..6c8fff7fe 100644 --- a/samples/weather/weather-extension/pom.xml +++ b/samples/weather/weather-extension/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT org.springframework.osgi.samples weather-extension diff --git a/samples/weather/weather-service-integration-test/.classpath b/samples/weather/weather-service-integration-test/.classpath index 2ceb13013..b007154b2 100644 --- a/samples/weather/weather-service-integration-test/.classpath +++ b/samples/weather/weather-service-integration-test/.classpath @@ -11,6 +11,6 @@ - + diff --git a/samples/weather/weather-service-integration-test/pom.xml b/samples/weather/weather-service-integration-test/pom.xml index da270688e..ba58ede49 100644 --- a/samples/weather/weather-service-integration-test/pom.xml +++ b/samples/weather/weather-service-integration-test/pom.xml @@ -3,7 +3,7 @@ weather org.springframework.osgi.samples - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/weather/weather-service-test/pom.xml b/samples/weather/weather-service-test/pom.xml index 9b01c9066..074a72824 100755 --- a/samples/weather/weather-service-test/pom.xml +++ b/samples/weather/weather-service-test/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT org.springframework.osgi.samples weather-service-test diff --git a/samples/weather/weather-service/pom.xml b/samples/weather/weather-service/pom.xml index 9ca708c46..d15dadb75 100755 --- a/samples/weather/weather-service/pom.xml +++ b/samples/weather/weather-service/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT org.springframework.osgi.samples weather-service diff --git a/samples/weather/wiring-bundle/.classpath b/samples/weather/wiring-bundle/.classpath index 15f9ff0cf..ec48e3181 100644 --- a/samples/weather/wiring-bundle/.classpath +++ b/samples/weather/wiring-bundle/.classpath @@ -13,7 +13,7 @@ - - + + diff --git a/samples/weather/wiring-bundle/pom.xml b/samples/weather/wiring-bundle/pom.xml index 4534f3355..50b8bcc0e 100755 --- a/samples/weather/wiring-bundle/pom.xml +++ b/samples/weather/wiring-bundle/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT org.springframework.osgi.samples wiring-bundle diff --git a/test-support/.classpath b/test-support/.classpath index e12381f12..131838b94 100644 --- a/test-support/.classpath +++ b/test-support/.classpath @@ -15,8 +15,8 @@ - - + + diff --git a/test-support/pom.xml b/test-support/pom.xml index b0a51a8b0..70b9970bb 100644 --- a/test-support/pom.xml +++ b/test-support/pom.xml @@ -2,7 +2,7 @@ spring-osgi org.springframework.osgi - 1.0-SNAPSHOT + 1.0.1-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties b/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties index b3644fed0..ffe2cd991 100644 --- a/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties +++ b/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties @@ -26,7 +26,7 @@ ignore.junit.version=3.8.2-SNAPSHOT ignore.log4j.version=1.2.15-SNAPSHOT ignore.spring.version=2.5.1 -ignore.spring.osgi.version=1.0-SNAPSHOT +ignore.spring.osgi.version=1.0.1-SNAPSHOT ignore.slf4j.version=1.4.3 ignore.asm.version=2.2.3-SNAPSHOT From af05476fd03039a82a7c2d9f5f951d49884a1785 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Sat, 19 Jan 2008 21:35:55 +0000 Subject: [PATCH 02/53] + update import/export package version --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 02d2e2925..3a0877c9b 100644 --- a/pom.xml +++ b/pom.xml @@ -24,11 +24,11 @@ - 1.0.0 + 1.0.1 - 1.0.0 - 1.0.0 + 1.0.1 + 1.0.1 * From 88837d8792c92cdbff6189e117a9243942b3cabd Mon Sep 17 00:00:00 2001 From: costin_leau Date: Mon, 21 Jan 2008 19:35:32 +0000 Subject: [PATCH 03/53] removed version from schema comment --- .../osgi/compendium/config/spring-osgi-compendium-1.0.xsd | 2 +- .../org/springframework/osgi/config/spring-osgi-1.0.xsd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/resources/org/springframework/osgi/compendium/config/spring-osgi-compendium-1.0.xsd b/core/src/main/resources/org/springframework/osgi/compendium/config/spring-osgi-compendium-1.0.xsd index e2b721882..e8eef57d8 100644 --- a/core/src/main/resources/org/springframework/osgi/compendium/config/spring-osgi-compendium-1.0.xsd +++ b/core/src/main/resources/org/springframework/osgi/compendium/config/spring-osgi-compendium-1.0.xsd @@ -14,7 +14,7 @@ diff --git a/core/src/main/resources/org/springframework/osgi/config/spring-osgi-1.0.xsd b/core/src/main/resources/org/springframework/osgi/config/spring-osgi-1.0.xsd index dd2841565..edfeca0f8 100644 --- a/core/src/main/resources/org/springframework/osgi/config/spring-osgi-1.0.xsd +++ b/core/src/main/resources/org/springframework/osgi/config/spring-osgi-1.0.xsd @@ -13,7 +13,7 @@ From c3245e0ff6e662547723ef3d3ffcd06bd25e49a6 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Thu, 24 Jan 2008 18:08:44 +0000 Subject: [PATCH 04/53] + update release date in the changelog + remove version from schema comment --- changelog.txt | 2 +- .../osgi/compendium/config/spring-osgi-compendium-1.0.xsd | 2 +- .../org/springframework/osgi/config/spring-osgi-1.0.xsd | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/changelog.txt b/changelog.txt index 63696020b..21bbbbc26 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,7 +5,7 @@ http://www.springframework.org/osgi Changes in version 1.0.1 (200y-mm-dd) ----------------------------------------- -Changes in version 1.0 final (2008-01-22) +Changes in version 1.0 final (2008-01-25) ----------------------------------------- Package org.springframework.osgi.extensions.annotation diff --git a/core/src/main/resources/org/springframework/osgi/compendium/config/spring-osgi-compendium-1.0.xsd b/core/src/main/resources/org/springframework/osgi/compendium/config/spring-osgi-compendium-1.0.xsd index e8eef57d8..3cb69cb90 100644 --- a/core/src/main/resources/org/springframework/osgi/compendium/config/spring-osgi-compendium-1.0.xsd +++ b/core/src/main/resources/org/springframework/osgi/compendium/config/spring-osgi-compendium-1.0.xsd @@ -14,7 +14,7 @@ diff --git a/core/src/main/resources/org/springframework/osgi/config/spring-osgi-1.0.xsd b/core/src/main/resources/org/springframework/osgi/config/spring-osgi-1.0.xsd index edfeca0f8..08fe902ab 100644 --- a/core/src/main/resources/org/springframework/osgi/config/spring-osgi-1.0.xsd +++ b/core/src/main/resources/org/springframework/osgi/config/spring-osgi-1.0.xsd @@ -13,7 +13,7 @@ From 9406957f52b3390e61092572841dbbf9d7fb63cc Mon Sep 17 00:00:00 2001 From: costin_leau Date: Mon, 18 Feb 2008 15:11:14 +0000 Subject: [PATCH 05/53] OSGI-353 OSGI-348 OSGI-347 backport from 1.1.x trunk --- changelog.txt | 3 +++ docs/src/docbkx/reference/bundles.xml | 2 +- docs/src/docbkx/reference/service-registry.xml | 2 +- .../osgi/test/AbstractDependencyManagerTests.java | 11 +++++++++-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index 21bbbbc26..421e6ad03 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,9 @@ http://www.springframework.org/osgi Changes in version 1.0.1 (200y-mm-dd) ----------------------------------------- +Package org.springframework.osgi.test +* custom artifact locators can be used with AbstractDependencyManagerTests + Changes in version 1.0 final (2008-01-25) ----------------------------------------- diff --git a/docs/src/docbkx/reference/bundles.xml b/docs/src/docbkx/reference/bundles.xml index c7db7bad2..a23cd138d 100644 --- a/docs/src/docbkx/reference/bundles.xml +++ b/docs/src/docbkx/reference/bundles.xml @@ -25,7 +25,7 @@ type Bundle. If the needed bundle is not installed, one can use location attribute - to indicate install or/and the action/dispose-action attributes + to indicate install or/and the action/destroy-action attributes provide declarative control over the bundle's lifecycle. The location attribute is used to specify a URL where the bundle jar file artifact can be found. The action attribute specifies the lifecycle operation to diff --git a/docs/src/docbkx/reference/service-registry.xml b/docs/src/docbkx/reference/service-registry.xml index 8ed868b9b..ec629dff3 100644 --- a/docs/src/docbkx/reference/service-registry.xml +++ b/docs/src/docbkx/reference/service-registry.xml @@ -857,7 +857,7 @@ public interface SubInterface extends SuperInterface {}]]>
- Getting a hold of the managed service service reference + Getting a hold of the managed service reference Spring-DM can automatically convert a managed OSGi service to service reference. That is, if the property into which a reference bean diff --git a/test-support/src/main/java/org/springframework/osgi/test/AbstractDependencyManagerTests.java b/test-support/src/main/java/org/springframework/osgi/test/AbstractDependencyManagerTests.java index a2f68624e..9ef65a07e 100644 --- a/test-support/src/main/java/org/springframework/osgi/test/AbstractDependencyManagerTests.java +++ b/test-support/src/main/java/org/springframework/osgi/test/AbstractDependencyManagerTests.java @@ -287,8 +287,10 @@ protected Resource locateBundle(String bundleId) { artifactId[i] = StringUtils.trimWhitespace(artifactId[i]); } - return (artifactId.length == 3 ? locator.locateArtifact(artifactId[0], artifactId[1], artifactId[2]) - : locator.locateArtifact(artifactId[0], artifactId[1], artifactId[2], artifactId[3])); + ArtifactLocator aLocator = getLocator(); + + return (artifactId.length == 3 ? aLocator.locateArtifact(artifactId[0], artifactId[1], artifactId[2]) + : aLocator.locateArtifact(artifactId[0], artifactId[1], artifactId[2], artifactId[3])); } /** @@ -296,6 +298,11 @@ protected Resource locateBundle(String bundleId) { * override this method if the default locator (searching the local Maven2 * repository) is not enough. * + *

+ * Note: This method will be used each time a bundle has to be + * retrieved; it is highly recommended to return a cached instance instead + * of a new one each time. + * * @return artifact locator used by this test. */ protected ArtifactLocator getLocator() { From 4d27cb9b28f89489822ccca493cdf1ba49805bff Mon Sep 17 00:00:00 2001 From: costin_leau Date: Wed, 20 Feb 2008 16:26:33 +0000 Subject: [PATCH 06/53] + backported some IO buf fixes from TRUNK + updated changelog --- .../resources/archetype-resources/pom.xml | 50 ++++++++++++++----- changelog.txt | 10 ++++ .../osgi/io/OsgiBundleResource.java | 25 +++++++--- .../io/OsgiBundleResourcePatternResolver.java | 20 ++++++++ .../osgi/io/internal/OsgiResourceUtils.java | 38 ++++++++++++-- .../test/AbstractDependencyManagerTests.java | 3 +- 6 files changed, 123 insertions(+), 23 deletions(-) diff --git a/bundle-archetype/src/main/resources/archetype-resources/pom.xml b/bundle-archetype/src/main/resources/archetype-resources/pom.xml index 672574941..1ab177613 100644 --- a/bundle-archetype/src/main/resources/archetype-resources/pom.xml +++ b/bundle-archetype/src/main/resources/archetype-resources/pom.xml @@ -11,21 +11,11 @@ 1.4.3 2.5.1 + 1.0.1-SNAPSHOT - - org.springframework.osgi - junit.osgi - 3.8.2-SNAPSHOT - test - - - org.springframework - spring-test - ${spring.maven.artifact.version} - test - + org.springframework spring-core @@ -65,6 +55,42 @@ org.osgi.core 4.0 + + + + org.springframework.osgi + junit.osgi + 3.8.2-SNAPSHOT + test + + + org.springframework + spring-test + ${spring.maven.artifact.version} + test + + + + org.springframework.osgi + spring-osgi-test + ${spring.osgi.version} + test + + + + org.springframework.osgi + spring-osgi-annotation + ${spring.osgi.version} + test + + + + org.springframework.osgi + aopalliance.osgi + 1.0-SNAPSHOT + test + + diff --git a/changelog.txt b/changelog.txt index 421e6ad03..df63696f0 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,8 +5,18 @@ http://www.springframework.org/osgi Changes in version 1.0.1 (200y-mm-dd) ----------------------------------------- +Package org.springframework.context.support +* the namespace resolver mechanism first checks the local bundle classpath before using the extender namespace service + +Package org.springframework.osgi.io +* improved OsgiBundleResource handling of jars with missing archive entries for folders +* improved OsgiBundleResourcePatternResolver performance when checking for jar resources +* improved detection of relative OSGi URLs + Package org.springframework.osgi.test * custom artifact locators can be used with AbstractDependencyManagerTests +* removed all internal usage of system properties by the testing infrastructure +* removed the use of serialization inside the testing framework Changes in version 1.0 final (2008-01-25) ----------------------------------------- diff --git a/io/src/main/java/org/springframework/osgi/io/OsgiBundleResource.java b/io/src/main/java/org/springframework/osgi/io/OsgiBundleResource.java index 056b5293b..1bcfe67c4 100644 --- a/io/src/main/java/org/springframework/osgi/io/OsgiBundleResource.java +++ b/io/src/main/java/org/springframework/osgi/io/OsgiBundleResource.java @@ -408,17 +408,30 @@ URL[] getAllUrlsFromBundleSpace(String location) throws IOException { if (!StringUtils.hasText(location)) location = OsgiResourceUtils.FOLDER_DELIMITER; - // the root folder is requested (special case + // the root folder is requested (special case) if (OsgiResourceUtils.FOLDER_DELIMITER.equals(location)) { - Enumeration candidates = bundle.findEntries(location, null, false); + // there is no way to determine the URL to the root directly + // through findEntries so we'll have to use another way + // getEntry can't be used since it doesn't consider fragments + // so we have to rely on findEntries + + // we could ask for a known entry (such as META-INF) + // but not all jars have a dedicated entry for it + // so we'll just ask for whatever is present in the root + Enumeration candidates = bundle.findEntries("/", null, false); + + // since there can be multiple root paths (when fragments are present) + // iterate on all candidates while (candidates != null && candidates.hasMoreElements()) { - // extract the root URLs + URL url = (URL) candidates.nextElement(); - // if it's not a folder, consider it as a root - if (!url.getFile().endsWith(OsgiResourceUtils.FOLDER_DELIMITER)) - resources.add(new URL(url, ".")); + // determined the root path + // we'll have to parse the string since some implementations + // do not normalize the resulting URL resulting in mismatches + String rootPath = OsgiResourceUtils.findUpperFolder(url.toExternalForm()); + resources.add(new URL(rootPath)); } } else { diff --git a/io/src/main/java/org/springframework/osgi/io/OsgiBundleResourcePatternResolver.java b/io/src/main/java/org/springframework/osgi/io/OsgiBundleResourcePatternResolver.java index abb330ead..04b68e865 100644 --- a/io/src/main/java/org/springframework/osgi/io/OsgiBundleResourcePatternResolver.java +++ b/io/src/main/java/org/springframework/osgi/io/OsgiBundleResourcePatternResolver.java @@ -144,6 +144,26 @@ private Resource[] findPathMatchingResources(String locationPattern, int searchT return (Resource[]) result.toArray(new Resource[result.size()]); } + /** + * {@inheritDoc} + * + *

Overrides the default check up since computing the URL can be fairly + * expensive operation as there is no caching (due to the framework dynamic + * nature). + */ + protected boolean isJarResource(Resource resource) throws IOException { + if (resource instanceof OsgiBundleResource) { + // check the resource type + OsgiBundleResource bundleResource = (OsgiBundleResource) resource; + // if it's known, then it's not a jar + if (bundleResource.getSearchType() != OsgiResourceUtils.PREFIX_TYPE_UNKNOWN) { + return false; + } + // otherwise the normal parsing occur + } + return super.isJarResource(resource); + } + /** * Based on the search type, use the appropriate method * diff --git a/io/src/main/java/org/springframework/osgi/io/internal/OsgiResourceUtils.java b/io/src/main/java/org/springframework/osgi/io/internal/OsgiResourceUtils.java index ab35053c7..8ae7e6128 100644 --- a/io/src/main/java/org/springframework/osgi/io/internal/OsgiResourceUtils.java +++ b/io/src/main/java/org/springframework/osgi/io/internal/OsgiResourceUtils.java @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.springframework.osgi.io.internal; import java.net.URL; @@ -56,9 +57,10 @@ public abstract class OsgiResourceUtils { // classpath: public static final int PREFIX_TYPE_CLASS_SPACE = 2; - // osgibundlejar:: + // osgibundlejar: public static final int PREFIX_TYPE_BUNDLE_JAR = 4; + /** * Return the path prefix if there is any or {@link #EMPTY_PREFIX} * otherwise. @@ -111,6 +113,10 @@ public static String stripPrefix(String path) { } public static Resource[] convertURLArraytoResourceArray(URL[] urls) { + if (urls == null) { + return new Resource[0]; + } + // convert this into a resource array Resource[] res = new Resource[urls.length]; for (int i = 0; i < urls.length; i++) { @@ -120,10 +126,34 @@ public static Resource[] convertURLArraytoResourceArray(URL[] urls) { } public static Resource[] convertURLEnumerationToResourceArray(Enumeration enm) { - Set resources = new LinkedHashSet(5); + Set resources = new LinkedHashSet(4); while (enm != null && enm.hasMoreElements()) { - resources.add((URL) enm.nextElement()); + resources.add(new UrlResource((URL) enm.nextElement())); + } + return (Resource[]) resources.toArray(new Resource[resources.size()]); + } + + /** + * Similar to /path/path1/ -> /path/, /path/file -> /path/ + * + * @return + */ + public static String findUpperFolder(String path) { + if (path.length() < 2) + return path; + + String newPath = path; + // if it's a folder + if (path.endsWith(FOLDER_DELIMITER)) { + newPath = path.substring(0, path.length() - 1); } - return convertURLArraytoResourceArray((URL[]) resources.toArray(new URL[resources.size()])); + + int index = newPath.lastIndexOf(FOLDER_DELIMITER); + if (index > 0) + return newPath.substring(0, index + 1); + + else + // fallback to defaults + return path; } } diff --git a/test-support/src/main/java/org/springframework/osgi/test/AbstractDependencyManagerTests.java b/test-support/src/main/java/org/springframework/osgi/test/AbstractDependencyManagerTests.java index 9ef65a07e..156e274da 100644 --- a/test-support/src/main/java/org/springframework/osgi/test/AbstractDependencyManagerTests.java +++ b/test-support/src/main/java/org/springframework/osgi/test/AbstractDependencyManagerTests.java @@ -239,7 +239,7 @@ protected Resource[] getTestFrameworkBundles() { * {@link #locateBundle(String)}. * * @param bundles bundle identifiers - * @return an array of Spring resources for the given bundle indentifiers + * @return an array of Spring resources for the given bundle identifiers */ protected Resource[] locateBundles(String[] bundles) { if (bundles == null) @@ -287,6 +287,7 @@ protected Resource locateBundle(String bundleId) { artifactId[i] = StringUtils.trimWhitespace(artifactId[i]); } + ArtifactLocator aLocator = getLocator(); return (artifactId.length == 3 ? aLocator.locateArtifact(artifactId[0], artifactId[1], artifactId[2]) From 3a5c49f1aeb149e03140f575dfe43512e1cc7608 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Wed, 20 Feb 2008 17:37:46 +0000 Subject: [PATCH 07/53] OSGI-357 OSGI-352 + more backports from TRUNK --- changelog.txt | 2 + .../AbstractOsgiBundleApplicationContext.java | 10 +- .../support/DelegatedEntityResolver.java | 72 ++++++++ .../DelegatedNamespaceHandlerResolver.java | 70 ++++++++ .../OsgiBundleXmlApplicationContext.java | 64 ++++++- .../support/OsgiPropertyEditorRegistrar.java | 6 +- ...hableOsgiBundleApplicationContextTest.java | 2 +- .../internal/ContextLoaderListener.java | 22 +-- ...dencyWaiterApplicationContextExecutor.java | 26 +-- .../internal/support/NamespacePlugins.java | 13 -- .../test/AbstractConfigurableOsgiTests.java | 26 +-- .../test/AbstractDependencyManagerTests.java | 9 +- .../osgi/test/AbstractOsgiTests.java | 162 ++++++------------ .../osgi/test/JUnitTestActivator.java | 7 +- .../osgi/test/internal/OsgiJUnitTest.java | 24 +-- .../test/internal/holder/HolderLoader.java | 79 +++++++++ .../internal/holder/OsgiTestInfoHolder.java | 129 ++++++++++++++ .../internal/holder/ReflectionOsgiHolder.java | 79 +++++++++ .../osgi/test/internal/support/Activator.java | 26 ++- .../internal/support/OsgiJUnitService.java | 72 +++----- .../osgi/test/internal/util/TestUtils.java | 79 +++++++++ .../osgi/test/platform/EquinoxPlatform.java | 2 + .../osgi/test/JUnitTestActivatorTest.java | 10 +- .../osgi/test/internal/StreamCorruption.java | 139 --------------- 24 files changed, 722 insertions(+), 408 deletions(-) create mode 100644 core/src/main/java/org/springframework/osgi/context/support/DelegatedEntityResolver.java create mode 100644 core/src/main/java/org/springframework/osgi/context/support/DelegatedNamespaceHandlerResolver.java create mode 100644 test-support/src/main/java/org/springframework/osgi/test/internal/holder/HolderLoader.java create mode 100644 test-support/src/main/java/org/springframework/osgi/test/internal/holder/OsgiTestInfoHolder.java create mode 100644 test-support/src/main/java/org/springframework/osgi/test/internal/holder/ReflectionOsgiHolder.java delete mode 100644 test-support/src/test/java/org/springframework/osgi/test/internal/StreamCorruption.java diff --git a/changelog.txt b/changelog.txt index df63696f0..ce2fd33bf 100644 --- a/changelog.txt +++ b/changelog.txt @@ -14,10 +14,12 @@ Package org.springframework.osgi.io * improved detection of relative OSGi URLs Package org.springframework.osgi.test +* AbstractOsgiTest provides better error messages for bundle that fail to start * custom artifact locators can be used with AbstractDependencyManagerTests * removed all internal usage of system properties by the testing infrastructure * removed the use of serialization inside the testing framework + Changes in version 1.0 final (2008-01-25) ----------------------------------------- diff --git a/core/src/main/java/org/springframework/osgi/context/support/AbstractOsgiBundleApplicationContext.java b/core/src/main/java/org/springframework/osgi/context/support/AbstractOsgiBundleApplicationContext.java index a0a652ba8..9c9723739 100644 --- a/core/src/main/java/org/springframework/osgi/context/support/AbstractOsgiBundleApplicationContext.java +++ b/core/src/main/java/org/springframework/osgi/context/support/AbstractOsgiBundleApplicationContext.java @@ -186,7 +186,7 @@ public String[] getConfigLocations() { */ protected void doClose() { if (!OsgiServiceUtils.unregisterService(serviceRegistration)) { - logger.info("the application context service has been already unregistered"); + logger.info("The application context service has been already unregistered"); serviceRegistration = null; } @@ -230,11 +230,11 @@ protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactor // add bundleContext bean if (!beanFactory.containsLocalBean(BUNDLE_CONTEXT_BEAN_NAME)) { - logger.debug("registering BundleContext as a bean named " + BUNDLE_CONTEXT_BEAN_NAME); + logger.debug("Registering BundleContext as a bean named " + BUNDLE_CONTEXT_BEAN_NAME); beanFactory.registerSingleton(BUNDLE_CONTEXT_BEAN_NAME, this.bundleContext); } else { - logger.warn("a bean named " + BUNDLE_CONTEXT_BEAN_NAME + logger.warn("A bean named " + BUNDLE_CONTEXT_BEAN_NAME + " already exists; the bundleContext will not be registered as a bean"); } @@ -258,7 +258,7 @@ private void cleanOsgiBundleScope(ConfigurableListableBeanFactory beanFactory) { Scope scope = beanFactory.getRegisteredScope(OsgiBundleScope.SCOPE_NAME); if (scope != null && scope instanceof OsgiBundleScope) { if (logger.isDebugEnabled()) - logger.debug("destroying existing bundle scope beans..."); + logger.debug("Destroying existing bundle scope beans..."); ((OsgiBundleScope) scope).destroy(); } } @@ -288,7 +288,7 @@ void publishContextAsOsgiServiceIfNecessary() { String[] serviceNames = org.springframework.osgi.util.internal.ClassUtils.toStringArray(filterClasses); if (logger.isDebugEnabled()) - logger.debug("publishing service under classes " + ObjectUtils.nullSafeToString(serviceNames)); + logger.debug("Publishing service under classes " + ObjectUtils.nullSafeToString(serviceNames)); // Publish under all the significant interfaces we see this.serviceRegistration = getBundleContext().registerService(serviceNames, this, serviceProperties); diff --git a/core/src/main/java/org/springframework/osgi/context/support/DelegatedEntityResolver.java b/core/src/main/java/org/springframework/osgi/context/support/DelegatedEntityResolver.java new file mode 100644 index 000000000..f6f7e6306 --- /dev/null +++ b/core/src/main/java/org/springframework/osgi/context/support/DelegatedEntityResolver.java @@ -0,0 +1,72 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.context.support; + +import java.io.IOException; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.Map; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.util.Assert; +import org.xml.sax.EntityResolver; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; + +/** + * Delegated XML entity resolver. + * + * @author Costin Leau + * + */ +class DelegatedEntityResolver implements EntityResolver { + + /** logger */ + private static final Log log = LogFactory.getLog(DelegatedEntityResolver.class); + + private final Map resolvers = new LinkedHashMap(2); + + + public void addEntityResolver(EntityResolver resolver, String resolverToString) { + Assert.notNull(resolver); + resolvers.put(resolver, resolverToString); + } + + public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { + boolean trace = log.isTraceEnabled(); + + for (Iterator iterator = resolvers.entrySet().iterator(); iterator.hasNext();) { + Map.Entry entry = (Map.Entry) iterator.next(); + EntityResolver entityResolver = (EntityResolver) entry.getKey(); + if (trace) + log.trace("Trying to resolve entity [" + publicId + "|" + systemId + "] through resolver " + + entry.getValue()); + InputSource entity = entityResolver.resolveEntity(publicId, systemId); + + String resolvedMsg = (entity != null ? "" : "not "); + if (trace) + log.trace("Entity [" + publicId + "|" + systemId + "] was " + resolvedMsg + + "resolved through entity resolver " + entry.getValue()); + + if (entity != null) { + return entity; + } + } + return null; + } +} diff --git a/core/src/main/java/org/springframework/osgi/context/support/DelegatedNamespaceHandlerResolver.java b/core/src/main/java/org/springframework/osgi/context/support/DelegatedNamespaceHandlerResolver.java new file mode 100644 index 000000000..f27445a2a --- /dev/null +++ b/core/src/main/java/org/springframework/osgi/context/support/DelegatedNamespaceHandlerResolver.java @@ -0,0 +1,70 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.context.support; + +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.Map; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.xml.NamespaceHandler; +import org.springframework.beans.factory.xml.NamespaceHandlerResolver; +import org.springframework.util.Assert; + +/** + * Delegated XML namespace handler resolver. + * + * @author Costin Leau + * + */ +class DelegatedNamespaceHandlerResolver implements NamespaceHandlerResolver { + + /** logger */ + private static final Log log = LogFactory.getLog(DelegatedNamespaceHandlerResolver.class); + + private final Map resolvers = new LinkedHashMap(2); + + + public void addNamespaceHandler(NamespaceHandlerResolver resolver, String resolverToString) { + Assert.notNull(resolver); + resolvers.put(resolver, resolverToString); + } + + public NamespaceHandler resolve(String namespaceUri) { + boolean trace = log.isTraceEnabled(); + + for (Iterator iterator = resolvers.entrySet().iterator(); iterator.hasNext();) { + Map.Entry entry = (Map.Entry) iterator.next(); + NamespaceHandlerResolver handlerResolver = (NamespaceHandlerResolver) entry.getKey(); + if (trace) + log.trace("Trying to resolve namespace [" + namespaceUri + "] through resolver " + entry.getValue()); + NamespaceHandler handler = handlerResolver.resolve(namespaceUri); + + String resolvedMsg = (handler != null ? "" : "not "); + if (trace) + log.trace("Namespace [" + namespaceUri + "] was " + resolvedMsg + "resolved through handler resolver " + + entry.getValue()); + + if (handler != null) { + return handler; + } + + } + return null; + } +} diff --git a/core/src/main/java/org/springframework/osgi/context/support/OsgiBundleXmlApplicationContext.java b/core/src/main/java/org/springframework/osgi/context/support/OsgiBundleXmlApplicationContext.java index f73e3c1f2..cf6e18c05 100644 --- a/core/src/main/java/org/springframework/osgi/context/support/OsgiBundleXmlApplicationContext.java +++ b/core/src/main/java/org/springframework/osgi/context/support/OsgiBundleXmlApplicationContext.java @@ -22,15 +22,16 @@ import org.springframework.beans.BeansException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver; +import org.springframework.beans.factory.xml.DelegatingEntityResolver; import org.springframework.beans.factory.xml.NamespaceHandlerResolver; -import org.springframework.beans.factory.xml.ResourceEntityResolver; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.context.ApplicationContext; import org.springframework.osgi.io.OsgiBundleResource; +import org.springframework.osgi.util.OsgiStringUtils; import org.xml.sax.EntityResolver; /** - * Standalone XML application context, backed by an OSGi bundle. + * Stand-alone XML application context, backed by an OSGi bundle. * *

* The configuration location defaults can be overridden via @@ -117,8 +118,8 @@ protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throw // resource loading environment. beanDefinitionReader.setResourceLoader(this); - NamespaceHandlerResolver nsResolver = lookupNamespaceHandlerResolver(); - EntityResolver enResolver = lookupEntityResolver(); + NamespaceHandlerResolver nsResolver = createNamespaceHandlerResolver(); + EntityResolver enResolver = createEntityResolver(); beanDefinitionReader.setEntityResolver(enResolver); beanDefinitionReader.setNamespaceHandlerResolver(nsResolver); @@ -129,14 +130,61 @@ protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throw loadBeanDefinitions(beanDefinitionReader); } - private NamespaceHandlerResolver lookupNamespaceHandlerResolver() { + /** + * Creates a special OSGi namespace resolver that first uses the bundle + * class path falling back to the namespace service. This way embedded + * libraries that provide namespace handlers take priority over namespace + * provided by other bundles. + * + * @return + */ + private NamespaceHandlerResolver createNamespaceHandlerResolver() { + // create local namespace resolver + // we'll use the default resolver which uses the bundle local class-loader + NamespaceHandlerResolver localNamespaceResolver = new DefaultNamespaceHandlerResolver(getClassLoader()); + // hook in OSGi namespace resolver + NamespaceHandlerResolver osgiServiceNamespaceResolver = lookupNamespaceHandlerResolver(localNamespaceResolver); + + DelegatedNamespaceHandlerResolver delegate = new DelegatedNamespaceHandlerResolver(); + delegate.addNamespaceHandler(localNamespaceResolver, "LocalNamespaceResolver for bundle " + + OsgiStringUtils.nullSafeNameAndSymName(getBundle())); + delegate.addNamespaceHandler(osgiServiceNamespaceResolver, "OSGi Service resolver"); + + return delegate; + } + + /** + * Similar to {@link #createNamespaceHandlerResolver()}, this method + * creates a special OSGi entity resolver that considers the bundle class + * path first, falling back to the entity resolver service provided by the + * Spring DM extender. + * + * @return + */ + private EntityResolver createEntityResolver() { + // create local namespace resolver + EntityResolver localEntityResolver = new DelegatingEntityResolver(getClassLoader()); + // hook in OSGi namespace resolver + EntityResolver osgiServiceEntityResolver = lookupEntityResolver(localEntityResolver); + + DelegatedEntityResolver delegate = new DelegatedEntityResolver(); + delegate.addEntityResolver(localEntityResolver, "LocalEntityResolver for bundle " + + OsgiStringUtils.nullSafeNameAndSymName(getBundle())); + + // hook in OSGi namespace resolver + delegate.addEntityResolver(osgiServiceEntityResolver, "OSGi Service resolver"); + + return delegate; + } + + private NamespaceHandlerResolver lookupNamespaceHandlerResolver(Object fallbackObject) { return (NamespaceHandlerResolver) TrackingUtil.getService(new Class[] { NamespaceHandlerResolver.class }, null, - getClassLoader(), getBundleContext(), new DefaultNamespaceHandlerResolver(getClassLoader())); + getClassLoader(), getBundleContext(), fallbackObject); } - private EntityResolver lookupEntityResolver() { + private EntityResolver lookupEntityResolver(Object fallbackObject) { return (EntityResolver) TrackingUtil.getService(new Class[] { EntityResolver.class }, null, getClassLoader(), - getBundleContext(), new ResourceEntityResolver(this)); + getBundleContext(), fallbackObject); } /** diff --git a/core/src/main/java/org/springframework/osgi/context/support/OsgiPropertyEditorRegistrar.java b/core/src/main/java/org/springframework/osgi/context/support/OsgiPropertyEditorRegistrar.java index a8e83ab1d..83fe1e186 100644 --- a/core/src/main/java/org/springframework/osgi/context/support/OsgiPropertyEditorRegistrar.java +++ b/core/src/main/java/org/springframework/osgi/context/support/OsgiPropertyEditorRegistrar.java @@ -56,11 +56,11 @@ class OsgiPropertyEditorRegistrar implements PropertyEditorRegistrar { } catch (IOException ex) { throw (RuntimeException) new IllegalStateException( - "cannot load default propertiy editorsConfig configuration").initCause(ex); + "Cannot load default propertiy editorsConfig configuration").initCause(ex); } if (log.isTraceEnabled()) - log.trace("loaded property editors configuration " + editorsConfig); + log.trace("Loaded property editors configuration " + editorsConfig); editors = new LinkedHashMap(editorsConfig.size()); createEditors(classLoader, editorsConfig); @@ -87,7 +87,7 @@ private void createEditors(ClassLoader classLoader, Properties configuration) { Assert.isAssignable(PropertyEditor.class, editorClass); if (trace) - log.trace("adding property editor[" + editorClass + "] for type[" + key + "]"); + log.trace("Adding property editor[" + editorClass + "] for type[" + key + "]"); editors.put(key, editorClass); } } diff --git a/core/src/test/java/org/springframework/osgi/context/support/AbstractRefreshableOsgiBundleApplicationContextTest.java b/core/src/test/java/org/springframework/osgi/context/support/AbstractRefreshableOsgiBundleApplicationContextTest.java index 5cb738b06..01b6baef6 100644 --- a/core/src/test/java/org/springframework/osgi/context/support/AbstractRefreshableOsgiBundleApplicationContextTest.java +++ b/core/src/test/java/org/springframework/osgi/context/support/AbstractRefreshableOsgiBundleApplicationContextTest.java @@ -67,7 +67,7 @@ protected void tearDown() throws Exception { } public void testBundleContext() throws Exception { - MockControl bundleCtxCtrl = MockControl.createStrictControl(BundleContext.class); + MockControl bundleCtxCtrl = MockControl.createNiceControl(BundleContext.class); BundleContext bundleCtx = (BundleContext) bundleCtxCtrl.getMock(); MockControl bundleCtrl = MockControl.createStrictControl(Bundle.class); diff --git a/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java b/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java index 6bcb82f82..5d554cd45 100644 --- a/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java +++ b/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java @@ -112,7 +112,7 @@ public void bundleChanged(BundleEvent event) { synchronized (monitor) { if (isClosed) { if (trace) - log.trace("listener is closed; events are being ignored"); + log.trace("Listener is closed; events are being ignored"); return; } } @@ -125,7 +125,7 @@ public void bundleChanged(BundleEvent event) { } catch (Exception ex) { /* log exceptions before swallowing */ - log.warn("got exception while handling event " + event, ex); + log.warn("Got exception while handling event " + event, ex); } } @@ -472,7 +472,7 @@ public void run() { // eliminate context closedContexts.remove(context); if (log.isDebugEnabled()) - log.debug("closing appCtx " + context.getDisplayName()); + log.debug("Closing appCtx " + context.getDisplayName()); context.close(); } }); @@ -547,7 +547,7 @@ private void stopTaskExecutor() { } else - log.debug("all listeners closed"); + log.debug("All listeners closed"); } } } @@ -561,7 +561,7 @@ private void stopTaskExecutor() { private boolean handlerBundleMatchesExtenderVersion(Bundle bundle) { if (!ConfigUtils.matchExtenderVersionRange(bundle, extenderVersion)) { if (log.isDebugEnabled()) - log.debug("bundle [" + OsgiStringUtils.nullSafeNameAndSymName(bundle) + log.debug("Bundle [" + OsgiStringUtils.nullSafeNameAndSymName(bundle) + "] expects an extender w/ version[" + OsgiBundleUtils.getHeaderAsVersion(bundle, ConfigUtils.EXTENDER_VERSION) + "] which does not match current extender w/ version[" + extenderVersion @@ -594,7 +594,7 @@ protected void maybeCreateApplicationContextFor(Bundle bundle) { if (!ConfigUtils.matchExtenderVersionRange(bundle, extenderVersion)) { if (log.isDebugEnabled()) - log.debug("bundle [" + OsgiStringUtils.nullSafeNameAndSymName(bundle) + log.debug("Bundle [" + OsgiStringUtils.nullSafeNameAndSymName(bundle) + "] expects an extender w/ version[" + OsgiBundleUtils.getHeaderAsVersion(bundle, ConfigUtils.EXTENDER_VERSION) + "] which does not match current extender w/ version[" + extenderVersion @@ -604,7 +604,7 @@ protected void maybeCreateApplicationContextFor(Bundle bundle) { ApplicationContextConfiguration config = new ApplicationContextConfiguration(bundle); if (log.isDebugEnabled()) - log.debug("created config " + config); + log.debug("Created config " + config); if (!config.isSpringPoweredBundle()) { return; @@ -709,7 +709,7 @@ private void addAnnotationBPP(DelegatedExecutionOsgiBundleApplicationContext app Object setting = config.get(AUTO_ANNOTATION_PROCESSING); if (setting != null && setting instanceof String && Boolean.getBoolean((String) setting)) { - log.info("enabled automatic Spring-DM annotation processing; [" + AUTO_ANNOTATION_PROCESSING + "=" + log.info("Enabled automatic Spring-DM annotation processing; [" + AUTO_ANNOTATION_PROCESSING + "=" + setting + "]"); // Try and load the annotation code if it exists @@ -729,13 +729,13 @@ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) }); } catch (ClassNotFoundException exception) { - log.info("spring-dm annotation package cannot be found; automatic annotation processing is disabled"); + log.info("Spring-dm annotation package cannot be found; automatic annotation processing is disabled"); if (log.isDebugEnabled()) - log.debug("cannot load annotatoin bpp", exception); + log.debug("Cannot load annotatoin bpp", exception); } } else { - log.info("disabled automatic Spring-DM annotation processing; [ " + AUTO_ANNOTATION_PROCESSING + "=" + log.info("Disabled automatic Spring-DM annotation processing; [ " + AUTO_ANNOTATION_PROCESSING + "=" + setting + "]"); } diff --git a/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyWaiterApplicationContextExecutor.java b/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyWaiterApplicationContextExecutor.java index 4db3bcf17..99bf261b0 100644 --- a/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyWaiterApplicationContextExecutor.java +++ b/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyWaiterApplicationContextExecutor.java @@ -107,7 +107,7 @@ public void run() { } /** - * Crete the Runnable action which will complete the context creation + * Create the Runnable action which will complete the context creation * process. This process can be called synchronously or asynchronously, * depending on context configuration and availability of dependencies. * @@ -195,7 +195,7 @@ protected void stageOne() { try { if (debug) - log.debug("calling preRefresh on " + getDisplayName()); + log.debug("Calling preRefresh on " + getDisplayName()); synchronized (monitor) { @@ -213,7 +213,7 @@ protected void stageOne() { } if (debug) - log.debug("prerefresh completed; determining dependencies..."); + log.debug("Pre-refresh completed; determining dependencies..."); Runnable task = null; @@ -251,13 +251,13 @@ public void run() { // register a listener to look for them dependencyDetector = dl; if (debug) - log.debug("registering service dependency dependencyDetector for " + getDisplayName()); + log.debug("Registering service dependency dependencyDetector for " + getDisplayName()); dependencyDetector.register(); if (synchronousWait) { waitBarrier.increment(); if (debug) - log.debug("synchronous wait-for-dependencies; waiting..."); + log.debug("Synchronous wait-for-dependencies; waiting..."); // if waiting times out... if (waitBarrier.waitForZero(timeout)) { @@ -272,7 +272,7 @@ public void run() { startWatchDog(); if (debug) - log.debug("asynch wait-for-dependencies; ending method"); + log.debug("Asynch wait-for-dependencies; ending method"); } } @@ -287,7 +287,7 @@ protected void stageTwo() { boolean debug = log.isDebugEnabled(); if (debug) - log.debug("starting stage two for " + getDisplayName()); + log.debug("Starting stage two for " + getDisplayName()); synchronized (monitor) { @@ -327,7 +327,7 @@ public void close() { } if (debug) - log.debug("closing appCtx for " + getDisplayName()); + log.debug("Closing appCtx for " + getDisplayName()); if (dependencyDetector != null) { dependencyDetector.deregister(); @@ -335,14 +335,14 @@ public void close() { if (state == ContextState.STARTED) { if (debug) - log.debug("shutting down normaly appCtx " + getDisplayName()); + log.debug("Shutting down normaly appCtx " + getDisplayName()); // close the context only if it was actually started state = ContextState.STOPPED; normalShutdown = true; } else { if (debug) - log.debug("no need to stop context (it hasn't been started yet)"); + log.debug("No need to stop context (it hasn't been started yet)"); state = ContextState.INTERRUPTED; } } @@ -353,7 +353,7 @@ public void close() { } } catch (Exception ex) { - log.fatal("could not succesfully close context " + delegateContext, ex); + log.fatal("Could not succesfully close context " + delegateContext, ex); } finally { monitorCounter.decrement(); @@ -412,7 +412,7 @@ private void timeout() { dependencyDetector.deregister(); } - log.warn("timeout occured before finding service dependencies for [" + delegateContext.getDisplayName() + log.warn("Timeout occured before finding service dependencies for [" + delegateContext.getDisplayName() + "]"); ApplicationContextException e = new ApplicationContextException("Application context initializition for '" @@ -498,7 +498,7 @@ public void setWatchdog(Timer watchdog) { * @param expected the expected value for the context state. */ private void logWrongState(ContextState expected) { - log.error("expecting state (" + expected + ") not (" + state + ") for context [" + getDisplayName() + log.error("Expecting state (" + expected + ") not (" + state + ") for context [" + getDisplayName() + "]; assuming an interruption and bailing out"); } diff --git a/extender/src/main/java/org/springframework/osgi/extender/internal/support/NamespacePlugins.java b/extender/src/main/java/org/springframework/osgi/extender/internal/support/NamespacePlugins.java index 8ca98eb7d..e70bc362b 100644 --- a/extender/src/main/java/org/springframework/osgi/extender/internal/support/NamespacePlugins.java +++ b/extender/src/main/java/org/springframework/osgi/extender/internal/support/NamespacePlugins.java @@ -60,19 +60,6 @@ private static class Plugin implements NamespaceHandlerResolver, EntityResolver private Plugin(Bundle bundle) { this.bundle = bundle; - -// ClassLoader springAopClassLoader = null; -// try { -// springAopClassLoader = BundleDelegatingClassLoader.class.getClassLoader().loadClass( -// "org.springframework.aop.framework.ProxyFactory").getClassLoader(); -// } -// catch (ClassNotFoundException ex) { -// throw new RuntimeException("cannot detect Spring AOP jar", ex); -// } -// - // the bundle classloader used for the namespace parser/resolver - // discovery and instantiation -// ClassLoader loader = BundleDelegatingClassLoader.createBundleClassLoaderFor(bundle, springAopClassLoader); ClassLoader loader = BundleDelegatingClassLoader.createBundleClassLoaderFor(bundle); entity = new DelegatingEntityResolver(loader); diff --git a/test-support/src/main/java/org/springframework/osgi/test/AbstractConfigurableOsgiTests.java b/test-support/src/main/java/org/springframework/osgi/test/AbstractConfigurableOsgiTests.java index d00012d55..75ead7efb 100644 --- a/test-support/src/main/java/org/springframework/osgi/test/AbstractConfigurableOsgiTests.java +++ b/test-support/src/main/java/org/springframework/osgi/test/AbstractConfigurableOsgiTests.java @@ -19,7 +19,9 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import java.util.Properties; +import org.osgi.framework.Constants; import org.springframework.osgi.test.platform.EquinoxPlatform; import org.springframework.osgi.test.platform.OsgiPlatform; import org.springframework.osgi.test.platform.Platforms; @@ -60,12 +62,6 @@ public AbstractConfigurableOsgiTests(String name) { */ public static final String OSGI_FRAMEWORK_SELECTOR = "org.springframework.osgi.test.framework"; - /** - * - */ - private static final String ORG_OSGI_FRAMEWORK_BOOTDELEGATION = "org.osgi.framework.bootdelegation"; - - /** * {@inheritDoc} * @@ -88,7 +84,7 @@ protected OsgiPlatform createPlatform() { Class platformClass = ClassUtils.resolveClassName(platformClassName, currentCL); if (OsgiPlatform.class.isAssignableFrom(platformClass)) { if (trace) - logger.trace("instantiating platform wrapper..."); + logger.trace("Instantiating platform wrapper..."); try { platform = (OsgiPlatform) platformClass.newInstance(); } @@ -97,7 +93,7 @@ protected OsgiPlatform createPlatform() { } } else - logger.warn("class [" + platformClass + "] does not implement " + OsgiPlatform.class.getName() + logger.warn("Class [" + platformClass + "] does not implement " + OsgiPlatform.class.getName() + " interface; falling back to defaults"); } else { @@ -106,14 +102,15 @@ protected OsgiPlatform createPlatform() { } else - logger.trace("no platform specified; using default"); + logger.trace("No platform specified; using default"); // fall back if (platform == null) platform = new EquinoxPlatform(); + Properties config = platform.getConfigurationProperties(); // add boot delegation - platform.getConfigurationProperties().setProperty(ORG_OSGI_FRAMEWORK_BOOTDELEGATION, + config.setProperty(Constants.FRAMEWORK_BOOTDELEGATION, getBootDelegationPackageString()); return platform; @@ -132,7 +129,7 @@ protected OsgiPlatform createPlatform() { protected String getPlatformName() { String systemProperty = System.getProperty(OSGI_FRAMEWORK_SELECTOR); if (logger.isTraceEnabled()) - logger.trace("system property [" + OSGI_FRAMEWORK_SELECTOR + "] has value=" + systemProperty); + logger.trace("System property [" + OSGI_FRAMEWORK_SELECTOR + "] has value=" + systemProperty); return (systemProperty == null ? Platforms.EQUINOX : systemProperty); } @@ -165,11 +162,16 @@ private String getBootDelegationPackageString() { */ protected List getBootDelegationPackages() { List defaults = new ArrayList(); + // javax packages defaults.add("javax.*"); + // XML API available in JDK 1.4 defaults.add("org.w3c.*"); - defaults.add("sun.*"); defaults.add("org.xml.*"); + + // sun packages + defaults.add("sun.*"); defaults.add("com.sun.*"); + // FIXME: the JAXP package (for 1.4 VMs) should be discovered in an OSGi // manner defaults.add("org.apache.xerces.jaxp.*"); diff --git a/test-support/src/main/java/org/springframework/osgi/test/AbstractDependencyManagerTests.java b/test-support/src/main/java/org/springframework/osgi/test/AbstractDependencyManagerTests.java index 156e274da..e926c18b2 100644 --- a/test-support/src/main/java/org/springframework/osgi/test/AbstractDependencyManagerTests.java +++ b/test-support/src/main/java/org/springframework/osgi/test/AbstractDependencyManagerTests.java @@ -164,7 +164,7 @@ protected String[] getTestFrameworkBundlesNames() { boolean trace = logger.isTraceEnabled(); if (trace) - logger.trace("loaded properties " + props); + logger.trace("Loaded properties " + props); // pass properties to test instance running inside OSGi space System.getProperties().put(SPRING_OSGI_VERSION_PROP_KEY, props.get(SPRING_OSGI_VERSION_PROP_KEY)); @@ -173,7 +173,7 @@ protected String[] getTestFrameworkBundlesNames() { Properties excluded = PropertiesUtil.filterKeysStartingWith(props, IGNORE); if (trace) { - logger.trace("excluded ignored properties " + excluded); + logger.trace("Excluded ignored properties " + excluded); } // filter bundles which are Tiger/JDK 1.5 specific @@ -191,7 +191,7 @@ protected String[] getTestFrameworkBundlesNames() { String[] bundles = (String[]) props.keySet().toArray(new String[props.size()]); if (logger.isDebugEnabled()) - logger.debug("default framework bundles :" + ObjectUtils.nullSafeToString(bundles)); + logger.debug("Default framework bundles :" + ObjectUtils.nullSafeToString(bundles)); return bundles; } @@ -239,7 +239,7 @@ protected Resource[] getTestFrameworkBundles() { * {@link #locateBundle(String)}. * * @param bundles bundle identifiers - * @return an array of Spring resources for the given bundle identifiers + * @return an array of Spring resources for the given bundle indentifiers */ protected Resource[] locateBundles(String[] bundles) { if (bundles == null) @@ -287,7 +287,6 @@ protected Resource locateBundle(String bundleId) { artifactId[i] = StringUtils.trimWhitespace(artifactId[i]); } - ArtifactLocator aLocator = getLocator(); return (artifactId.length == 3 ? aLocator.locateArtifact(artifactId[0], artifactId[1], artifactId[2]) diff --git a/test-support/src/main/java/org/springframework/osgi/test/AbstractOsgiTests.java b/test-support/src/main/java/org/springframework/osgi/test/AbstractOsgiTests.java index 66bfc0bce..35c980b8a 100644 --- a/test-support/src/main/java/org/springframework/osgi/test/AbstractOsgiTests.java +++ b/test-support/src/main/java/org/springframework/osgi/test/AbstractOsgiTests.java @@ -16,13 +16,8 @@ package org.springframework.osgi.test; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.util.Properties; import junit.framework.Protectable; import junit.framework.TestCase; @@ -30,17 +25,17 @@ import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; +import org.osgi.framework.BundleException; import org.osgi.framework.ServiceReference; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; import org.springframework.osgi.io.OsgiBundleResourceLoader; -import org.springframework.osgi.test.internal.OsgiJUnitTest; -import org.springframework.osgi.test.internal.util.ConfigurableByteArrayOutputStream; -import org.springframework.osgi.test.internal.util.IOUtils; +import org.springframework.osgi.test.internal.holder.OsgiTestInfoHolder; import org.springframework.osgi.test.internal.util.TestUtils; import org.springframework.osgi.test.platform.OsgiPlatform; import org.springframework.osgi.util.OsgiBundleUtils; import org.springframework.osgi.util.OsgiPlatformDetector; +import org.springframework.osgi.util.OsgiStringUtils; import org.springframework.util.Assert; import org.springframework.util.ReflectionUtils; @@ -68,11 +63,6 @@ public abstract class AbstractOsgiTests extends AbstractOptionalDependencyInject // JUnitService trigger private static Method serviceTrigger; - // streams for communicating with the OSGi realm. - private ObjectInputStream inputStream; - - private ObjectOutputStream outputStream; - // the test results used by the triggering test runner private TestResult originalResult; @@ -169,7 +159,7 @@ protected void postProcessBundleContext(BundleContext platformBundleContext) thr } // - // JUnit overriden methods. + // JUnit overridden methods. // /** @@ -214,7 +204,7 @@ public void runBare() throws Throwable { readTestResult(); } finally { - completeTestExecution(); + // nothing to clean up } } } @@ -240,7 +230,7 @@ private void startup() throws Exception { osgiPlatform = createPlatform(); // start platform if (debug) - logger.debug("about to start " + osgiPlatform); + logger.debug("About to start " + osgiPlatform); osgiPlatform.start(); // platform context platformContext = osgiPlatform.getBundleContext(); @@ -262,18 +252,7 @@ private void startup() throws Exception { // start bundles for (int i = 0; i < bundles.length; i++) { - String info = null; - if (debug) - info = "bundle " + bundles[i].getBundleId() + "[" + bundles[i].getSymbolicName() + "]"; - - if (!OsgiBundleUtils.isFragment(bundles[i])) { - if (debug) - logger.debug("starting " + info); - bundles[i].start(); - } - - else if (debug) - logger.debug(info + " is a fragment; start not invoked"); + startBundle(bundles[i]); } // hook after the OSGi platform has been setup @@ -326,30 +305,55 @@ private Bundle installBundle(Resource location) throws Exception { Assert.notNull(platformContext); Assert.notNull(location); if (logger.isDebugEnabled()) - logger.debug("installing bundle from location " + location.getDescription()); + logger.debug("Installing bundle from location " + location.getDescription()); return platformContext.installBundle(location.getDescription(), location.getInputStream()); } + /** + * Starts a bundle and prints a nice logging message in case of failure. + * + * @param bundle + * @return + * @throws BundleException + */ + private void startBundle(Bundle bundle) throws BundleException { + boolean debug = logger.isDebugEnabled(); + String info = "[" + OsgiStringUtils.nullSafeNameAndSymName(bundle) + "|" + bundle.getLocation() + "]"; + + if (!OsgiBundleUtils.isFragment(bundle)) { + if (debug) + logger.debug("Starting " + info); + try { + bundle.start(); + } + catch (BundleException ex) { + logger.error("cannot start bundle " + info, ex); + throw ex; + } + } + + else if (debug) + logger.debug(info + " is a fragment; start not invoked"); + } + // // Delegation methods for OSGi execution and initialization // + // runs outside OSGi /** * Prepares test execution - the OSGi platform will be started (if needed) * and cached for the test suite execution. - * */ private void prepareTestExecution() throws Exception { if (getName() == null) throw new IllegalArgumentException("no test specified"); - // write the test name into the System properties - System.getProperties().put(OsgiJUnitTest.OSGI_TEST, osgiJUnitTest.getClass().getName()); - - // create streams first to avoid deadlocks in setting up the stream on - // the OSGi side - setupStreams(); + // clear test results + OsgiTestInfoHolder.INSTANCE.clearResults(); + // set test class + OsgiTestInfoHolder.INSTANCE.setTestClassName(osgiJUnitTest.getClass().getName()); // start OSGi platform (the caching is done inside the method). try { @@ -360,11 +364,12 @@ private void prepareTestExecution() throws Exception { throw e; } - logger.debug("writing test name [" + getName() + "] to OSGi"); - // write test name to OSGi - outputStream.writeUTF(getName()); - outputStream.flush(); + if (logger.isTraceEnabled()) + logger.trace("Writing test name [" + getName() + "] to OSGi"); + // write test name to OSGi + // set test method name + OsgiTestInfoHolder.INSTANCE.setTestMethodName(getName()); } /** @@ -386,17 +391,6 @@ private void invokeOSGiTestExecution() throws Exception { } } - /** - * Finishes the test execution - read back the result from the OSGi copy and - * closes up the streams. - * - * @throws Exception - */ - private void completeTestExecution() { - IOUtils.closeStream(inputStream); - IOUtils.closeStream(outputStream); - } - /** * Determines through reflection the methods used for invoking the * TestRunnerService. @@ -433,8 +427,8 @@ private void initializeServiceRunnerInvocationMethods() throws Exception { */ private BundleContext getRuntimeBundleContext() { - // read the system property - Long id = (Long) System.getProperties().get(OsgiJUnitTest.OSGI_TEST_BUNDLE_ID); + // read test bundle id property + Long id = OsgiTestInfoHolder.INSTANCE.getTestBundleId(); BundleContext ctx = null; if (id != null) @@ -448,15 +442,16 @@ private BundleContext getRuntimeBundleContext() { return (ctx == null ? platformContext : ctx); } + // runs outside OSGi private void readTestResult() { - // finish stream creation (to avoid circular dependencies) - createInStream(); + if (logger.isTraceEnabled()) + logger.trace("Reading OSGi results for test [" + getName() + "]"); - logger.debug("reading OSGi results for test [" + getName() + "]"); + // copy results from OSGi into existing test result + TestUtils.cloneTestResults(OsgiTestInfoHolder.INSTANCE, originalResult, osgiJUnitTest); - TestUtils.receiveTestResult(this.originalResult, osgiJUnitTest, inputStream); - - logger.debug("test[" + getName() + "]'s result read"); + if (logger.isTraceEnabled()) + logger.debug("Test[" + getName() + "]'s result read"); } /** @@ -479,64 +474,19 @@ public void run() { * Cleanup for the test suite. */ private void shutdownTest() { - IOUtils.closeStream(inputStream); - IOUtils.closeStream(outputStream); - - logger.info("shutting down OSGi platform"); + logger.info("Shutting down OSGi platform"); if (osgiPlatform != null) { try { osgiPlatform.stop(); } catch (Exception ex) { // swallow - logger.warn("shutdown procedure threw exception " + ex); + logger.warn("Shutdown procedure threw exception " + ex); } osgiPlatform = null; } } - /** - * Setup the piped streams to get the results out from the OSGi world. - * - * @throws IOException - */ - private void setupStreams() throws IOException { - - byte[] inArray = new byte[1024 * 2]; - // 16K seems to be enough - byte[] outArray = new byte[1024 * 16]; - - Properties systemProps = System.getProperties(); - - // put information for OSGi - systemProps.put(OsgiJUnitTest.FOR_OSGI, inArray); - - // get information from OSGi - systemProps.put(OsgiJUnitTest.FROM_OSGI, outArray); - - // setup output stream to prevent blocking - outputStream = new ObjectOutputStream(new ConfigurableByteArrayOutputStream(inArray)); - // flush header right away - outputStream.flush(); - - logger.debug("opened writer to OSGi"); - } - - /** - * Utility method for creating the input communication stream. - */ - private void createInStream() { - try { - byte[] inputSource = (byte[]) System.getProperties().get(OsgiJUnitTest.FROM_OSGI); - inputStream = new ObjectInputStream(new ByteArrayInputStream(inputSource)); - logger.debug("opened reader from OSGi"); - } - catch (IOException ex) { - throw new RuntimeException("cannot open streams; it's likely the osgi test execution failed;" + ex); - } - - } - // // OsgiJUnitTest execution hooks. Used by the test framework. // diff --git a/test-support/src/main/java/org/springframework/osgi/test/JUnitTestActivator.java b/test-support/src/main/java/org/springframework/osgi/test/JUnitTestActivator.java index 1db29cb5a..8d9b493b1 100644 --- a/test-support/src/main/java/org/springframework/osgi/test/JUnitTestActivator.java +++ b/test-support/src/main/java/org/springframework/osgi/test/JUnitTestActivator.java @@ -28,6 +28,8 @@ import org.osgi.framework.ServiceRegistration; import org.springframework.osgi.test.internal.OsgiJUnitTest; import org.springframework.osgi.test.internal.TestRunnerService; +import org.springframework.osgi.test.internal.holder.HolderLoader; +import org.springframework.osgi.test.internal.holder.OsgiTestInfoHolder; import org.springframework.osgi.test.internal.support.OsgiJUnitTestAdapter; import org.springframework.osgi.util.OsgiServiceUtils; @@ -77,9 +79,10 @@ void executeTest() { * @return */ private OsgiJUnitTest loadTest() { - String testClass = System.getProperty(OsgiJUnitTest.OSGI_TEST); + OsgiTestInfoHolder holder = HolderLoader.INSTANCE.getHolder(); + String testClass = holder.getTestClassName(); if (testClass == null) - throw new IllegalArgumentException("no test class specified under " + OsgiJUnitTest.OSGI_TEST); + throw new IllegalArgumentException("no test class specified"); try { // use bundle to load the classes diff --git a/test-support/src/main/java/org/springframework/osgi/test/internal/OsgiJUnitTest.java b/test-support/src/main/java/org/springframework/osgi/test/internal/OsgiJUnitTest.java index 3cf345f5a..8a26f56ab 100644 --- a/test-support/src/main/java/org/springframework/osgi/test/internal/OsgiJUnitTest.java +++ b/test-support/src/main/java/org/springframework/osgi/test/internal/OsgiJUnitTest.java @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.springframework.osgi.test.internal; import junit.framework.TestCase; @@ -29,27 +30,6 @@ */ public interface OsgiJUnitTest { - /** - * Lookup marker for "to-OSGi" communication channel. - */ - static final String FOR_OSGI = OsgiJUnitTest.class.getName() + "-osgi[in]"; - - /** - * Lookup marker for "from-OSGi" communication channel. - */ - static final String FROM_OSGI = OsgiJUnitTest.class.getName() + "-osgi[out]"; - - /** - * Lookup marker for the test suite that is executed inside the OSGi - * container. - */ - static final String OSGI_TEST = OsgiJUnitTest.class.getName() + "-test"; - - /** - * System property name used to pass around the spring-osgi-test bundle id. - */ - static final String OSGI_TEST_BUNDLE_ID = OsgiJUnitTest.class.getName() + "-bundle.id"; - /** * Replacement for the 'traditional' setUp. Called by TestRunnerService. * @@ -68,12 +48,14 @@ public interface OsgiJUnitTest { /** * Replacement for the 'traditional' runTest. Called by TestRunnerService. + * * @throws Throwable */ void osgiRunTest() throws Throwable; /** * Provides the OSGi bundle context to the test + * * @param bundleContext */ void injectBundleContext(BundleContext bundleContext); diff --git a/test-support/src/main/java/org/springframework/osgi/test/internal/holder/HolderLoader.java b/test-support/src/main/java/org/springframework/osgi/test/internal/holder/HolderLoader.java new file mode 100644 index 000000000..c879a4646 --- /dev/null +++ b/test-support/src/main/java/org/springframework/osgi/test/internal/holder/HolderLoader.java @@ -0,0 +1,79 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.test.internal.holder; + +import java.lang.reflect.Field; + +import org.osgi.framework.Bundle; +import org.springframework.util.ReflectionUtils; + +/** + * Specific OSGi loader for OsgiTestHolder. It's main usage is to load the + * holder using a class-loader outside the OSGi world and to store results + * there. + * + *

Boot delegation should work here but each platform has its own approach. + * Notably, Equinox uses by default the boot (not the app) classloader which + * means the classpath used for starting OSGi is not seen. To not interfere with + * the default configuration which might change in the future (it has been + * changed between 3.2 and 3.3) and to not impose restrictions on the test + * usage, the loader manually discovers the proper classloader and uses it to + * load the holder class. Inside OSGi, special care must be taken to make sure + * no CCE are generated. + * + * @author Costin Leau + * + */ +public class HolderLoader { + + private static final String INSTANCE_FIELD = "INSTANCE"; + + private static final String HOLDER_CLASS_NAME = "org.springframework.osgi.test.internal.holder.OsgiTestInfoHolder"; + + public static final HolderLoader INSTANCE = new HolderLoader(); + + private final OsgiTestInfoHolder holder; + + + public HolderLoader() { + // use the app ClassLoader + ClassLoader appCL = Bundle.class.getClassLoader(); + Class clazz; + try { + clazz = appCL.loadClass(HOLDER_CLASS_NAME); + } + catch (Exception ex) { + throw (RuntimeException) new IllegalStateException("cannot properly load class " + HOLDER_CLASS_NAME).initCause(ex); + } + // get the static instance + Field field = ReflectionUtils.findField(clazz, INSTANCE_FIELD, clazz); + Object instance; + try { + instance = field.get(null); + } + catch (Exception ex) { + throw (RuntimeException) new IllegalStateException("cannot read property " + INSTANCE_FIELD).initCause(ex); + } + // once the class is loaded return it wrapped through it's OSGi instance + holder = new ReflectionOsgiHolder(instance); + } + + public OsgiTestInfoHolder getHolder() { + return holder; + } + +} diff --git a/test-support/src/main/java/org/springframework/osgi/test/internal/holder/OsgiTestInfoHolder.java b/test-support/src/main/java/org/springframework/osgi/test/internal/holder/OsgiTestInfoHolder.java new file mode 100644 index 000000000..1f5be75bd --- /dev/null +++ b/test-support/src/main/java/org/springframework/osgi/test/internal/holder/OsgiTestInfoHolder.java @@ -0,0 +1,129 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.test.internal.holder; + +import java.util.ArrayList; +import java.util.List; + +/** + * Custom class used for storing JUnit test results. To work, this class should + * always be loaded through the same class loader, to transport + * information from OSGi to the outside world. + * + * @author Costin Leau + * + */ +public class OsgiTestInfoHolder { + + /** JUnit test problems */ + private List testFailures = new ArrayList(4); + private List testErrors = new ArrayList(4); + + /** test bundle id */ + private Long testBundleId; + /** test class name */ + private String testClassName; + /** test method name */ + private String testMethodName; + + /** static instance */ + public static final OsgiTestInfoHolder INSTANCE = new OsgiTestInfoHolder(); + + + /** + * + * Constructs a new OsgiTestInfoHolder instance. + */ + public OsgiTestInfoHolder() { + } + + /** + * Returns the testBundleId. + * + * @return Returns the testBundleId + */ + public Long getTestBundleId() { + return testBundleId; + } + + /** + * @param testBundleId The testBundleId to set. + */ + public void setTestBundleId(Long testBundleId) { + this.testBundleId = testBundleId; + } + + /** + * Returns the testClassName. + * + * @return Returns the testClassName + */ + public String getTestClassName() { + return testClassName; + } + + /** + * @param testClassName The testClassName to set. + */ + public void setTestClassName(String testClassName) { + this.testClassName = testClassName; + } + + /** + * @param testProblem The testResult to set. + */ + public void addTestFailure(Throwable testProblem) { + // TODO: unpack exception to prevent classloader leaks + testFailures.add(testProblem); + } + + public void addTestError(Throwable testProblem) { + testErrors.add(testProblem); + } + + /** + * Returns the testMethodName. + * + * @return Returns the testMethodName + */ + public String getTestMethodName() { + return testMethodName; + } + + /** + * @param testMethodName The testMethodName to set. + */ + public void setTestMethodName(String testMethodName) { + this.testMethodName = testMethodName; + } + + public List getTestFailures() { + return testFailures; + } + + public List getTestErrors() { + return testErrors; + } + + /** + * Clear all information. Used between test runs to clear results. + */ + public void clearResults() { + testFailures.clear(); + testErrors.clear(); + } +} diff --git a/test-support/src/main/java/org/springframework/osgi/test/internal/holder/ReflectionOsgiHolder.java b/test-support/src/main/java/org/springframework/osgi/test/internal/holder/ReflectionOsgiHolder.java new file mode 100644 index 000000000..6050941cf --- /dev/null +++ b/test-support/src/main/java/org/springframework/osgi/test/internal/holder/ReflectionOsgiHolder.java @@ -0,0 +1,79 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.test.internal.holder; + +import java.lang.reflect.Method; + +import org.springframework.util.Assert; +import org.springframework.util.ReflectionUtils; + +/** + * OSGi adapter for the information holder. Overrides the methods used inside + * OSGi to use reflection and avoid CCE. + * + * @author Costin Leau + * + */ +class ReflectionOsgiHolder extends OsgiTestInfoHolder { + + private final Object instance; + + private final Method GET_TEST_BUNDLE_ID, GET_TEST_CLASS_NAME, GET_TEST_METHOD_NAME, ADD_TEST_ERROR, + ADD_TEST_FAILURE; + + + /** + * Constructs a new OsgiTestInfoHolder instance wrapping the + * given object and accessing it through reflection. This constructor is + * used for accessing the instance loaded outside OSGi, from within OSGi. + * + * @param twinInstance + */ + ReflectionOsgiHolder(Object twinInstance) { + Assert.notNull(twinInstance); + this.instance = twinInstance; + Class clazz = instance.getClass(); + GET_TEST_BUNDLE_ID = ReflectionUtils.findMethod(clazz, "getTestBundleId"); + GET_TEST_CLASS_NAME = ReflectionUtils.findMethod(clazz, "getTestClassName"); + GET_TEST_METHOD_NAME = ReflectionUtils.findMethod(clazz, "getTestMethodName"); + + ADD_TEST_ERROR = ReflectionUtils.findMethod(clazz, "addTestError", new Class[] { Throwable.class }); + ADD_TEST_FAILURE = ReflectionUtils.findMethod(clazz, "addTestFailure", new Class[] { Throwable.class }); + + } + + public Long getTestBundleId() { + return (Long) ReflectionUtils.invokeMethod(GET_TEST_BUNDLE_ID, instance); + } + + public String getTestClassName() { + return (String) ReflectionUtils.invokeMethod(GET_TEST_CLASS_NAME, instance); + } + + public String getTestMethodName() { + return (String) ReflectionUtils.invokeMethod(GET_TEST_METHOD_NAME, instance); + } + + public void addTestError(Throwable testProblem) { + ReflectionUtils.invokeMethod(ADD_TEST_ERROR, instance, new Object[] { testProblem }); + } + + public void addTestFailure(Throwable testProblem) { + ReflectionUtils.invokeMethod(ADD_TEST_FAILURE, instance, new Object[] { testProblem }); + } + +} diff --git a/test-support/src/main/java/org/springframework/osgi/test/internal/support/Activator.java b/test-support/src/main/java/org/springframework/osgi/test/internal/support/Activator.java index 3ec65fb6f..413bf9de4 100644 --- a/test-support/src/main/java/org/springframework/osgi/test/internal/support/Activator.java +++ b/test-support/src/main/java/org/springframework/osgi/test/internal/support/Activator.java @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.springframework.osgi.test.internal.support; import java.util.Hashtable; @@ -20,12 +21,12 @@ import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceRegistration; -import org.springframework.osgi.test.internal.OsgiJUnitTest; import org.springframework.osgi.test.internal.TestRunnerService; +import org.springframework.osgi.test.internal.holder.HolderLoader; /** - * Default activator for Spring/OSGi test support. This class can be seen as the 'server-side' of the framework, - * which register the OsgiJUnitTest executor. + * Default activator for Spring/OSGi test support. This class can be seen as the + * 'server-side' of the framework, which register the OsgiJUnitTest executor. * * @author Costin Leau * @@ -34,23 +35,16 @@ public class Activator implements BundleActivator { private ServiceRegistration registration; - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) - */ + public void start(BundleContext context) throws Exception { - registration = context.registerService(TestRunnerService.class.getName(), new OsgiJUnitService(), new Hashtable()); - - // add also the bundle id so that AbstractOsgiTest can determine its BundleContext when used in an environment - // where the system bundle is treated as a special case (such as mBeddedServer). - System.getProperties().put(OsgiJUnitTest.OSGI_TEST_BUNDLE_ID, new Long(context.getBundle().getBundleId())); + registration = context.registerService(TestRunnerService.class.getName(), new OsgiJUnitService(), + new Hashtable()); + // add also the bundle id so that AbstractOsgiTest can determine its BundleContext when used in an environment + // where the system bundle is treated as a special case. + HolderLoader.INSTANCE.getHolder().setTestBundleId(new Long(context.getBundle().getBundleId())); } - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) - */ public void stop(BundleContext context) throws Exception { // unregister the service even though the framework should do this automatically if (registration != null) diff --git a/test-support/src/main/java/org/springframework/osgi/test/internal/support/OsgiJUnitService.java b/test-support/src/main/java/org/springframework/osgi/test/internal/support/OsgiJUnitService.java index 4677a7ac4..feb6d8922 100644 --- a/test-support/src/main/java/org/springframework/osgi/test/internal/support/OsgiJUnitService.java +++ b/test-support/src/main/java/org/springframework/osgi/test/internal/support/OsgiJUnitService.java @@ -13,12 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.osgi.test.internal.support; -import java.io.ByteArrayInputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.util.Properties; +package org.springframework.osgi.test.internal.support; import junit.framework.Protectable; import junit.framework.Test; @@ -29,8 +25,8 @@ import org.apache.commons.logging.LogFactory; import org.springframework.osgi.test.internal.OsgiJUnitTest; import org.springframework.osgi.test.internal.TestRunnerService; -import org.springframework.osgi.test.internal.util.ConfigurableByteArrayOutputStream; -import org.springframework.osgi.test.internal.util.IOUtils; +import org.springframework.osgi.test.internal.holder.HolderLoader; +import org.springframework.osgi.test.internal.holder.OsgiTestInfoHolder; import org.springframework.osgi.test.internal.util.TestUtils; /** @@ -43,31 +39,6 @@ public class OsgiJUnitService implements TestRunnerService { private static final Log log = LogFactory.getLog(OsgiJUnitService.class); - /** - * Write the test result. - */ - private ObjectOutputStream outStream; - - /** - * Read the test name to execute. - */ - private ObjectInputStream inStream; - - protected void setupStreams() throws Exception { - Properties props = System.getProperties(); - - byte[] outSource = (byte[]) props.get(OsgiJUnitTest.FROM_OSGI); - this.outStream = new ObjectOutputStream(new ConfigurableByteArrayOutputStream(outSource)); - // write header - this.outStream.flush(); - - log.debug("opened writer to OSGi-outside"); - - byte[] inSource = (byte[]) props.get(OsgiJUnitTest.FOR_OSGI); - this.inStream = new ObjectInputStream(new ByteArrayInputStream(inSource)); - - log.debug("opened reader for OSGi"); - } public void runTest(OsgiJUnitTest test) { try { @@ -88,22 +59,21 @@ public void runTest(OsgiJUnitTest test) { * @throws Exception */ protected void executeTest(OsgiJUnitTest test) throws Exception { - try { - setupStreams(); - - // read the test to be executed - String testName = inStream.readUTF(); - // execute the test - TestResult result = runTest(test, testName); - - log.debug("sending test results from OSGi"); - // write result back to the stream - TestUtils.sendTestResult(result, outStream); - } - finally { - IOUtils.closeStream(outStream); - IOUtils.closeStream(inStream); - } + // create holder + // since we're inside OSGi, we have to use the special loading procedure + OsgiTestInfoHolder holder = HolderLoader.INSTANCE.getHolder(); + + // read the test to be executed + String testName = holder.getTestMethodName(); + if (log.isDebugEnabled()) + log.debug("Reading test [" + testName + "] for execution inside OSGi"); + // execute the test + TestResult result = runTest(test, testName); + + if (log.isDebugEnabled()) + log.debug("Sending test results from OSGi"); + // write result back to the outside world + TestUtils.unpackProblems(result, holder); } /** @@ -113,11 +83,11 @@ protected void executeTest(OsgiJUnitTest test) throws Exception { * @param testName */ protected TestResult runTest(final OsgiJUnitTest osgiTestExtensions, String testName) { - - log.debug("running test [" + testName + "] on testCase " + osgiTestExtensions); + if (log.isDebugEnabled()) + log.debug("Running test [" + testName + "] on testCase " + osgiTestExtensions); final TestResult result = new TestResult(); TestCase rawTest = osgiTestExtensions.getTestCase(); - + rawTest.setName(testName); try { diff --git a/test-support/src/main/java/org/springframework/osgi/test/internal/util/TestUtils.java b/test-support/src/main/java/org/springframework/osgi/test/internal/util/TestUtils.java index df2717891..449efc90c 100644 --- a/test-support/src/main/java/org/springframework/osgi/test/internal/util/TestUtils.java +++ b/test-support/src/main/java/org/springframework/osgi/test/internal/util/TestUtils.java @@ -13,21 +13,27 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.springframework.osgi.test.internal.util; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Enumeration; import java.util.Iterator; import java.util.List; +import java.util.Vector; import junit.framework.AssertionFailedError; import junit.framework.Test; import junit.framework.TestFailure; import junit.framework.TestResult; +import org.springframework.osgi.test.internal.holder.OsgiTestInfoHolder; +import org.springframework.util.ReflectionUtils; + /** * Utility class for running OSGi-JUnit tests. * @@ -39,6 +45,9 @@ public abstract class TestUtils { /** * Serialize the test result using the given OutputStream. * + * @deprecated will be removed in 1.1.0 w/o a replacement. the test + * framework relies on classloading instead of serialization. + * * @param result * @param stream */ @@ -71,6 +80,9 @@ public static void sendTestResult(TestResult result, ObjectOutputStream stream) * Deserialize testResult from the given ObjectInputStream. The loaded * failures/errors are added to the given testResult. * + * @deprecated will be removed in 1.1.0 w/o a replacement. the test + * framework relies on classloading instead of serialization. + * * @param testResult the test result to which the properties are added * @param stream the stream used to load the test result * @param test the test used for adding the TestResult errors/failures @@ -98,4 +110,71 @@ public static void receiveTestResult(TestResult testResult, Test test, ObjectInp testResult.addFailure(test, (AssertionFailedError) iter.next()); } } + + /** + * Clones the test result from a TestResult loaded through a different + * classloader. + * + * @param source test result loaded through a different classloader + * @param destination test result reported to the outside framework + * @param test initial test used for bootstrapping the integration framework + * @return cloned test result + */ + public static TestResult cloneTestResults(OsgiTestInfoHolder source, TestResult destination, Test test) { + // since we cannot cast, we have to use reflection + + // List errors; + // List failures; + // + // { + // Field errorsField = ReflectionUtils.findField(source.getClass(), "fErrors", Vector.class); + // ReflectionUtils.makeAccessible(errorsField); + // Field failuresField = ReflectionUtils.findField(source.getClass(), "fFailures", Vector.class); + // ReflectionUtils.makeAccessible(failuresField); + // try { + // errors = (List) errorsField.get(source); + // failures = (List) failuresField.get(source); + // } + // catch (IllegalAccessException iae) { + // throw (RuntimeException) new IllegalStateException("cannot access test results fields").initCause(iae); + // } + // } + + // get errors + for (Iterator iter = source.getTestErrors().iterator(); iter.hasNext();) { + destination.addError(test, (Throwable) iter.next()); + } + + // get failures + // since failures are a special JUnit error, we have to clone the stack + for (Iterator iter = source.getTestFailures().iterator(); iter.hasNext();) { + Throwable originalFailure = (Throwable) iter.next(); + AssertionFailedError clonedFailure = new AssertionFailedError(originalFailure.getMessage()); + clonedFailure.setStackTrace(originalFailure.getStackTrace()); + destination.addFailure(test, clonedFailure); + } + + return destination; + } + + /** + * Utility method which extracts the information from a TestResult and + * stores it as primordial classes. This avoids the use of reflection when + * reading the results outside OSGi. + * + * @param result + * @param holder + */ + public static void unpackProblems(TestResult result, OsgiTestInfoHolder holder) { + Enumeration errors = result.errors(); + while (errors.hasMoreElements()) { + TestFailure failure = (TestFailure) errors.nextElement(); + holder.addTestError(failure.thrownException()); + } + Enumeration failures = result.failures(); + while (failures.hasMoreElements()) { + TestFailure failure = (TestFailure) failures.nextElement(); + holder.addTestFailure(failure.thrownException()); + } + } } diff --git a/test-support/src/main/java/org/springframework/osgi/test/platform/EquinoxPlatform.java b/test-support/src/main/java/org/springframework/osgi/test/platform/EquinoxPlatform.java index 0bcfbc7d0..68d571eea 100644 --- a/test-support/src/main/java/org/springframework/osgi/test/platform/EquinoxPlatform.java +++ b/test-support/src/main/java/org/springframework/osgi/test/platform/EquinoxPlatform.java @@ -52,6 +52,8 @@ protected Properties getPlatformProperties() { props.setProperty("osgi.instance.area", "eclipse_config"); props.setProperty("osgi.user.area", "eclipse_config"); + // props.setProperty("osgi.java.profile.bootdelegation", "ignore"); + // props.setProperty("eclipse.consoleLog", "true"); // props.setProperty("osgi.debug", ""); diff --git a/test-support/src/test/java/org/springframework/osgi/test/JUnitTestActivatorTest.java b/test-support/src/test/java/org/springframework/osgi/test/JUnitTestActivatorTest.java index 4f52e7693..ec2d0aeab 100644 --- a/test-support/src/test/java/org/springframework/osgi/test/JUnitTestActivatorTest.java +++ b/test-support/src/test/java/org/springframework/osgi/test/JUnitTestActivatorTest.java @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.springframework.osgi.test; import java.lang.reflect.Field; @@ -28,17 +29,21 @@ import org.springframework.osgi.mock.MockServiceReference; import org.springframework.osgi.test.internal.OsgiJUnitTest; import org.springframework.osgi.test.internal.TestRunnerService; +import org.springframework.osgi.test.internal.holder.OsgiTestInfoHolder; public class JUnitTestActivatorTest extends TestCase { private JUnitTestActivator activator; + // private ServiceRegistration registration; // private ServiceReference reference; public static class TestExample extends TestCase implements OsgiJUnitTest { + private static BundleContext context; + public void osgiSetUp() throws Exception { } @@ -70,9 +75,10 @@ public Bundle findBundleBySymbolicName(String bundleSymbolicName) { public TestCase getTestCase() { return this; } - + } + protected void setUp() throws Exception { activator = new JUnitTestActivator(); // reference = new MockServiceReference(); @@ -149,7 +155,7 @@ public void testLoadTest() throws Exception { servCtrl.replay(); setActivatorField("context", ctx); - System.setProperty(OsgiJUnitTest.OSGI_TEST, TestExample.class.getName()); + OsgiTestInfoHolder.INSTANCE.setTestClassName(TestExample.class.getName()); activator.executeTest(); assertSame(ctx, TestExample.context); diff --git a/test-support/src/test/java/org/springframework/osgi/test/internal/StreamCorruption.java b/test-support/src/test/java/org/springframework/osgi/test/internal/StreamCorruption.java deleted file mode 100644 index cf8af0cf6..000000000 --- a/test-support/src/test/java/org/springframework/osgi/test/internal/StreamCorruption.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2006-2008 the original author or authors. - * - * Licensed 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.springframework.osgi.test.internal; - -import java.io.ByteArrayInputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.lang.reflect.Method; - -import junit.framework.TestCase; - -import org.springframework.osgi.test.AbstractDependencyManagerTests; -import org.springframework.osgi.test.AbstractOsgiTests; -import org.springframework.osgi.test.internal.util.ConfigurableByteArrayOutputStream; - -/** - * Test JUnit stream corruption; basically test that the stream size is suitable - * enought. - * - * @author Costin Leau - * - */ -public class StreamCorruption extends TestCase { - - private ObjectInputStream in; - private ObjectOutputStream out; - private AbstractOsgiTests osgiTest; - - /* - * (non-Javadoc) - * - * @see junit.framework.TestCase#setUp() - */ - protected void setUp() throws Exception { - osgiTest = new AbstractDependencyManagerTests() { - }; - - // call AbstractOsgiTest to setup the streams - invokeOsgiTestMethod(osgiTest, "setupStreams"); - //osgiTest.setupStreams(); - } - - /* - * (non-Javadoc) - * - * @see junit.framework.TestCase#tearDown() - */ - protected void tearDown() throws Exception { - if (in != null) { - try { - in.close(); - } - catch (Exception ex) { - // ignore - } - } - - if (out != null) { - try { - out.close(); - } - catch (Exception ex) { - // ignore - } - } - - invokeOsgiTestMethod(osgiTest, "completeTestExecution"); - } - - public void testOutputStreamSize() throws Exception { - Throwable throwable; - - // build a huge stacktrace - try { - try { - try { - throw new IllegalArgumentException("root cause").fillInStackTrace(); - } - catch (Throwable ex1) { - throw new UnsupportedOperationException().initCause(ex1).fillInStackTrace(); - } - } - catch (Throwable ex2) { - throw new UnsupportedOperationException().initCause(ex2).fillInStackTrace(); - } - } - catch (Throwable ex3) { - new Exception("foo-bar", - new Exception(new Exception(new Exception(new Exception(new RuntimeException(new RuntimeException( - new ClassNotFoundException("boo", new RuntimeException(ex3)))))))).fillInStackTrace()); - - throwable = ex3; - } - - byte[] array = (byte[]) System.getProperties().get(OsgiJUnitTest.FROM_OSGI); - - out = new ObjectOutputStream(new ConfigurableByteArrayOutputStream(array)); - - // write the exception - out.writeObject(throwable); - out.flush(); - - in = new ObjectInputStream(new ByteArrayInputStream(array)); - Throwable read = (Throwable) in.readObject(); - assertEquals(throwable.getMessage(), read.getMessage()); - assertEquals(throwable.getClass(), read.getClass()); - } - - private void invokeOsgiTestMethod(Object obj, String name) throws Exception { - Method method = AbstractOsgiTests.class.getDeclaredMethod(name, null); - method.setAccessible(true); - method.invoke(obj, null); - } - -// private Object readField(Object obj, String name) throws Exception { -// Field field = obj.getClass().getDeclaredField(name); -// field.setAccessible(true); -// return field.get(obj); -// } -// -// private void writeField(Object obj, String name, Object value) throws Exception { -// Field field = obj.getClass().getDeclaredField(name); -// field.setAccessible(true); -// field.set(obj, value); -// } -} From ebfebd465e7cb6acd42739eb42a5a16ccea64636 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Fri, 22 Feb 2008 15:31:53 +0000 Subject: [PATCH 08/53] + backported some documentation fixes OSGI-351 OSGI-345 OSGI-363 --- docs/src/docbkx/faq.xml | 49 +++++++++++++++++++ docs/src/docbkx/reference/deployment.xml | 27 ++++++++-- .../src/docbkx/reference/service-registry.xml | 2 +- 3 files changed, 74 insertions(+), 4 deletions(-) diff --git a/docs/src/docbkx/faq.xml b/docs/src/docbkx/faq.xml index e8d21cd5e..32f3bfd21 100644 --- a/docs/src/docbkx/faq.xml +++ b/docs/src/docbkx/faq.xml @@ -246,6 +246,44 @@ url="http://radio.weblogs.com/0122027/2003/08/15.html">#1 #2 +

+ +
+ I have to use commons-logging, what can I do? + + If you have to use commons-logging (for example the jar is required by certain bundles) + then try using the most recent version commons-logging version (1.1+) as it provides more options + on the discovery process. Below are some settings that can be used to make commons-logging work + inside an OSGi environment: + + + + 1.0.x + + Unfortunately, commons-logging 1.0.x uses the thread context class loader (TCCL) always for loading + loggers implementations. Inside an OSGi environment, the TCCL is undefined and cannot be relied upon. + Since managing the TCCL is almost impossible as most loggers are defined as static fields that need to + resolved on class loading, using a different LogFactory is advised. One can use + the org.apache.commons.logging.LogFactory system property to specify a different + log factory however, the commons-logging bundle should be able to load this class. + + + 1.1.x + If using commons logging 1.1.x, one can turn off the tccl usage through use_tccl + property, part of the commons-logging.properties file. + . Additionally, + 1.1.x provides several system properties (such as org.apache.commons.logging.Log.allowFlawedContext, + org.apache.commons.logging.Log.allowFlawedDiscovery and + org.apache.commons.logging.Log.allowFlawedHierarchy) that can change the behavious of the discovery process. + See the LogFactoryImpl + javadoc for more details. + + + + In our tests, commons logging 1.1.x can be used with reasonable success inside OSGi. We haven't been able to find a generic + configuration for commons logging 1.0.x that works and that does not rely on fragile hacks dependent on the running environment. +
@@ -356,11 +394,22 @@ When using Spring-DM integration testing I get an exception about serialVersionUID. What is the problem? + This problem occurs on Spring DM versions up to 1.0 - consider upgrading to 1.0.1 or better. If you are stuck with 1.0 see below. When running an integration test, Spring-DM will duplicate the test instance and execute it inside OSGi. To avoid problems like this one, make sure you are using the same libraries (with the same version) as Spring-DM when running your test. This particular problem for example is caused by a JUnit 3.8.2 vs 3.8.x serialization compatibility. Make sure that you are using at least JUnit 3.8.2 for the execution of your tests. +
+ +
+ I've just updated my Spring DM library and now I get a <emphasis>LinkageError</emphasis>. How can I solve this? + + + The above error indicates that some classes, dependend on by others, have a different, incompatible version then the one required. + Normally this occur with workspaces (such as Eclipse) that are corrupt or stale. Consider doing a complete clean build or, in case of + Eclipse, creating a new workspace. +
\ No newline at end of file diff --git a/docs/src/docbkx/reference/deployment.xml b/docs/src/docbkx/reference/deployment.xml index f3c61eb9c..303dbabb1 100644 --- a/docs/src/docbkx/reference/deployment.xml +++ b/docs/src/docbkx/reference/deployment.xml @@ -305,8 +305,28 @@ context ::= path ( ';' path ) * (';' directive) * + + +
+ Spring XML authoring support + + Spring 2.0 introduced (among other things) + easier XML configuration and + extensible XML authoring. The latter gives the ability of creating custom schemas that are discovered automatically (in non-OSGi environment) + by the Spring XML infrastructure by including them in the classpath. Spring-DM is aware of this process and supports it in OSGi environments so + that custom schemas are available to bundles that use them without any extra code or manifest declaration. + All bundles deployed in the OSGi space (whether they are Spring-powered or not) are scanned by Spring-DM for + custom Spring namespace declaration (by checking the bundle space forMETA-INF/spring.handlers and + META-INF/spring.schemas). If these are found, Spring-DM will make the schemas and the namespaces available through an OSGi + service that will be automatically used by Spring-powered bundles. This mean that if you deploy a bundle that uses a custom schema, all you have to do + is deploy the library that provides the namespace parser and the schema. + Bundles that embedded inside their classpath libraries that provide custom schemas will use these over those available in the OSGi space. However, + the namespaces of the embedded libraries will not shared with other bundles, that is, they will not be seen by any other bundle. + + In short, with using Spring-DM, custom Spring namespaces are supported transparently without any additional work. Embedded namespace providers will + have priority but will not be shared, as opposed to providers deployed as bundles which will be seen (and used) by others.
- +
Importing and Exporting packages @@ -378,7 +398,7 @@ context ::= path ( ';' path ) * (';' directive) * workarounds.
-
+
Diagnosing problems Your chosen OSGi platform implementation should be able to provide @@ -404,5 +424,6 @@ context ::= path ( ';' path ) * (';' directive) * the FAQ and Resources pages for more information on other logging libraries besides log4j. -
+
+ diff --git a/docs/src/docbkx/reference/service-registry.xml b/docs/src/docbkx/reference/service-registry.xml index ec629dff3..d1d76fc5c 100644 --- a/docs/src/docbkx/reference/service-registry.xml +++ b/docs/src/docbkx/reference/service-registry.xml @@ -318,7 +318,7 @@ public interface SubInterface extends SuperInterface {}]]> - +
]]> The Spring Dynamic Modules roadmap includes support for From 98a04c9fd560e035969fd07ea3176520a3fafae0 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Fri, 22 Feb 2008 17:21:44 +0000 Subject: [PATCH 09/53] OSGI-365 backport the manifest generation takes into accounts the classes available in the test bundle and generates imports for the missing ones --- changelog.txt | 2 + .../AbstractOnTheFlyBundleCreatorTests.java | 54 +++++++++++---- .../LocalFileSystemMavenRepository.java | 6 +- .../packageA/BaseClassFromAnotherPackage.java | 37 +++++++++++ .../BaseClassFromAnotherPackageAndBundle.java | 31 +++++++++ ...ifferentParentsInDifferentBundlesTest.java | 65 +++++++++++++++++++ .../TestInDifferentPackageThenItsParents.java | 55 ++++++++++++++++ 7 files changed, 234 insertions(+), 16 deletions(-) create mode 100644 test-support/src/test/java/org/springframework/osgi/test/parsing/packageA/BaseClassFromAnotherPackage.java create mode 100644 test-support/src/test/java/org/springframework/osgi/test/parsing/packageB/BaseClassFromAnotherPackageAndBundle.java create mode 100644 test-support/src/test/java/org/springframework/osgi/test/parsing/packageC/DifferentParentsInDifferentBundlesTest.java create mode 100644 test-support/src/test/java/org/springframework/osgi/test/parsing/packageC/TestInDifferentPackageThenItsParents.java diff --git a/changelog.txt b/changelog.txt index ce2fd33bf..6ba4b43cb 100644 --- a/changelog.txt +++ b/changelog.txt @@ -18,6 +18,7 @@ Package org.springframework.osgi.test * custom artifact locators can be used with AbstractDependencyManagerTests * removed all internal usage of system properties by the testing infrastructure * removed the use of serialization inside the testing framework +* improved automatic manifest generation by parsing only the test parents that are available in the test bundle Changes in version 1.0 final (2008-01-25) @@ -45,6 +46,7 @@ Package org.springframework.osgi.util * BundleDelegatingClassLoader uses a degradable logger to properly report error messages when the logging implementation is misconfigured or the logging classes are not loaded yet + Changes in version 1.0 RC2 (2008-01-11) --------------------------------------- diff --git a/test-support/src/main/java/org/springframework/osgi/test/AbstractOnTheFlyBundleCreatorTests.java b/test-support/src/main/java/org/springframework/osgi/test/AbstractOnTheFlyBundleCreatorTests.java index a36783981..bd58ec329 100644 --- a/test-support/src/main/java/org/springframework/osgi/test/AbstractOnTheFlyBundleCreatorTests.java +++ b/test-support/src/main/java/org/springframework/osgi/test/AbstractOnTheFlyBundleCreatorTests.java @@ -149,7 +149,7 @@ protected Manifest getManifest() { String manifestLocation = getManifestLocation(); if (StringUtils.hasText(manifestLocation)) { - logger.info("using Manifest from specified location=[" + getManifestLocation() + "]"); + logger.info("Using Manifest from specified location=[" + getManifestLocation() + "]"); DefaultResourceLoader loader = new DefaultResourceLoader(); manifest = createManifestFrom(loader.getResource(manifestLocation)); } @@ -167,14 +167,14 @@ protected Manifest getManifest() { for (Iterator iterator = jarEntries.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); if (META_INF_JAR_LOCATION.equals(entry.getKey())) { - logger.info("using Manifest from the test bundle content=[/META-INF/MANIFEST.MF]"); + logger.info("Using Manifest from the test bundle content=[/META-INF/MANIFEST.MF]"); manifest = createManifestFrom((Resource) entry.getValue()); } } // fallback to default manifest creation if (manifest == null) { - logger.info("automatically creating Manifest for the test bundle"); + logger.info("Automatically creating Manifest for the test bundle"); manifest = createDefaultManifest(); } } @@ -219,7 +219,7 @@ protected Manifest createDefaultManifest() { addImportPackage(manifest); if (logger.isDebugEnabled()) - logger.debug("created manifest:" + manifest.getMainAttributes().entrySet()); + logger.debug("Created manifest:" + manifest.getMainAttributes().entrySet()); return manifest; } @@ -264,7 +264,7 @@ private Collection eliminateSpecialPackages(String[] rawImports) { } if (!eliminatedImports.isEmpty() && logger.isTraceEnabled()) - logger.trace("eliminated special packages " + eliminatedImports); + logger.trace("Eliminated special packages " + eliminatedImports); return filteredImports; } @@ -293,30 +293,58 @@ private Collection eliminatePackagesAvailableInTheJar(Collection imports) { filteredImports.add(pckg); } if (!eliminatedImports.isEmpty() && logger.isTraceEnabled()) - logger.trace("eliminated packages already present in the bundle " + eliminatedImports); + logger.trace("Eliminated packages already present in the bundle " + eliminatedImports); return filteredImports; } /** * Determine imports by walking a class hierarchy until the current package - * is found. + * is found. Currently, the parsers checks only the test class hierarchy + * available in the bundle. note that split packages are not supported. + * * * @return */ private String[] determineImports(Class clazz) { Assert.notNull(clazz, "a not-null class is required"); + + boolean trace = logger.isTraceEnabled(); + String endPackage = ClassUtils.classPackageAsResourcePath(AbstractOnTheFlyBundleCreatorTests.class).replace( '/', '.'); Set cumulatedPackages = new LinkedHashSet(); + // get contained packages to do matching on the test hierarchy + Collection containedPackages = jarCreator.getContainedPackages(); + + // make sure the collection package is valid + boolean validPackageCollection = !containedPackages.isEmpty(); + String clazzPackage; + // start parsing the test class hierarchy do { - cumulatedPackages.addAll(determineImportsForClass(clazz)); clazzPackage = ClassUtils.classPackageAsResourcePath(clazz).replace('/', '.'); + // check if the class package is inside this jar or not + // parse the class only for available packages otherwise + + // if we don't have the package, add it + if (validPackageCollection && !containedPackages.contains(clazzPackage)) { + logger.trace("Package [" + clazzPackage + "] is NOT part of the test archive; adding an import for it"); + cumulatedPackages.add(clazzPackage); + } + + // otherwise parse the class byte-code + else { + if (trace) + logger.trace("Package [" + clazzPackage + "] is part of the test archive; parsing " + clazz + + " bytecode to determine imports..."); + cumulatedPackages.addAll(determineImportsForClass(clazz)); + } clazz = clazz.getSuperclass(); + // work until the testing framework packages are reached } while (!endPackage.equals(clazzPackage)); String[] packages = (String[]) cumulatedPackages.toArray(new String[cumulatedPackages.size()]); @@ -348,7 +376,7 @@ private Set determineImportsForClass(Class clazz) { boolean trace = logger.isTraceEnabled(); if (trace) - logger.trace("discovered classes to analyze " + allClasses); + logger.trace("Discovered classes to analyze " + allClasses); ClassReader reader; @@ -356,7 +384,7 @@ private Set determineImportsForClass(Class clazz) { Class classToVisit = (Class) iterator.next(); try { if (trace) - logger.trace("visiting class " + classToVisit); + logger.trace("Visiting class " + classToVisit); reader = new ClassReader(clazz.getResourceAsStream(ClassUtils.getClassFileName(classToVisit))); } catch (Exception ex) { @@ -369,7 +397,7 @@ private Set determineImportsForClass(Class clazz) { } protected void postProcessBundleContext(BundleContext context) throws Exception { - logger.debug("post processing: creating test bundle"); + logger.debug("Post processing: creating test bundle"); Resource jar; @@ -415,10 +443,10 @@ private void installAndStartBundle(BundleContext context, Resource resource) thr boolean debug = logger.isDebugEnabled(); if (debug) - logger.debug("test bundle [" + bundleString + "] succesfully installed"); + logger.debug("Test bundle [" + bundleString + "] succesfully installed"); bundle.start(); if (debug) - logger.debug("test bundle [" + bundleString + "] succesfully started"); + logger.debug("Test bundle [" + bundleString + "] succesfully started"); } } diff --git a/test-support/src/main/java/org/springframework/osgi/test/provisioning/internal/LocalFileSystemMavenRepository.java b/test-support/src/main/java/org/springframework/osgi/test/provisioning/internal/LocalFileSystemMavenRepository.java index 195a85ccf..720d85483 100644 --- a/test-support/src/main/java/org/springframework/osgi/test/provisioning/internal/LocalFileSystemMavenRepository.java +++ b/test-support/src/main/java/org/springframework/osgi/test/provisioning/internal/LocalFileSystemMavenRepository.java @@ -89,18 +89,18 @@ private void init() { Resource settingsFile = new FileSystemResource(new File(userHome, M2_SETTINGS)); localRepository = getMavenSettingsLocalRepository(settingsFile); if (trace) - log.trace("falling back to M2 settings.xml [" + settingsFile + "]; found value=" + localRepository); + log.trace("Falling back to M2 settings.xml [" + settingsFile + "]; found value=" + localRepository); if (localRepository == null) { // fall back to the default location localRepository = new File(userHome, DEFAULT_DIR).getAbsolutePath(); if (trace) - log.trace("no custom setting found; using default M2 local repository=" + localRepository); + log.trace("No custom setting found; using default M2 local repository=" + localRepository); } } repositoryHome = localRepository; - log.info("local Maven2 repository used: [" + repositoryHome + "]"); + log.info("Local Maven2 repository used: [" + repositoryHome + "]"); } /** diff --git a/test-support/src/test/java/org/springframework/osgi/test/parsing/packageA/BaseClassFromAnotherPackage.java b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageA/BaseClassFromAnotherPackage.java new file mode 100644 index 000000000..167c3b663 --- /dev/null +++ b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageA/BaseClassFromAnotherPackage.java @@ -0,0 +1,37 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.test.parsing.packageA; + +import java.io.File; + +import javax.imageio.ImageIO; + +import org.springframework.osgi.test.AbstractConfigurableBundleCreatorTests; + +/** + * Simple base class from a different class that will be included in the + * archive. + * + * @author Costin Leau + * + */ +public class BaseClassFromAnotherPackage extends AbstractConfigurableBundleCreatorTests { + + // strange import that doesn't do anything + private static File file = ImageIO.getCacheDirectory(); + +} diff --git a/test-support/src/test/java/org/springframework/osgi/test/parsing/packageB/BaseClassFromAnotherPackageAndBundle.java b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageB/BaseClassFromAnotherPackageAndBundle.java new file mode 100644 index 000000000..c7e227aab --- /dev/null +++ b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageB/BaseClassFromAnotherPackageAndBundle.java @@ -0,0 +1,31 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.test.parsing.packageB; + +import javax.naming.CompositeName; +import javax.naming.Name; + +import org.springframework.osgi.test.parsing.packageA.BaseClassFromAnotherPackage; + +/** + * @author Costin Leau + * + */ +public class BaseClassFromAnotherPackageAndBundle extends BaseClassFromAnotherPackage { + + private Name context = new CompositeName(); +} diff --git a/test-support/src/test/java/org/springframework/osgi/test/parsing/packageC/DifferentParentsInDifferentBundlesTest.java b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageC/DifferentParentsInDifferentBundlesTest.java new file mode 100644 index 000000000..7aca45815 --- /dev/null +++ b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageC/DifferentParentsInDifferentBundlesTest.java @@ -0,0 +1,65 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.test.parsing.packageC; + +import java.lang.reflect.Field; +import java.util.jar.Manifest; + +import junit.framework.TestCase; + +import org.osgi.framework.Constants; +import org.springframework.osgi.test.AbstractConfigurableBundleCreatorTests; +import org.springframework.osgi.test.parsing.packageA.BaseClassFromAnotherPackage; +import org.springframework.osgi.test.parsing.packageB.BaseClassFromAnotherPackageAndBundle; + +/** + * Integration that checks if the class hierarchy is properly parsed. Note this + * test doesn't run in OSGi, it just invokes the bytecode parsing. + * + * @author Costin Leau + * + */ +public class DifferentParentsInDifferentBundlesTest extends TestCase { + + public void testCheckBaseClassesHierarchy() throws Exception { + // create class + TestInDifferentPackageThenItsParents test = new TestInDifferentPackageThenItsParents() { + }; + + Field jarSettings = AbstractConfigurableBundleCreatorTests.class.getDeclaredField("jarSettings"); + // initialize settings + jarSettings.setAccessible(true); + jarSettings.set(null, test.getSettings()); + + Manifest mf = test.getManifest(); + String value = mf.getMainAttributes().getValue(Constants.IMPORT_PACKAGE); + + // System.out.println("import package value is " + value); + // check parent package + assertTrue("missing parent not considered", contains(value, + BaseClassFromAnotherPackageAndBundle.class.getPackage().getName())); + assertFalse("contained parent not considered", contains(value, + BaseClassFromAnotherPackage.class.getPackage().getName())); + // check present parent dependencies + assertTrue("contained parent dependencies not considered", contains(value, "javax.imageio")); + + } + + private boolean contains(String text, String item) { + return text.indexOf(item) > -1; + } +} diff --git a/test-support/src/test/java/org/springframework/osgi/test/parsing/packageC/TestInDifferentPackageThenItsParents.java b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageC/TestInDifferentPackageThenItsParents.java new file mode 100644 index 000000000..4756deca9 --- /dev/null +++ b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageC/TestInDifferentPackageThenItsParents.java @@ -0,0 +1,55 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.test.parsing.packageC; + +import java.util.Properties; +import java.util.jar.Manifest; + +import org.springframework.osgi.test.parsing.packageA.BaseClassFromAnotherPackage; +import org.springframework.osgi.test.parsing.packageB.BaseClassFromAnotherPackageAndBundle; + +/** + * @author Costin Leau + * + */ +public abstract class TestInDifferentPackageThenItsParents extends BaseClassFromAnotherPackageAndBundle { + + public void testCheckBaseClassesHierarchy() throws Exception { + Manifest mf = getManifest(); + System.out.println(mf.getMainAttributes().entrySet()); + } + + protected String[] getBundleContentPattern() { + String pkg = getClass().getPackage().getName().replace('.', '/').concat("/"); + String[] patterns = new String[] { pkg + "**/*", + BaseClassFromAnotherPackage.class.getName().replace('.', '/').concat(".class") }; + return patterns; + } + + protected String getRootPath() { + return super.getRootPath(); + } + + protected Manifest getManifest() { + return super.getManifest(); + } + + protected Properties getSettings() throws Exception { + return super.getSettings(); + } + +} From 68143ce30f61361176e70f98bd31e3a2472f593c Mon Sep 17 00:00:00 2001 From: costin_leau Date: Mon, 25 Feb 2008 18:29:07 +0000 Subject: [PATCH 10/53] OSGI-371 --- changelog.txt | 3 +++ .../AbstractDelegatedExecutionApplicationContext.java | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/changelog.txt b/changelog.txt index 6ba4b43cb..c64ba1058 100644 --- a/changelog.txt +++ b/changelog.txt @@ -8,6 +8,9 @@ Changes in version 1.0.1 (200y-mm-dd) Package org.springframework.context.support * the namespace resolver mechanism first checks the local bundle classpath before using the extender namespace service +Package org.springframework.osgi.context +* fixed AbstractDelegatedExecutionApplicationContext to log errors that occur during the bean factory startup + Package org.springframework.osgi.io * improved OsgiBundleResource handling of jars with missing archive entries for folders * improved OsgiBundleResourcePatternResolver performance when checking for jar resources diff --git a/core/src/main/java/org/springframework/osgi/context/support/AbstractDelegatedExecutionApplicationContext.java b/core/src/main/java/org/springframework/osgi/context/support/AbstractDelegatedExecutionApplicationContext.java index edceeb2fd..2b8a80386 100644 --- a/core/src/main/java/org/springframework/osgi/context/support/AbstractDelegatedExecutionApplicationContext.java +++ b/core/src/main/java/org/springframework/osgi/context/support/AbstractDelegatedExecutionApplicationContext.java @@ -116,7 +116,8 @@ boolean isAvailable() { * continuation-like behavior or completion of the refresh method on several * threads, in a asynch manner. * - * By default, the refresh method in executed in one go (normal behavior). + * By default, the refresh method in executed in one go (normal + * behavior). * * {@inheritDoc} */ @@ -209,11 +210,13 @@ public void startRefresh() { // Destroy already created singletons to avoid dangling // resources. beanFactory.destroySingletons(); - logger.error("Post refresh error", ex); - throw ex; } } } + catch (RuntimeException ex) { + logger.error("Pre refresh error", ex); + throw ex; + } finally { thread.setContextClassLoader(oldTCCL); } From affb927c0f542fb9d03dfe52f23f1150c4c3529e Mon Sep 17 00:00:00 2001 From: costin_leau Date: Mon, 25 Feb 2008 19:59:32 +0000 Subject: [PATCH 11/53] OSGI-369 --- .../src/main/resources/META-INF/archetype.xml | 7 ++-- .../archetype-resources/META-INF/readme.txt | 6 +++ .../resources/archetype-resources/pom.xml | 39 ++++++++++++++++++- .../src/main/resources/log4j.properties | 8 ++++ .../src/test/resources/log4j.properties | 8 ++++ .../src/test/resources/readme.txt | 4 -- changelog.txt | 4 ++ 7 files changed, 66 insertions(+), 10 deletions(-) create mode 100644 bundle-archetype/src/main/resources/archetype-resources/META-INF/readme.txt create mode 100644 bundle-archetype/src/main/resources/archetype-resources/src/main/resources/log4j.properties create mode 100644 bundle-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.properties delete mode 100644 bundle-archetype/src/main/resources/archetype-resources/src/test/resources/readme.txt diff --git a/bundle-archetype/src/main/resources/META-INF/archetype.xml b/bundle-archetype/src/main/resources/META-INF/archetype.xml index b4962e566..69c894272 100644 --- a/bundle-archetype/src/main/resources/META-INF/archetype.xml +++ b/bundle-archetype/src/main/resources/META-INF/archetype.xml @@ -5,12 +5,11 @@ src/main/java/impl/BeanImpl.java - + META-INF/readme.txt readme.txt src/main/resources/META-INF/spring/bundle-context.xml src/main/resources/META-INF/spring/bundle-context-osgi.xml + src/main/resources/log4j.properties .classpath .project build.properties @@ -20,6 +19,6 @@ src/test/java/impl/BeanIntegrationTest.java - src/test/resources/readme.txt + src/test/resources/log4j.properties \ No newline at end of file diff --git a/bundle-archetype/src/main/resources/archetype-resources/META-INF/readme.txt b/bundle-archetype/src/main/resources/archetype-resources/META-INF/readme.txt new file mode 100644 index 000000000..7405efdc1 --- /dev/null +++ b/bundle-archetype/src/main/resources/archetype-resources/META-INF/readme.txt @@ -0,0 +1,6 @@ +To facilitate OSGi bundle manifest generation, the archetype uses Felix maven plugin. +The manifest will be generated when building the project. To trigger this, run: + +mvn package + +Please see http://felix.apache.org/site/maven-bundle-plugin-bnd.html for more information. \ No newline at end of file diff --git a/bundle-archetype/src/main/resources/archetype-resources/pom.xml b/bundle-archetype/src/main/resources/archetype-resources/pom.xml index 1ab177613..f51060fca 100644 --- a/bundle-archetype/src/main/resources/archetype-resources/pom.xml +++ b/bundle-archetype/src/main/resources/archetype-resources/pom.xml @@ -97,6 +97,21 @@ + + + + src/main/resources + + + + . + + plugin.xml + META-INF/* + + + + org.apache.felix @@ -104,13 +119,33 @@ true 1.0.0 + META-INF - META-INF - ${package}* + ${package}*;version=${version} * + + src/main/resources + + + + org.apache.felix + maven-bundle-plugin + + + bundle-manifest + process-classes + + manifest + + + + diff --git a/bundle-archetype/src/main/resources/archetype-resources/src/main/resources/log4j.properties b/bundle-archetype/src/main/resources/archetype-resources/src/main/resources/log4j.properties new file mode 100644 index 000000000..18cfaa3f1 --- /dev/null +++ b/bundle-archetype/src/main/resources/archetype-resources/src/main/resources/log4j.properties @@ -0,0 +1,8 @@ +log4j.rootCategory=INFO, stdout +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout.ConversionPattern=%t %p [%c] - %m%n +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.threshold=TRACE + +#log4j.logger.org.springframework.osgi=DEBUG +#log4j.logger.org.springframework=DEBUG \ No newline at end of file diff --git a/bundle-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.properties b/bundle-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.properties new file mode 100644 index 000000000..18cfaa3f1 --- /dev/null +++ b/bundle-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.properties @@ -0,0 +1,8 @@ +log4j.rootCategory=INFO, stdout +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout.ConversionPattern=%t %p [%c] - %m%n +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.threshold=TRACE + +#log4j.logger.org.springframework.osgi=DEBUG +#log4j.logger.org.springframework=DEBUG \ No newline at end of file diff --git a/bundle-archetype/src/main/resources/archetype-resources/src/test/resources/readme.txt b/bundle-archetype/src/main/resources/archetype-resources/src/test/resources/readme.txt deleted file mode 100644 index e67bfe9b8..000000000 --- a/bundle-archetype/src/main/resources/archetype-resources/src/test/resources/readme.txt +++ /dev/null @@ -1,4 +0,0 @@ -This file is only here because maven archetypes cannot create empty directories.Without this directory present, eclipse will indicate a classpath error -because src/test/resources is on the project's classpath. - -You can safely delete this file. diff --git a/changelog.txt b/changelog.txt index c64ba1058..6519439e7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,10 @@ http://www.springframework.org/osgi Changes in version 1.0.1 (200y-mm-dd) ----------------------------------------- +General +* fixed nested Eclipse classpath entry in spring-osgi bundle archetype +* added log4j.properties to spring-osgi bundle archetype + Package org.springframework.context.support * the namespace resolver mechanism first checks the local bundle classpath before using the extender namespace service From 55fd6adfd57a1662b0a96e9609deec8a0f0fb4b9 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Tue, 26 Feb 2008 09:40:06 +0000 Subject: [PATCH 12/53] OSGI-374 + added a simple osgi integration test as part of the bundle archetype --- .../src/main/resources/META-INF/archetype.xml | 1 + .../resources/archetype-resources/.classpath | 15 +++++++++--- .../resources/archetype-resources/pom.xml | 24 ++++++++++++++++--- .../test/java/impl/BeanIntegrationTest.java | 5 ++-- changelog.txt | 1 + 5 files changed, 37 insertions(+), 9 deletions(-) diff --git a/bundle-archetype/src/main/resources/META-INF/archetype.xml b/bundle-archetype/src/main/resources/META-INF/archetype.xml index 69c894272..c26c31cab 100644 --- a/bundle-archetype/src/main/resources/META-INF/archetype.xml +++ b/bundle-archetype/src/main/resources/META-INF/archetype.xml @@ -17,6 +17,7 @@ src/test/java/impl/BeanImplTest.java src/test/java/impl/BeanIntegrationTest.java + src/test/java/impl/BeanOsgiIntegrationTest.java src/test/resources/log4j.properties diff --git a/bundle-archetype/src/main/resources/archetype-resources/.classpath b/bundle-archetype/src/main/resources/archetype-resources/.classpath index 6bee5dcd4..2b919e602 100644 --- a/bundle-archetype/src/main/resources/archetype-resources/.classpath +++ b/bundle-archetype/src/main/resources/archetype-resources/.classpath @@ -2,9 +2,8 @@ - - - + + @@ -13,5 +12,15 @@ + + + + + + + + + + diff --git a/bundle-archetype/src/main/resources/archetype-resources/pom.xml b/bundle-archetype/src/main/resources/archetype-resources/pom.xml index f51060fca..83932ecec 100644 --- a/bundle-archetype/src/main/resources/archetype-resources/pom.xml +++ b/bundle-archetype/src/main/resources/archetype-resources/pom.xml @@ -12,6 +12,7 @@ 1.4.3 2.5.1 1.0.1-SNAPSHOT + 3.2.2 @@ -49,6 +50,7 @@ slf4j-log4j12 ${slf4j.version} + org.osgi @@ -88,9 +90,25 @@ org.springframework.osgi aopalliance.osgi 1.0-SNAPSHOT - test + test - + + + + org.eclipse.osgi + org.eclipse.osgi + ${equinox.ver} + jar + test + + + + org.springframework.osgi + log4j.osgi + 1.2.15-SNAPSHOT + test + + @@ -121,7 +139,7 @@ META-INF - ${package}*;version=${version} + !${package}.impl,${package}* * + diff --git a/docs/src/docbkx/reference/service-registry.xml b/docs/src/docbkx/reference/service-registry.xml index b06415b83..5b9052505 100644 --- a/docs/src/docbkx/reference/service-registry.xml +++ b/docs/src/docbkx/reference/service-registry.xml @@ -1454,7 +1454,7 @@ public void anyMethodName(ServiceReference ref);]]> - + ]]> @@ -1490,7 +1490,7 @@ public void anyMethodName(ServiceReference ref);]]> - + diff --git a/extender/pom.xml b/extender/pom.xml index 474dedf20..50e8590c1 100644 --- a/extender/pom.xml +++ b/extender/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/annotation.dependency.test.bundle/.classpath b/integration-tests/bundles/annotation.dependency.test.bundle/.classpath index 5ca6a4a4a..7f0f545a2 100644 --- a/integration-tests/bundles/annotation.dependency.test.bundle/.classpath +++ b/integration-tests/bundles/annotation.dependency.test.bundle/.classpath @@ -5,6 +5,6 @@ - + diff --git a/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml b/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml index 7094c33de..03cdf0ff3 100644 --- a/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml +++ b/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/annotation.test.bundle/.classpath b/integration-tests/bundles/annotation.test.bundle/.classpath index 3eff5016e..0951ae611 100644 --- a/integration-tests/bundles/annotation.test.bundle/.classpath +++ b/integration-tests/bundles/annotation.test.bundle/.classpath @@ -5,6 +5,6 @@ - + diff --git a/integration-tests/bundles/annotation.test.bundle/pom.xml b/integration-tests/bundles/annotation.test.bundle/pom.xml index fcfef096d..df788fb1d 100644 --- a/integration-tests/bundles/annotation.test.bundle/pom.xml +++ b/integration-tests/bundles/annotation.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/cardinality.0to1.bundle/pom.xml b/integration-tests/bundles/cardinality.0to1.bundle/pom.xml index a618edb1b..796a02bc6 100644 --- a/integration-tests/bundles/cardinality.0to1.bundle/pom.xml +++ b/integration-tests/bundles/cardinality.0to1.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 diff --git a/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml b/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml index 1d91ca952..0839b7752 100644 --- a/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 diff --git a/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml b/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml index 01a90e646..bef2b198c 100644 --- a/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 diff --git a/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml b/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml index 61d5feb6b..4575b5302 100644 --- a/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 diff --git a/integration-tests/bundles/config.bundle/pom.xml b/integration-tests/bundles/config.bundle/pom.xml index 1704564fa..63ef12397 100644 --- a/integration-tests/bundles/config.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/pom.xml @@ -3,7 +3,7 @@ org.springframework.osgi spring-osgi-integration-test-bundles - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml b/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml index b43a7c9d2..91a9ba929 100644 --- a/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 diff --git a/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml b/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml index 67fd4fc59..f552121f2 100644 --- a/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 diff --git a/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml b/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml index ae01846ed..a79185ee0 100644 --- a/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 diff --git a/integration-tests/bundles/config.file.with.dots.bundle/pom.xml b/integration-tests/bundles/config.file.with.dots.bundle/pom.xml index 9948b4b63..6473dc901 100644 --- a/integration-tests/bundles/config.file.with.dots.bundle/pom.xml +++ b/integration-tests/bundles/config.file.with.dots.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/configuration.test.bundle/pom.xml b/integration-tests/bundles/configuration.test.bundle/pom.xml index 206cfd4f4..5f90c4312 100644 --- a/integration-tests/bundles/configuration.test.bundle/pom.xml +++ b/integration-tests/bundles/configuration.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/deadlock.bundle/pom.xml b/integration-tests/bundles/deadlock.bundle/pom.xml index e0300467c..9277f68c8 100644 --- a/integration-tests/bundles/deadlock.bundle/pom.xml +++ b/integration-tests/bundles/deadlock.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/dependency.factory.bundle/pom.xml b/integration-tests/bundles/dependency.factory.bundle/pom.xml index 908856ce2..5378d2528 100644 --- a/integration-tests/bundles/dependency.factory.bundle/pom.xml +++ b/integration-tests/bundles/dependency.factory.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/dependency.test.bundle/pom.xml b/integration-tests/bundles/dependency.test.bundle/pom.xml index 978724540..8ffff86f4 100644 --- a/integration-tests/bundles/dependency.test.bundle/pom.xml +++ b/integration-tests/bundles/dependency.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/error.bundle/pom.xml b/integration-tests/bundles/error.bundle/pom.xml index d73c22872..edb91f6e8 100644 --- a/integration-tests/bundles/error.bundle/pom.xml +++ b/integration-tests/bundles/error.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/extender.version.bundle/pom.xml b/integration-tests/bundles/extender.version.bundle/pom.xml index 11de3dcf9..835891212 100644 --- a/integration-tests/bundles/extender.version.bundle/pom.xml +++ b/integration-tests/bundles/extender.version.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/io.fragment.1.bundle/pom.xml b/integration-tests/bundles/io.fragment.1.bundle/pom.xml index f6220755a..804f53af7 100644 --- a/integration-tests/bundles/io.fragment.1.bundle/pom.xml +++ b/integration-tests/bundles/io.fragment.1.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/io.fragment.2.bundle/pom.xml b/integration-tests/bundles/io.fragment.2.bundle/pom.xml index ab0041c20..b5a39219a 100644 --- a/integration-tests/bundles/io.fragment.2.bundle/pom.xml +++ b/integration-tests/bundles/io.fragment.2.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/lifecycle.test.bundle/pom.xml b/integration-tests/bundles/lifecycle.test.bundle/pom.xml index 0b241da0d..32dbdc7ee 100644 --- a/integration-tests/bundles/lifecycle.test.bundle/pom.xml +++ b/integration-tests/bundles/lifecycle.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/pom.xml b/integration-tests/bundles/pom.xml index e00678559..43a797fc2 100644 --- a/integration-tests/bundles/pom.xml +++ b/integration-tests/bundles/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/reference.test.bundle/pom.xml b/integration-tests/bundles/reference.test.bundle/pom.xml index cfba76fe7..3503cc9b7 100644 --- a/integration-tests/bundles/reference.test.bundle/pom.xml +++ b/integration-tests/bundles/reference.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/scoped.a.bundle/pom.xml b/integration-tests/bundles/scoped.a.bundle/pom.xml index 521fa3627..b5cefee89 100644 --- a/integration-tests/bundles/scoped.a.bundle/pom.xml +++ b/integration-tests/bundles/scoped.a.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/scoped.b.bundle/pom.xml b/integration-tests/bundles/scoped.b.bundle/pom.xml index 17e37ec60..c07af81fd 100644 --- a/integration-tests/bundles/scoped.b.bundle/pom.xml +++ b/integration-tests/bundles/scoped.b.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/scoped.common.bundle/pom.xml b/integration-tests/bundles/scoped.common.bundle/pom.xml index ec62ac4ac..e4cc0b306 100644 --- a/integration-tests/bundles/scoped.common.bundle/pom.xml +++ b/integration-tests/bundles/scoped.common.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/service.listener.bundle/pom.xml b/integration-tests/bundles/service.listener.bundle/pom.xml index 98711a24a..d69a71ff7 100644 --- a/integration-tests/bundles/service.listener.bundle/pom.xml +++ b/integration-tests/bundles/service.listener.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.2.bundle/pom.xml b/integration-tests/bundles/simple.service.2.bundle/pom.xml index 6abb65262..b36cf21d7 100644 --- a/integration-tests/bundles/simple.service.2.bundle/pom.xml +++ b/integration-tests/bundles/simple.service.2.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.3.bundle/pom.xml b/integration-tests/bundles/simple.service.3.bundle/pom.xml index 8a707c996..ffc7dc0c0 100644 --- a/integration-tests/bundles/simple.service.3.bundle/pom.xml +++ b/integration-tests/bundles/simple.service.3.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml b/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml index 4b8a95049..450951783 100644 --- a/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml +++ b/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.bundle.identical/pom.xml b/integration-tests/bundles/simple.service.bundle.identical/pom.xml index f5952c27a..e028ad5e1 100644 --- a/integration-tests/bundles/simple.service.bundle.identical/pom.xml +++ b/integration-tests/bundles/simple.service.bundle.identical/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.bundle/pom.xml b/integration-tests/bundles/simple.service.bundle/pom.xml index 1ccd3a3e4..6f94b81dc 100644 --- a/integration-tests/bundles/simple.service.bundle/pom.xml +++ b/integration-tests/bundles/simple.service.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/tccl.bundle/pom.xml b/integration-tests/bundles/tccl.bundle/pom.xml index 0d8a153e5..71c633143 100644 --- a/integration-tests/bundles/tccl.bundle/pom.xml +++ b/integration-tests/bundles/tccl.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/trivial.bundle/pom.xml b/integration-tests/bundles/trivial.bundle/pom.xml index 56a7e0118..7204e55bf 100644 --- a/integration-tests/bundles/trivial.bundle/pom.xml +++ b/integration-tests/bundles/trivial.bundle/pom.xml @@ -2,7 +2,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/trivial.test.bundle/pom.xml b/integration-tests/bundles/trivial.test.bundle/pom.xml index d6a8818a5..ef95bdadb 100644 --- a/integration-tests/bundles/trivial.test.bundle/pom.xml +++ b/integration-tests/bundles/trivial.test.bundle/pom.xml @@ -2,7 +2,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 3b9f6289e..f2b0a954a 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/tests-tiger/.classpath b/integration-tests/tests-tiger/.classpath index 31ce7211d..7489d2da0 100644 --- a/integration-tests/tests-tiger/.classpath +++ b/integration-tests/tests-tiger/.classpath @@ -5,7 +5,7 @@ - + @@ -17,9 +17,9 @@ - - - + + + diff --git a/integration-tests/tests-tiger/pom.xml b/integration-tests/tests-tiger/pom.xml index c101bd6c9..30a10e3d6 100644 --- a/integration-tests/tests-tiger/pom.xml +++ b/integration-tests/tests-tiger/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/integration-tests/tests/.classpath b/integration-tests/tests/.classpath index 37afc58b8..1d62dc24f 100644 --- a/integration-tests/tests/.classpath +++ b/integration-tests/tests/.classpath @@ -11,16 +11,16 @@ - - - + + + - + - - + + @@ -31,8 +31,8 @@ - - - + + + diff --git a/integration-tests/tests/pom.xml b/integration-tests/tests/pom.xml index c434af9ce..cf7793e23 100644 --- a/integration-tests/tests/pom.xml +++ b/integration-tests/tests/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/io/.classpath b/io/.classpath index ba66de1e0..1a22175d7 100644 --- a/io/.classpath +++ b/io/.classpath @@ -5,7 +5,7 @@ - + diff --git a/io/pom.xml b/io/pom.xml index 1f4b3b522..d6d93356c 100644 --- a/io/pom.xml +++ b/io/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/mock/pom.xml b/mock/pom.xml index 0b67f7660..180a9fb80 100644 --- a/mock/pom.xml +++ b/mock/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/pom.xml b/pom.xml index 3a0877c9b..74ebb35e9 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.springframework.osgi spring-osgi pom - 1.0.1-SNAPSHOT + 1.0.1 Spring Dynamic Modules http://www.springframework.org/osgi diff --git a/release/pom.xml b/release/pom.xml index a6e01ad46..3305b397e 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -12,7 +12,7 @@ org.springframework.osgi spring-osgi - 1.0.1-SNAPSHOT + 1.0.1 .. diff --git a/samples/petclinic/petclinic.sample.contract/pom.xml b/samples/petclinic/petclinic.sample.contract/pom.xml index c856a928d..d9e388de2 100644 --- a/samples/petclinic/petclinic.sample.contract/pom.xml +++ b/samples/petclinic/petclinic.sample.contract/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 @@ -11,7 +11,7 @@ contract jar Spring OSGi Samples: Simple Petclinic Contract - 1.0.1-SNAPSHOT + 1.0.1 http://www.springframework.org/osgi diff --git a/samples/petclinic/petclinic.sample.hsqldb/pom.xml b/samples/petclinic/petclinic.sample.hsqldb/pom.xml index 648fb8339..18e8d4e38 100644 --- a/samples/petclinic/petclinic.sample.hsqldb/pom.xml +++ b/samples/petclinic/petclinic.sample.hsqldb/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 @@ -11,7 +11,7 @@ hsqldb-impl jar Spring OSGi Samples: Simple Petclinic HSQLDB - 1.0.1-SNAPSHOT + 1.0.1 http://www.springframework.org/osgi diff --git a/samples/petclinic/petclinic.sample.jdbc/pom.xml b/samples/petclinic/petclinic.sample.jdbc/pom.xml index c303fc36d..214ae49e1 100644 --- a/samples/petclinic/petclinic.sample.jdbc/pom.xml +++ b/samples/petclinic/petclinic.sample.jdbc/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 @@ -11,7 +11,7 @@ jdbc jar Spring OSGi Samples: Simple Petclinic JDBC - 1.0.1-SNAPSHOT + 1.0.1 http://www.springframework.org/osgi diff --git a/samples/petclinic/petclinic.sample.mysql/pom.xml b/samples/petclinic/petclinic.sample.mysql/pom.xml index f01d040f6..7bb27c95e 100644 --- a/samples/petclinic/petclinic.sample.mysql/pom.xml +++ b/samples/petclinic/petclinic.sample.mysql/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 @@ -11,7 +11,7 @@ mysql-impl jar Spring OSGi Samples: Simple Petclinic MySQL - 1.0.1-SNAPSHOT + 1.0.1 http://www.springframework.org/osgi diff --git a/samples/petclinic/pom.xml b/samples/petclinic/pom.xml index 322cd9be4..7e0be5439 100644 --- a/samples/petclinic/pom.xml +++ b/samples/petclinic/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi.samples diff --git a/samples/pom.xml b/samples/pom.xml index 5ee3bc6ef..3985d183e 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi.samples diff --git a/samples/simple-service/pom.xml b/samples/simple-service/pom.xml index c5da46577..07a43d766 100644 --- a/samples/simple-service/pom.xml +++ b/samples/simple-service/pom.xml @@ -3,7 +3,7 @@ samples org.springframework.osgi.samples - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi.samples diff --git a/samples/simple-service/simple-service-bundle/pom.xml b/samples/simple-service/simple-service-bundle/pom.xml index 83f4a0531..aecd618e2 100644 --- a/samples/simple-service/simple-service-bundle/pom.xml +++ b/samples/simple-service/simple-service-bundle/pom.xml @@ -2,7 +2,7 @@ simple-service org.springframework.osgi.samples - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi.samples diff --git a/samples/simple-service/simple-service-integration-test/pom.xml b/samples/simple-service/simple-service-integration-test/pom.xml index 3d3b4bc3f..db841f27d 100644 --- a/samples/simple-service/simple-service-integration-test/pom.xml +++ b/samples/simple-service/simple-service-integration-test/pom.xml @@ -3,7 +3,7 @@ simple-service org.springframework.osgi.samples - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi.samples diff --git a/samples/weather/pom.xml b/samples/weather/pom.xml index c1168fb88..67fd92971 100644 --- a/samples/weather/pom.xml +++ b/samples/weather/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi.samples diff --git a/samples/weather/weather-dao/pom.xml b/samples/weather/weather-dao/pom.xml index 39b804fed..b4393fc75 100755 --- a/samples/weather/weather-dao/pom.xml +++ b/samples/weather/weather-dao/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.1-SNAPSHOT + 1.0.1 org.springframework.osgi.samples weather-dao diff --git a/samples/weather/weather-extension/pom.xml b/samples/weather/weather-extension/pom.xml index 6c8fff7fe..14068ee19 100644 --- a/samples/weather/weather-extension/pom.xml +++ b/samples/weather/weather-extension/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.1-SNAPSHOT + 1.0.1 org.springframework.osgi.samples weather-extension diff --git a/samples/weather/weather-service-integration-test/.classpath b/samples/weather/weather-service-integration-test/.classpath index b007154b2..ec71282df 100644 --- a/samples/weather/weather-service-integration-test/.classpath +++ b/samples/weather/weather-service-integration-test/.classpath @@ -11,6 +11,6 @@ - + diff --git a/samples/weather/weather-service-integration-test/pom.xml b/samples/weather/weather-service-integration-test/pom.xml index ba58ede49..de2416b93 100644 --- a/samples/weather/weather-service-integration-test/pom.xml +++ b/samples/weather/weather-service-integration-test/pom.xml @@ -3,7 +3,7 @@ weather org.springframework.osgi.samples - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi.samples diff --git a/samples/weather/weather-service-test/pom.xml b/samples/weather/weather-service-test/pom.xml index 074a72824..7ff1ae85d 100755 --- a/samples/weather/weather-service-test/pom.xml +++ b/samples/weather/weather-service-test/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.1-SNAPSHOT + 1.0.1 org.springframework.osgi.samples weather-service-test diff --git a/samples/weather/weather-service/pom.xml b/samples/weather/weather-service/pom.xml index d15dadb75..b0198c658 100755 --- a/samples/weather/weather-service/pom.xml +++ b/samples/weather/weather-service/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.1-SNAPSHOT + 1.0.1 org.springframework.osgi.samples weather-service diff --git a/samples/weather/wiring-bundle/.classpath b/samples/weather/wiring-bundle/.classpath index ec48e3181..3f0447927 100644 --- a/samples/weather/wiring-bundle/.classpath +++ b/samples/weather/wiring-bundle/.classpath @@ -13,7 +13,7 @@ - - + + diff --git a/samples/weather/wiring-bundle/pom.xml b/samples/weather/wiring-bundle/pom.xml index 50b8bcc0e..bbbb6c5cb 100755 --- a/samples/weather/wiring-bundle/pom.xml +++ b/samples/weather/wiring-bundle/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.1-SNAPSHOT + 1.0.1 org.springframework.osgi.samples wiring-bundle diff --git a/test-support/.classpath b/test-support/.classpath index 131838b94..42e9ef136 100644 --- a/test-support/.classpath +++ b/test-support/.classpath @@ -15,8 +15,8 @@ - - + + diff --git a/test-support/pom.xml b/test-support/pom.xml index 70b9970bb..a84260d29 100644 --- a/test-support/pom.xml +++ b/test-support/pom.xml @@ -2,7 +2,7 @@ spring-osgi org.springframework.osgi - 1.0.1-SNAPSHOT + 1.0.1 4.0.0 org.springframework.osgi diff --git a/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties b/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties index ffe2cd991..d30d89cab 100644 --- a/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties +++ b/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties @@ -26,7 +26,7 @@ ignore.junit.version=3.8.2-SNAPSHOT ignore.log4j.version=1.2.15-SNAPSHOT ignore.spring.version=2.5.1 -ignore.spring.osgi.version=1.0.1-SNAPSHOT +ignore.spring.osgi.version=1.0.1 ignore.slf4j.version=1.4.3 ignore.asm.version=2.2.3-SNAPSHOT From e1e08f3f196838edae2c164f8118f7103bd983b6 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Thu, 28 Feb 2008 19:19:03 +0000 Subject: [PATCH 16/53] 1.0.2-SNAPSHOT --- annotation/pom.xml | 2 +- bundle-archetype/pom.xml | 2 +- .../resources/archetype-resources/.classpath | 10 +++++----- .../resources/archetype-resources/pom.xml | 2 +- changelog.txt | 6 +++++- core/.classpath | 2 +- core/pom.xml | 2 +- docs/pom.xml | 2 +- extender/pom.xml | 2 +- .../.classpath | 2 +- .../annotation.dependency.test.bundle/pom.xml | 2 +- .../bundles/annotation.test.bundle/.classpath | 2 +- .../bundles/annotation.test.bundle/pom.xml | 2 +- .../bundles/cardinality.0to1.bundle/pom.xml | 2 +- .../config.bundle/async.nowait.bundle/pom.xml | 2 +- .../config.bundle/async.wait.bundle/pom.xml | 2 +- .../config.bundle/no.publish.bundle/pom.xml | 2 +- .../bundles/config.bundle/pom.xml | 2 +- .../config.bundle/sync.nowait.bundle/pom.xml | 2 +- .../config.bundle/sync.tail.bundle/pom.xml | 2 +- .../config.bundle/sync.wait.bundle/pom.xml | 2 +- .../config.file.with.dots.bundle/pom.xml | 2 +- .../bundles/configuration.test.bundle/pom.xml | 2 +- .../bundles/deadlock.bundle/pom.xml | 2 +- .../bundles/dependency.factory.bundle/pom.xml | 2 +- .../bundles/dependency.test.bundle/pom.xml | 2 +- .../bundles/error.bundle/pom.xml | 2 +- .../bundles/extender.version.bundle/pom.xml | 2 +- .../bundles/io.fragment.1.bundle/pom.xml | 2 +- .../bundles/io.fragment.2.bundle/pom.xml | 2 +- .../bundles/lifecycle.test.bundle/pom.xml | 2 +- integration-tests/bundles/pom.xml | 2 +- .../bundles/reference.test.bundle/pom.xml | 2 +- .../bundles/scoped.a.bundle/pom.xml | 2 +- .../bundles/scoped.b.bundle/pom.xml | 2 +- .../bundles/scoped.common.bundle/pom.xml | 2 +- .../bundles/service.listener.bundle/pom.xml | 2 +- .../bundles/simple.service.2.bundle/pom.xml | 2 +- .../bundles/simple.service.3.bundle/pom.xml | 2 +- .../simple.service.bundle.2.identical/pom.xml | 2 +- .../simple.service.bundle.identical/pom.xml | 2 +- .../bundles/simple.service.bundle/pom.xml | 2 +- integration-tests/bundles/tccl.bundle/pom.xml | 2 +- .../bundles/trivial.bundle/pom.xml | 2 +- .../bundles/trivial.test.bundle/pom.xml | 2 +- integration-tests/pom.xml | 2 +- integration-tests/tests-tiger/.classpath | 8 ++++---- integration-tests/tests-tiger/pom.xml | 2 +- integration-tests/tests/.classpath | 20 +++++++++---------- integration-tests/tests/pom.xml | 2 +- io/.classpath | 2 +- io/pom.xml | 2 +- mock/pom.xml | 2 +- pom.xml | 8 ++++---- release/pom.xml | 2 +- .../petclinic.sample.contract/pom.xml | 4 ++-- .../petclinic/petclinic.sample.hsqldb/pom.xml | 4 ++-- .../petclinic/petclinic.sample.jdbc/pom.xml | 4 ++-- .../petclinic/petclinic.sample.mysql/pom.xml | 4 ++-- samples/petclinic/pom.xml | 2 +- samples/pom.xml | 2 +- samples/simple-service/pom.xml | 2 +- .../simple-service-bundle/pom.xml | 2 +- .../simple-service-integration-test/pom.xml | 2 +- samples/weather/pom.xml | 2 +- samples/weather/weather-dao/pom.xml | 2 +- samples/weather/weather-extension/pom.xml | 2 +- .../.classpath | 2 +- .../weather-service-integration-test/pom.xml | 2 +- samples/weather/weather-service-test/pom.xml | 2 +- samples/weather/weather-service/pom.xml | 2 +- samples/weather/wiring-bundle/.classpath | 4 ++-- samples/weather/wiring-bundle/pom.xml | 2 +- test-support/.classpath | 6 +++--- test-support/pom.xml | 2 +- .../test/internal/boot-bundles.properties | 2 +- 76 files changed, 106 insertions(+), 102 deletions(-) diff --git a/annotation/pom.xml b/annotation/pom.xml index 24529e25a..0e28568bc 100644 --- a/annotation/pom.xml +++ b/annotation/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/bundle-archetype/pom.xml b/bundle-archetype/pom.xml index aa72aafee..d2dae9b7d 100644 --- a/bundle-archetype/pom.xml +++ b/bundle-archetype/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/bundle-archetype/src/main/resources/archetype-resources/.classpath b/bundle-archetype/src/main/resources/archetype-resources/.classpath index 6531ca258..85273b816 100644 --- a/bundle-archetype/src/main/resources/archetype-resources/.classpath +++ b/bundle-archetype/src/main/resources/archetype-resources/.classpath @@ -16,11 +16,11 @@ - - - - - + + + + + diff --git a/bundle-archetype/src/main/resources/archetype-resources/pom.xml b/bundle-archetype/src/main/resources/archetype-resources/pom.xml index a818dc76a..5adea1604 100644 --- a/bundle-archetype/src/main/resources/archetype-resources/pom.xml +++ b/bundle-archetype/src/main/resources/archetype-resources/pom.xml @@ -11,7 +11,7 @@ 1.4.3 2.5.1 - 1.0.1 + 1.0.2-SNAPSHOT 3.2.2 diff --git a/changelog.txt b/changelog.txt index e064b68a5..51e14f0d0 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,8 +2,12 @@ SPRING DYNAMIC MODULES FRAMEWORK CHANGELOG ========================================== http://www.springframework.org/osgi +Changes in version 1.0.2 (200y-mm-dd) +------------------------------------- + + Changes in version 1.0.1 (2008-02-29) ------------------------------------------ +------------------------------------- General * fixed nested Eclipse classpath entry in spring-osgi bundle archetype diff --git a/core/.classpath b/core/.classpath index 785b4407d..4158c1b32 100644 --- a/core/.classpath +++ b/core/.classpath @@ -7,7 +7,7 @@ - + diff --git a/core/pom.xml b/core/pom.xml index 9b155817b..95a380872 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/docs/pom.xml b/docs/pom.xml index 2a40bf3d0..5a724905f 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -4,7 +4,7 @@ org.springframework.osgi spring-osgi pom - 1.0.1 + 1.0.2-SNAPSHOT Spring OSGi http://www.springframework.org/osgi diff --git a/extender/pom.xml b/extender/pom.xml index 50e8590c1..e8bf71ca7 100644 --- a/extender/pom.xml +++ b/extender/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/annotation.dependency.test.bundle/.classpath b/integration-tests/bundles/annotation.dependency.test.bundle/.classpath index 7f0f545a2..2fdfd7bd5 100644 --- a/integration-tests/bundles/annotation.dependency.test.bundle/.classpath +++ b/integration-tests/bundles/annotation.dependency.test.bundle/.classpath @@ -5,6 +5,6 @@ - + diff --git a/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml b/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml index 03cdf0ff3..f51136869 100644 --- a/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml +++ b/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/annotation.test.bundle/.classpath b/integration-tests/bundles/annotation.test.bundle/.classpath index 0951ae611..10ff8342c 100644 --- a/integration-tests/bundles/annotation.test.bundle/.classpath +++ b/integration-tests/bundles/annotation.test.bundle/.classpath @@ -5,6 +5,6 @@ - + diff --git a/integration-tests/bundles/annotation.test.bundle/pom.xml b/integration-tests/bundles/annotation.test.bundle/pom.xml index df788fb1d..a6df0c76f 100644 --- a/integration-tests/bundles/annotation.test.bundle/pom.xml +++ b/integration-tests/bundles/annotation.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/cardinality.0to1.bundle/pom.xml b/integration-tests/bundles/cardinality.0to1.bundle/pom.xml index 796a02bc6..59a3647db 100644 --- a/integration-tests/bundles/cardinality.0to1.bundle/pom.xml +++ b/integration-tests/bundles/cardinality.0to1.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml b/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml index 0839b7752..34c21db3d 100644 --- a/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml b/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml index bef2b198c..c93a8145f 100644 --- a/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml b/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml index 4575b5302..7effd0a99 100644 --- a/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.bundle/pom.xml b/integration-tests/bundles/config.bundle/pom.xml index 63ef12397..8b9e5c840 100644 --- a/integration-tests/bundles/config.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/pom.xml @@ -3,7 +3,7 @@ org.springframework.osgi spring-osgi-integration-test-bundles - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml b/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml index 91a9ba929..f612967d1 100644 --- a/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml b/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml index f552121f2..4dd1270dc 100644 --- a/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml b/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml index a79185ee0..972ede4ee 100644 --- a/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.file.with.dots.bundle/pom.xml b/integration-tests/bundles/config.file.with.dots.bundle/pom.xml index 6473dc901..79feb363f 100644 --- a/integration-tests/bundles/config.file.with.dots.bundle/pom.xml +++ b/integration-tests/bundles/config.file.with.dots.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/configuration.test.bundle/pom.xml b/integration-tests/bundles/configuration.test.bundle/pom.xml index 5f90c4312..84415240f 100644 --- a/integration-tests/bundles/configuration.test.bundle/pom.xml +++ b/integration-tests/bundles/configuration.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/deadlock.bundle/pom.xml b/integration-tests/bundles/deadlock.bundle/pom.xml index 9277f68c8..aaa5fc35b 100644 --- a/integration-tests/bundles/deadlock.bundle/pom.xml +++ b/integration-tests/bundles/deadlock.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/dependency.factory.bundle/pom.xml b/integration-tests/bundles/dependency.factory.bundle/pom.xml index 5378d2528..d13413926 100644 --- a/integration-tests/bundles/dependency.factory.bundle/pom.xml +++ b/integration-tests/bundles/dependency.factory.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/dependency.test.bundle/pom.xml b/integration-tests/bundles/dependency.test.bundle/pom.xml index 8ffff86f4..64986a15e 100644 --- a/integration-tests/bundles/dependency.test.bundle/pom.xml +++ b/integration-tests/bundles/dependency.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/error.bundle/pom.xml b/integration-tests/bundles/error.bundle/pom.xml index edb91f6e8..76548f2a4 100644 --- a/integration-tests/bundles/error.bundle/pom.xml +++ b/integration-tests/bundles/error.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/extender.version.bundle/pom.xml b/integration-tests/bundles/extender.version.bundle/pom.xml index 835891212..f24427fb4 100644 --- a/integration-tests/bundles/extender.version.bundle/pom.xml +++ b/integration-tests/bundles/extender.version.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/io.fragment.1.bundle/pom.xml b/integration-tests/bundles/io.fragment.1.bundle/pom.xml index 804f53af7..419f12647 100644 --- a/integration-tests/bundles/io.fragment.1.bundle/pom.xml +++ b/integration-tests/bundles/io.fragment.1.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/io.fragment.2.bundle/pom.xml b/integration-tests/bundles/io.fragment.2.bundle/pom.xml index b5a39219a..7df5fb242 100644 --- a/integration-tests/bundles/io.fragment.2.bundle/pom.xml +++ b/integration-tests/bundles/io.fragment.2.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/lifecycle.test.bundle/pom.xml b/integration-tests/bundles/lifecycle.test.bundle/pom.xml index 32dbdc7ee..485ebd1e5 100644 --- a/integration-tests/bundles/lifecycle.test.bundle/pom.xml +++ b/integration-tests/bundles/lifecycle.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/pom.xml b/integration-tests/bundles/pom.xml index 43a797fc2..4f582870c 100644 --- a/integration-tests/bundles/pom.xml +++ b/integration-tests/bundles/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/reference.test.bundle/pom.xml b/integration-tests/bundles/reference.test.bundle/pom.xml index 3503cc9b7..ea9a2d1d8 100644 --- a/integration-tests/bundles/reference.test.bundle/pom.xml +++ b/integration-tests/bundles/reference.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/scoped.a.bundle/pom.xml b/integration-tests/bundles/scoped.a.bundle/pom.xml index b5cefee89..33905a7c9 100644 --- a/integration-tests/bundles/scoped.a.bundle/pom.xml +++ b/integration-tests/bundles/scoped.a.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/scoped.b.bundle/pom.xml b/integration-tests/bundles/scoped.b.bundle/pom.xml index c07af81fd..aa4c089b6 100644 --- a/integration-tests/bundles/scoped.b.bundle/pom.xml +++ b/integration-tests/bundles/scoped.b.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/scoped.common.bundle/pom.xml b/integration-tests/bundles/scoped.common.bundle/pom.xml index e4cc0b306..66b9fb5e6 100644 --- a/integration-tests/bundles/scoped.common.bundle/pom.xml +++ b/integration-tests/bundles/scoped.common.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/service.listener.bundle/pom.xml b/integration-tests/bundles/service.listener.bundle/pom.xml index d69a71ff7..07e319f50 100644 --- a/integration-tests/bundles/service.listener.bundle/pom.xml +++ b/integration-tests/bundles/service.listener.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.2.bundle/pom.xml b/integration-tests/bundles/simple.service.2.bundle/pom.xml index b36cf21d7..d6a8c648f 100644 --- a/integration-tests/bundles/simple.service.2.bundle/pom.xml +++ b/integration-tests/bundles/simple.service.2.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.3.bundle/pom.xml b/integration-tests/bundles/simple.service.3.bundle/pom.xml index ffc7dc0c0..f08cc38c9 100644 --- a/integration-tests/bundles/simple.service.3.bundle/pom.xml +++ b/integration-tests/bundles/simple.service.3.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml b/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml index 450951783..df6da7b88 100644 --- a/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml +++ b/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.bundle.identical/pom.xml b/integration-tests/bundles/simple.service.bundle.identical/pom.xml index e028ad5e1..7ff14e51a 100644 --- a/integration-tests/bundles/simple.service.bundle.identical/pom.xml +++ b/integration-tests/bundles/simple.service.bundle.identical/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.bundle/pom.xml b/integration-tests/bundles/simple.service.bundle/pom.xml index 6f94b81dc..ba557302e 100644 --- a/integration-tests/bundles/simple.service.bundle/pom.xml +++ b/integration-tests/bundles/simple.service.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/tccl.bundle/pom.xml b/integration-tests/bundles/tccl.bundle/pom.xml index 71c633143..65d3d84eb 100644 --- a/integration-tests/bundles/tccl.bundle/pom.xml +++ b/integration-tests/bundles/tccl.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/trivial.bundle/pom.xml b/integration-tests/bundles/trivial.bundle/pom.xml index 7204e55bf..6ff0a9db5 100644 --- a/integration-tests/bundles/trivial.bundle/pom.xml +++ b/integration-tests/bundles/trivial.bundle/pom.xml @@ -2,7 +2,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/trivial.test.bundle/pom.xml b/integration-tests/bundles/trivial.test.bundle/pom.xml index ef95bdadb..c33900b9a 100644 --- a/integration-tests/bundles/trivial.test.bundle/pom.xml +++ b/integration-tests/bundles/trivial.test.bundle/pom.xml @@ -2,7 +2,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index f2b0a954a..33e42ce1d 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/tests-tiger/.classpath b/integration-tests/tests-tiger/.classpath index 7489d2da0..60b0c2e27 100644 --- a/integration-tests/tests-tiger/.classpath +++ b/integration-tests/tests-tiger/.classpath @@ -5,7 +5,7 @@ - + @@ -17,9 +17,9 @@ - - - + + + diff --git a/integration-tests/tests-tiger/pom.xml b/integration-tests/tests-tiger/pom.xml index 30a10e3d6..ddaab2866 100644 --- a/integration-tests/tests-tiger/pom.xml +++ b/integration-tests/tests-tiger/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/tests/.classpath b/integration-tests/tests/.classpath index 1d62dc24f..b6bd6b127 100644 --- a/integration-tests/tests/.classpath +++ b/integration-tests/tests/.classpath @@ -11,16 +11,16 @@ - - - + + + - - + + - - + + @@ -31,8 +31,8 @@ - - - + + + diff --git a/integration-tests/tests/pom.xml b/integration-tests/tests/pom.xml index cf7793e23..70383131c 100644 --- a/integration-tests/tests/pom.xml +++ b/integration-tests/tests/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/io/.classpath b/io/.classpath index 1a22175d7..21a2ff400 100644 --- a/io/.classpath +++ b/io/.classpath @@ -5,7 +5,7 @@ - + diff --git a/io/pom.xml b/io/pom.xml index d6d93356c..0eed4dbb6 100644 --- a/io/pom.xml +++ b/io/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/mock/pom.xml b/mock/pom.xml index 180a9fb80..b5f7d7cda 100644 --- a/mock/pom.xml +++ b/mock/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/pom.xml b/pom.xml index 74ebb35e9..05ec2202d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.springframework.osgi spring-osgi pom - 1.0.1 + 1.0.2-SNAPSHOT Spring Dynamic Modules http://www.springframework.org/osgi @@ -24,11 +24,11 @@ - 1.0.1 + 1.0.2 - 1.0.1 - 1.0.1 + 1.0.2 + 1.0.2 * diff --git a/release/pom.xml b/release/pom.xml index 3305b397e..0cb9e06eb 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -12,7 +12,7 @@ org.springframework.osgi spring-osgi - 1.0.1 + 1.0.2-SNAPSHOT .. diff --git a/samples/petclinic/petclinic.sample.contract/pom.xml b/samples/petclinic/petclinic.sample.contract/pom.xml index d9e388de2..13a33f7e8 100644 --- a/samples/petclinic/petclinic.sample.contract/pom.xml +++ b/samples/petclinic/petclinic.sample.contract/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 @@ -11,7 +11,7 @@ contract jar Spring OSGi Samples: Simple Petclinic Contract - 1.0.1 + 1.0.2-SNAPSHOT http://www.springframework.org/osgi diff --git a/samples/petclinic/petclinic.sample.hsqldb/pom.xml b/samples/petclinic/petclinic.sample.hsqldb/pom.xml index 18e8d4e38..dd697f521 100644 --- a/samples/petclinic/petclinic.sample.hsqldb/pom.xml +++ b/samples/petclinic/petclinic.sample.hsqldb/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 @@ -11,7 +11,7 @@ hsqldb-impl jar Spring OSGi Samples: Simple Petclinic HSQLDB - 1.0.1 + 1.0.2-SNAPSHOT http://www.springframework.org/osgi diff --git a/samples/petclinic/petclinic.sample.jdbc/pom.xml b/samples/petclinic/petclinic.sample.jdbc/pom.xml index 214ae49e1..68c87889e 100644 --- a/samples/petclinic/petclinic.sample.jdbc/pom.xml +++ b/samples/petclinic/petclinic.sample.jdbc/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 @@ -11,7 +11,7 @@ jdbc jar Spring OSGi Samples: Simple Petclinic JDBC - 1.0.1 + 1.0.2-SNAPSHOT http://www.springframework.org/osgi diff --git a/samples/petclinic/petclinic.sample.mysql/pom.xml b/samples/petclinic/petclinic.sample.mysql/pom.xml index 7bb27c95e..ae5b7a3d8 100644 --- a/samples/petclinic/petclinic.sample.mysql/pom.xml +++ b/samples/petclinic/petclinic.sample.mysql/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 @@ -11,7 +11,7 @@ mysql-impl jar Spring OSGi Samples: Simple Petclinic MySQL - 1.0.1 + 1.0.2-SNAPSHOT http://www.springframework.org/osgi diff --git a/samples/petclinic/pom.xml b/samples/petclinic/pom.xml index 7e0be5439..72693928d 100644 --- a/samples/petclinic/pom.xml +++ b/samples/petclinic/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/pom.xml b/samples/pom.xml index 3985d183e..4ea8b5455 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/simple-service/pom.xml b/samples/simple-service/pom.xml index 07a43d766..36fa3dd12 100644 --- a/samples/simple-service/pom.xml +++ b/samples/simple-service/pom.xml @@ -3,7 +3,7 @@ samples org.springframework.osgi.samples - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/simple-service/simple-service-bundle/pom.xml b/samples/simple-service/simple-service-bundle/pom.xml index aecd618e2..6739e4476 100644 --- a/samples/simple-service/simple-service-bundle/pom.xml +++ b/samples/simple-service/simple-service-bundle/pom.xml @@ -2,7 +2,7 @@ simple-service org.springframework.osgi.samples - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/simple-service/simple-service-integration-test/pom.xml b/samples/simple-service/simple-service-integration-test/pom.xml index db841f27d..2b8a60f19 100644 --- a/samples/simple-service/simple-service-integration-test/pom.xml +++ b/samples/simple-service/simple-service-integration-test/pom.xml @@ -3,7 +3,7 @@ simple-service org.springframework.osgi.samples - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/weather/pom.xml b/samples/weather/pom.xml index 67fd92971..9dc78a3fb 100644 --- a/samples/weather/pom.xml +++ b/samples/weather/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/weather/weather-dao/pom.xml b/samples/weather/weather-dao/pom.xml index b4393fc75..c654061b6 100755 --- a/samples/weather/weather-dao/pom.xml +++ b/samples/weather/weather-dao/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.1 + 1.0.2-SNAPSHOT org.springframework.osgi.samples weather-dao diff --git a/samples/weather/weather-extension/pom.xml b/samples/weather/weather-extension/pom.xml index 14068ee19..223b7f4af 100644 --- a/samples/weather/weather-extension/pom.xml +++ b/samples/weather/weather-extension/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.1 + 1.0.2-SNAPSHOT org.springframework.osgi.samples weather-extension diff --git a/samples/weather/weather-service-integration-test/.classpath b/samples/weather/weather-service-integration-test/.classpath index ec71282df..6686f313a 100644 --- a/samples/weather/weather-service-integration-test/.classpath +++ b/samples/weather/weather-service-integration-test/.classpath @@ -11,6 +11,6 @@ - + diff --git a/samples/weather/weather-service-integration-test/pom.xml b/samples/weather/weather-service-integration-test/pom.xml index de2416b93..554a50bfa 100644 --- a/samples/weather/weather-service-integration-test/pom.xml +++ b/samples/weather/weather-service-integration-test/pom.xml @@ -3,7 +3,7 @@ weather org.springframework.osgi.samples - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/weather/weather-service-test/pom.xml b/samples/weather/weather-service-test/pom.xml index 7ff1ae85d..71841ba8b 100755 --- a/samples/weather/weather-service-test/pom.xml +++ b/samples/weather/weather-service-test/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.1 + 1.0.2-SNAPSHOT org.springframework.osgi.samples weather-service-test diff --git a/samples/weather/weather-service/pom.xml b/samples/weather/weather-service/pom.xml index b0198c658..483ed2d7d 100755 --- a/samples/weather/weather-service/pom.xml +++ b/samples/weather/weather-service/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.1 + 1.0.2-SNAPSHOT org.springframework.osgi.samples weather-service diff --git a/samples/weather/wiring-bundle/.classpath b/samples/weather/wiring-bundle/.classpath index 3f0447927..01f8e24e1 100644 --- a/samples/weather/wiring-bundle/.classpath +++ b/samples/weather/wiring-bundle/.classpath @@ -13,7 +13,7 @@ - - + + diff --git a/samples/weather/wiring-bundle/pom.xml b/samples/weather/wiring-bundle/pom.xml index bbbb6c5cb..9a0313407 100755 --- a/samples/weather/wiring-bundle/pom.xml +++ b/samples/weather/wiring-bundle/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.1 + 1.0.2-SNAPSHOT org.springframework.osgi.samples wiring-bundle diff --git a/test-support/.classpath b/test-support/.classpath index 42e9ef136..0b0845744 100644 --- a/test-support/.classpath +++ b/test-support/.classpath @@ -15,13 +15,13 @@ - - + + - + diff --git a/test-support/pom.xml b/test-support/pom.xml index a84260d29..14c2f5292 100644 --- a/test-support/pom.xml +++ b/test-support/pom.xml @@ -2,7 +2,7 @@ spring-osgi org.springframework.osgi - 1.0.1 + 1.0.2-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties b/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties index d30d89cab..c90c8257a 100644 --- a/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties +++ b/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties @@ -26,7 +26,7 @@ ignore.junit.version=3.8.2-SNAPSHOT ignore.log4j.version=1.2.15-SNAPSHOT ignore.spring.version=2.5.1 -ignore.spring.osgi.version=1.0.1 +ignore.spring.osgi.version=1.0.2-SNAPSHOT ignore.slf4j.version=1.4.3 ignore.asm.version=2.2.3-SNAPSHOT From 75afd8016fb7ca420912d784f934e3790417a8b6 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Thu, 28 Feb 2008 19:23:18 +0000 Subject: [PATCH 17/53] + update felix classpath in Eclipse --- integration-tests/tests/.classpath | 2 +- test-support/.classpath | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-tests/tests/.classpath b/integration-tests/tests/.classpath index b6bd6b127..7235bd186 100644 --- a/integration-tests/tests/.classpath +++ b/integration-tests/tests/.classpath @@ -16,7 +16,7 @@ - + diff --git a/test-support/.classpath b/test-support/.classpath index 0b0845744..70f5760b9 100644 --- a/test-support/.classpath +++ b/test-support/.classpath @@ -22,6 +22,6 @@ - + From f2113d2f5f4c4350d9bea61a4179d10fcb213af4 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Fri, 7 Mar 2008 11:23:30 +0000 Subject: [PATCH 18/53] OSGI-397 OSGI-295 + BundleDelegatingClassLoader hashCode/equals are removed (so the default implementations are used) --- changelog.txt | 5 ++++- .../util/BundleDelegatingClassLoader.java | 21 ------------------- ...hableOsgiBundleApplicationContextTest.java | 5 ++--- .../util/BundleDelegatingClassLoaderTest.java | 5 +++-- 4 files changed, 9 insertions(+), 27 deletions(-) diff --git a/changelog.txt b/changelog.txt index 51e14f0d0..5ee789ddf 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,9 +2,12 @@ SPRING DYNAMIC MODULES FRAMEWORK CHANGELOG ========================================== http://www.springframework.org/osgi -Changes in version 1.0.2 (200y-mm-dd) +Changes in version 1.0.2 (2008-03-xx) ------------------------------------- +Package org.springframework.osgi.util +* BundleDelegatingClassLoader relies on default hashCode/equals methods to prevent caching proxies on bundle updates + Changes in version 1.0.1 (2008-02-29) ------------------------------------- diff --git a/core/src/main/java/org/springframework/osgi/util/BundleDelegatingClassLoader.java b/core/src/main/java/org/springframework/osgi/util/BundleDelegatingClassLoader.java index 1590858f1..a05d55bce 100644 --- a/core/src/main/java/org/springframework/osgi/util/BundleDelegatingClassLoader.java +++ b/core/src/main/java/org/springframework/osgi/util/BundleDelegatingClassLoader.java @@ -95,27 +95,6 @@ private BundleDelegatingClassLoader(Bundle bundle, ClassLoader bridgeLoader) { this.bridge = bridgeLoader; } - public boolean equals(Object o) { - if (this == o) - return true; - - if (!(o instanceof BundleDelegatingClassLoader)) - return false; - - final BundleDelegatingClassLoader bundleDelegatingClassLoader = (BundleDelegatingClassLoader) o; - - return (backingBundle.equals(bundleDelegatingClassLoader.backingBundle) && ObjectUtils.nullSafeEquals(bridge, - bundleDelegatingClassLoader.bridge)); - } - - public int hashCode() { - int hashCode = backingBundle.hashCode(); - if (bridge != null) - hashCode |= bridge.hashCode(); - - return hashCode; - } - protected Class findClass(String name) throws ClassNotFoundException { try { return this.backingBundle.loadClass(name); diff --git a/core/src/test/java/org/springframework/osgi/context/support/AbstractRefreshableOsgiBundleApplicationContextTest.java b/core/src/test/java/org/springframework/osgi/context/support/AbstractRefreshableOsgiBundleApplicationContextTest.java index 01b6baef6..2005c872b 100644 --- a/core/src/test/java/org/springframework/osgi/context/support/AbstractRefreshableOsgiBundleApplicationContextTest.java +++ b/core/src/test/java/org/springframework/osgi/context/support/AbstractRefreshableOsgiBundleApplicationContextTest.java @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.springframework.osgi.context.support; import java.io.IOException; @@ -24,7 +25,6 @@ import org.easymock.MockControl; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; -import org.springframework.aop.framework.ProxyFactory; import org.springframework.beans.BeansException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.core.io.Resource; @@ -39,6 +39,7 @@ public class AbstractRefreshableOsgiBundleApplicationContextTest extends TestCas private AbstractOsgiBundleApplicationContext context; + /* * (non-Javadoc) * @@ -90,8 +91,6 @@ public void testBundleContext() throws Exception { ClassLoader loader = context.getClassLoader(); assertTrue(loader instanceof BundleDelegatingClassLoader); - assertEquals( - BundleDelegatingClassLoader.createBundleClassLoaderFor(bundle, ProxyFactory.class.getClassLoader()), loader); // do some resource loading assertEquals(bundleResource, context.getResource(location)); diff --git a/core/src/test/java/org/springframework/osgi/util/BundleDelegatingClassLoaderTest.java b/core/src/test/java/org/springframework/osgi/util/BundleDelegatingClassLoaderTest.java index 329b8f32d..4f77418eb 100644 --- a/core/src/test/java/org/springframework/osgi/util/BundleDelegatingClassLoaderTest.java +++ b/core/src/test/java/org/springframework/osgi/util/BundleDelegatingClassLoaderTest.java @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.springframework.osgi.util; import java.net.URL; @@ -37,6 +38,7 @@ public class BundleDelegatingClassLoaderTest extends TestCase { private Bundle bundle; + protected void setUp() throws Exception { bundleCtrl = MockControl.createStrictControl(Bundle.class); bundle = (Bundle) bundleCtrl.getMock(); @@ -57,10 +59,9 @@ public void testEquals() { assertFalse(classLoader.equals(new Object())); assertEquals(classLoader, classLoader); - assertTrue(classLoader.equals(BundleDelegatingClassLoader.createBundleClassLoaderFor(bundle, + assertFalse(classLoader.equals(BundleDelegatingClassLoader.createBundleClassLoaderFor(bundle, ProxyFactory.class.getClassLoader()))); - // assertEquals(bundle.hashCode(), clientClassLoader.hashCode()); } public void testFindClass() throws Exception { From 3193bbc2cf50d614af93aff84b1498f2758931a4 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Fri, 7 Mar 2008 13:28:14 +0000 Subject: [PATCH 19/53] backported some fixes from trunk: OSGI-400 + by default, only the interfaces of the OSGi ApplicationContext are published + the testing framework empty appCtx sees the beans.factory package as well (so it can export the same number of interfaces as the usual contexts) --- changelog.txt | 3 + .../AbstractOsgiBundleApplicationContext.java | 9 ++- .../util/BundleDelegatingClassLoader.java | 1 - .../context/PublishedInterfacesTest.java | 58 +++++++++++++++++++ .../osgi/iandt/context/no-op-context.xml | 10 ++++ ...tractOptionalDependencyInjectionTests.java | 5 +- 6 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 integration-tests/tests/src/test/java/org/springframework/osgi/iandt/context/PublishedInterfacesTest.java create mode 100644 integration-tests/tests/src/test/resources/org/springframework/osgi/iandt/context/no-op-context.xml diff --git a/changelog.txt b/changelog.txt index 5ee789ddf..33ae4e292 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,9 @@ http://www.springframework.org/osgi Changes in version 1.0.2 (2008-03-xx) ------------------------------------- +Package org.springframework.osgi.context +* AbstractOsgiBundleApplicationContext registers the application context as an OSGi service using just the interfaces + Package org.springframework.osgi.util * BundleDelegatingClassLoader relies on default hashCode/equals methods to prevent caching proxies on bundle updates diff --git a/core/src/main/java/org/springframework/osgi/context/support/AbstractOsgiBundleApplicationContext.java b/core/src/main/java/org/springframework/osgi/context/support/AbstractOsgiBundleApplicationContext.java index 9c9723739..ac8fe287b 100644 --- a/core/src/main/java/org/springframework/osgi/context/support/AbstractOsgiBundleApplicationContext.java +++ b/core/src/main/java/org/springframework/osgi/context/support/AbstractOsgiBundleApplicationContext.java @@ -186,9 +186,14 @@ public String[] getConfigLocations() { */ protected void doClose() { if (!OsgiServiceUtils.unregisterService(serviceRegistration)) { - logger.info("The application context service has been already unregistered"); + logger.info("Unpublishing application context with properties (" + + APPLICATION_CONTEXT_SERVICE_PROPERTY_NAME + "=" + getBundleSymbolicName() + ")"); serviceRegistration = null; } + else { + if (publishContextAsService) + logger.info("Application Context service already unpublished"); + } // call super class super.doClose(); @@ -279,7 +284,7 @@ void publishContextAsOsgiServiceIfNecessary() { } Class[] classes = org.springframework.osgi.util.internal.ClassUtils.getClassHierarchy(getClass(), - org.springframework.osgi.util.internal.ClassUtils.INCLUDE_ALL_CLASSES); + org.springframework.osgi.util.internal.ClassUtils.INCLUDE_INTERFACES); // filter classes based on visibility Class[] filterClasses = org.springframework.osgi.util.internal.ClassUtils.getVisibleClasses(classes, diff --git a/core/src/main/java/org/springframework/osgi/util/BundleDelegatingClassLoader.java b/core/src/main/java/org/springframework/osgi/util/BundleDelegatingClassLoader.java index a05d55bce..c38a895ce 100644 --- a/core/src/main/java/org/springframework/osgi/util/BundleDelegatingClassLoader.java +++ b/core/src/main/java/org/springframework/osgi/util/BundleDelegatingClassLoader.java @@ -26,7 +26,6 @@ import org.apache.commons.logging.Log; import org.osgi.framework.Bundle; import org.springframework.util.Assert; -import org.springframework.util.ObjectUtils; /** * ClassLoader backed by an OSGi bundle. Provides the ability to use a separate diff --git a/integration-tests/tests/src/test/java/org/springframework/osgi/iandt/context/PublishedInterfacesTest.java b/integration-tests/tests/src/test/java/org/springframework/osgi/iandt/context/PublishedInterfacesTest.java new file mode 100644 index 000000000..a12f4b81f --- /dev/null +++ b/integration-tests/tests/src/test/java/org/springframework/osgi/iandt/context/PublishedInterfacesTest.java @@ -0,0 +1,58 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.iandt.context; + +import org.osgi.framework.Constants; +import org.osgi.framework.ServiceReference; +import org.springframework.osgi.context.ConfigurableOsgiBundleApplicationContext; +import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext; +import org.springframework.osgi.iandt.BaseIntegrationTest; + +/** + * Test checking the context published interfaces. + * + * @author Costin Leau + * + */ +public class PublishedInterfacesTest extends BaseIntegrationTest { + + public void testEmptyApplicationContext() throws Exception { + checkPublishedInterfaces(1); + } + + public void testXmlOsgiContext() throws Exception { + OsgiBundleXmlApplicationContext context = new OsgiBundleXmlApplicationContext( + new String[] { "/org/springframework/osgi/iandt/context/no-op-context.xml" }); + context.setBundleContext(bundleContext); + context.refresh(); + + checkPublishedInterfaces(2); + context.close(); + } + + private void checkPublishedInterfaces(int expectedContexts) throws Exception { + ServiceReference[] refs = bundleContext.getServiceReferences( + ConfigurableOsgiBundleApplicationContext.class.getName(), null); + assertEquals("different number of published contexts encountered", expectedContexts, refs.length); + + for (int i = 0; i < refs.length; i++) { + ServiceReference serviceReference = refs[i]; + String[] interfaces = (String[]) serviceReference.getProperty(Constants.OBJECTCLASS); + assertEquals("not enough interfaces published", 13, interfaces.length); + } + } +} diff --git a/integration-tests/tests/src/test/resources/org/springframework/osgi/iandt/context/no-op-context.xml b/integration-tests/tests/src/test/resources/org/springframework/osgi/iandt/context/no-op-context.xml new file mode 100644 index 000000000..fa4b35535 --- /dev/null +++ b/integration-tests/tests/src/test/resources/org/springframework/osgi/iandt/context/no-op-context.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/test-support/src/main/java/org/springframework/osgi/test/AbstractOptionalDependencyInjectionTests.java b/test-support/src/main/java/org/springframework/osgi/test/AbstractOptionalDependencyInjectionTests.java index c7faaf1fc..8b364da27 100644 --- a/test-support/src/main/java/org/springframework/osgi/test/AbstractOptionalDependencyInjectionTests.java +++ b/test-support/src/main/java/org/springframework/osgi/test/AbstractOptionalDependencyInjectionTests.java @@ -20,6 +20,7 @@ import org.osgi.framework.BundleContext; import org.springframework.beans.BeansException; +import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.osgi.context.ConfigurableOsgiBundleApplicationContext; @@ -52,7 +53,9 @@ public abstract class AbstractOptionalDependencyInjectionTests extends AbstractD * @author Costin Leau * */ - private static class EmptyOsgiApplicationContext extends AbstractDelegatedExecutionApplicationContext { + // the disposable interface is added just so that byte code detect the org.springframework.beans.factory package + private static class EmptyOsgiApplicationContext extends AbstractDelegatedExecutionApplicationContext implements + DisposableBean { protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException, BeansException { } From fdc21f0e92455c0e815d8be57cda5ee914dee2eb Mon Sep 17 00:00:00 2001 From: costin_leau Date: Fri, 7 Mar 2008 17:03:46 +0000 Subject: [PATCH 20/53] backport more changes from trunk: OSGI-397 + test case showing the fix + thanks go to Alexei Akimov for reporting the issue and creating an excellent test case + installed bundles have the location set to the URL (so that updates work) --- changelog.txt | 3 + .../bundles/proxy.creator.bundle/.classpath | 9 +++ .../bundles/proxy.creator.bundle/.project | 28 +++++++ .../bundles/proxy.creator.bundle/pom.xml | 20 +++++ .../proxycreator/SomeImplementation.java | 37 +++++++++ .../iandt/proxycreator/SomeInterface.java | 29 +++++++ .../osgi/iandt/proxycreator/Test.java | 75 +++++++++++++++++++ .../src/main/resources/META-INF/MANIFEST.MF | 7 ++ .../resources/META-INF/spring/context.xml | 35 +++++++++ .../osgi/test/AbstractOsgiTests.java | 13 +++- 10 files changed, 255 insertions(+), 1 deletion(-) create mode 100644 integration-tests/bundles/proxy.creator.bundle/.classpath create mode 100644 integration-tests/bundles/proxy.creator.bundle/.project create mode 100644 integration-tests/bundles/proxy.creator.bundle/pom.xml create mode 100644 integration-tests/bundles/proxy.creator.bundle/src/main/java/org/springframework/osgi/iandt/proxycreator/SomeImplementation.java create mode 100644 integration-tests/bundles/proxy.creator.bundle/src/main/java/org/springframework/osgi/iandt/proxycreator/SomeInterface.java create mode 100644 integration-tests/bundles/proxy.creator.bundle/src/main/java/org/springframework/osgi/iandt/proxycreator/Test.java create mode 100644 integration-tests/bundles/proxy.creator.bundle/src/main/resources/META-INF/MANIFEST.MF create mode 100644 integration-tests/bundles/proxy.creator.bundle/src/main/resources/META-INF/spring/context.xml diff --git a/changelog.txt b/changelog.txt index 33ae4e292..2f8aab3d0 100644 --- a/changelog.txt +++ b/changelog.txt @@ -11,6 +11,9 @@ Package org.springframework.osgi.context Package org.springframework.osgi.util * BundleDelegatingClassLoader relies on default hashCode/equals methods to prevent caching proxies on bundle updates +Package org.springframework.osgi.test +* Instalation bundles have the location set to the backing resource URL if possible, falling back to the description + Changes in version 1.0.1 (2008-02-29) ------------------------------------- diff --git a/integration-tests/bundles/proxy.creator.bundle/.classpath b/integration-tests/bundles/proxy.creator.bundle/.classpath new file mode 100644 index 000000000..4516b4fb0 --- /dev/null +++ b/integration-tests/bundles/proxy.creator.bundle/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/integration-tests/bundles/proxy.creator.bundle/.project b/integration-tests/bundles/proxy.creator.bundle/.project new file mode 100644 index 000000000..28ae1f083 --- /dev/null +++ b/integration-tests/bundles/proxy.creator.bundle/.project @@ -0,0 +1,28 @@ + + + Proxy Creator + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/integration-tests/bundles/proxy.creator.bundle/pom.xml b/integration-tests/bundles/proxy.creator.bundle/pom.xml new file mode 100644 index 000000000..83cc0e64f --- /dev/null +++ b/integration-tests/bundles/proxy.creator.bundle/pom.xml @@ -0,0 +1,20 @@ + + + spring-osgi-integration-test-bundles + org.springframework.osgi + 1.0.2-SNAPSHOT + + + 4.0.0 + org.springframework.osgi + org.springframework.osgi.iandt.proxy.creator + jar + Spring OSGi Test Bundle: Spring Proxy Creator bundle + An OSGi bundle that creates proxies internally and is updated + http://www.springframework.org/osgi + + + diff --git a/integration-tests/bundles/proxy.creator.bundle/src/main/java/org/springframework/osgi/iandt/proxycreator/SomeImplementation.java b/integration-tests/bundles/proxy.creator.bundle/src/main/java/org/springframework/osgi/iandt/proxycreator/SomeImplementation.java new file mode 100644 index 000000000..cd3c7232d --- /dev/null +++ b/integration-tests/bundles/proxy.creator.bundle/src/main/java/org/springframework/osgi/iandt/proxycreator/SomeImplementation.java @@ -0,0 +1,37 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.iandt.proxycreator; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * @author Costin Leau + * + */ +public class SomeImplementation implements SomeInterface { + + /** logger */ + private static final Log log = LogFactory.getLog(SomeImplementation.class); + + + public boolean doSmth(Object argument) { + log.info("received " + argument); + return true; + } + +} diff --git a/integration-tests/bundles/proxy.creator.bundle/src/main/java/org/springframework/osgi/iandt/proxycreator/SomeInterface.java b/integration-tests/bundles/proxy.creator.bundle/src/main/java/org/springframework/osgi/iandt/proxycreator/SomeInterface.java new file mode 100644 index 000000000..e3fe3588b --- /dev/null +++ b/integration-tests/bundles/proxy.creator.bundle/src/main/java/org/springframework/osgi/iandt/proxycreator/SomeInterface.java @@ -0,0 +1,29 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.iandt.proxycreator; + +/** + * Interface. We cannot used one from outside the bundle since we want to expose + * the CL problems. + * + * @author Costin Leau + * + */ +public interface SomeInterface { + + boolean doSmth(Object argument); +} diff --git a/integration-tests/bundles/proxy.creator.bundle/src/main/java/org/springframework/osgi/iandt/proxycreator/Test.java b/integration-tests/bundles/proxy.creator.bundle/src/main/java/org/springframework/osgi/iandt/proxycreator/Test.java new file mode 100644 index 000000000..9c178acc8 --- /dev/null +++ b/integration-tests/bundles/proxy.creator.bundle/src/main/java/org/springframework/osgi/iandt/proxycreator/Test.java @@ -0,0 +1,75 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.iandt.proxycreator; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * Simple test that touches proxies created through spring. While this test + * doesn't do much by itself, it should always work even when the bundle it runs + * in, is updated. Failure to do so implies incorrect usage of the appropriate + * class loader. + * + * Thanks to Alexei Akimov for the proof of concept. + * + * @author Costin Leau + * + */ +public class Test { + + /** logger */ + private static final Log log = LogFactory.getLog(Test.class); + + private SomeInterface jdkProxy; + private SomeInterface cglibProxy; + + + /** + * Sets echo JDK proxy + * + * @param echoJdkProxy + */ + public void setJdkProxy(SomeInterface echoJdkProxy) { + this.jdkProxy = echoJdkProxy; + } + + /** + * Sets echo CGLIB proxy + * + * @param echoCglibProxy + */ + public void setCglibProxy(SomeInterface echoCglibProxy) { + this.cglibProxy = echoCglibProxy; + } + + public void test() { + testInterface(jdkProxy); + testInterface(cglibProxy); + } + + // interact with the proxy to make sure the weaving process is successful + private void testInterface(SomeInterface intfs) { + try { + log.info("testing proxy interception..."); + intfs.doSmth("hangar 18"); + } + catch (Throwable th) { + log.error("caught exception", th); + } + } +} diff --git a/integration-tests/bundles/proxy.creator.bundle/src/main/resources/META-INF/MANIFEST.MF b/integration-tests/bundles/proxy.creator.bundle/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 000000000..adf07797a --- /dev/null +++ b/integration-tests/bundles/proxy.creator.bundle/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,7 @@ +Bundle-Name: org-springframework-osgi-iandt-proxy-creator +Bundle-SymbolicName: org.springframework.osgi.iandt.proxy.creator +Bundle-ManifestVersion: 2 +Bundle-Version: 1.0 +Import-Package: org.apache.commons.logging +Export-Package: org.springframework.osgi.iandt.service.listener +Spring-Context: *; eagerly-init-importers:=true diff --git a/integration-tests/bundles/proxy.creator.bundle/src/main/resources/META-INF/spring/context.xml b/integration-tests/bundles/proxy.creator.bundle/src/main/resources/META-INF/spring/context.xml new file mode 100644 index 000000000..652dc77bb --- /dev/null +++ b/integration-tests/bundles/proxy.creator.bundle/src/main/resources/META-INF/spring/context.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + org.springframework.osgi.iandt.proxycreator.SomeInterface + + + loggerInterceptor + + + + + + + loggerInterceptor + + + + + + + + + diff --git a/test-support/src/main/java/org/springframework/osgi/test/AbstractOsgiTests.java b/test-support/src/main/java/org/springframework/osgi/test/AbstractOsgiTests.java index 35c980b8a..c7b20b37f 100644 --- a/test-support/src/main/java/org/springframework/osgi/test/AbstractOsgiTests.java +++ b/test-support/src/main/java/org/springframework/osgi/test/AbstractOsgiTests.java @@ -306,7 +306,18 @@ private Bundle installBundle(Resource location) throws Exception { Assert.notNull(location); if (logger.isDebugEnabled()) logger.debug("Installing bundle from location " + location.getDescription()); - return platformContext.installBundle(location.getDescription(), location.getInputStream()); + + String bundleLocation; + + try { + bundleLocation = location.getURL().toExternalForm(); + } + catch (Exception ex) { + // the URL cannot be created, fall back to the description + bundleLocation = location.getDescription(); + } + + return platformContext.installBundle(bundleLocation, location.getInputStream()); } /** From db1cbaff76a2bd09cf765e9c34d1d1ddaf005653 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Fri, 7 Mar 2008 18:01:18 +0000 Subject: [PATCH 21/53] + add test dependency to build --- integration-tests/bundles/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/integration-tests/bundles/pom.xml b/integration-tests/bundles/pom.xml index 4f582870c..c8986333d 100644 --- a/integration-tests/bundles/pom.xml +++ b/integration-tests/bundles/pom.xml @@ -56,6 +56,7 @@ config.bundle tccl.bundle config.file.with.dots.bundle + proxy.creator.bundle From 5e518df1b1a4430489cdf468acbc18599f41a882 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Sun, 9 Mar 2008 18:02:02 +0000 Subject: [PATCH 22/53] OSGI-393 OSGI-398 --- annotation/pom.xml | 5 +++++ core/pom.xml | 14 +++++++++++--- extender/pom.xml | 4 +++- pom.xml | 5 ++++- test-support/pom.xml | 2 ++ 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/annotation/pom.xml b/annotation/pom.xml index 0e28568bc..d359efb0c 100644 --- a/annotation/pom.xml +++ b/annotation/pom.xml @@ -19,6 +19,11 @@ ${basedir}/../docs/src/javadoc org.springframework.osgi.extensions.annotation ${symName.prefix}.extensions.annotations + + org.springframework.osgi*;version=${spring.osgi.import.version}, + org.springframework*;version=${spring.base.version}, + * + diff --git a/core/pom.xml b/core/pom.xml index 95a380872..acd5af226 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -20,9 +20,11 @@ ${basedir}/../docs/src/javadoc - - !org.springframework.osgi.io*, !org.springframework.osgi.io.internal, org.springframework.osgi* - + + !org.springframework.osgi.io*, + !org.springframework.osgi*internal*, + org.springframework.osgi*;version=${spring.osgi.export.version} + org.apache.commons.logging*, @@ -31,9 +33,15 @@ org.osgi.service.startlevel;version=1.0;resolution:=optional, org.w3c.dom;resolution:=optional, org.xml.sax;resolution:=optional, + org.springframework.osgi*;version=${spring.osgi.import.version}, * + + !org.springframework.osgi.io*, + org.springframework.osgi*internal* + + ${symName.prefix}.core diff --git a/extender/pom.xml b/extender/pom.xml index e8bf71ca7..11c3321c3 100644 --- a/extender/pom.xml +++ b/extender/pom.xml @@ -27,7 +27,9 @@ org.apache.commons.logging*, - org.springframework.beans.factory.xml, + org.springframework.osgi*;version=${spring.osgi.import.version}, + org.springframework.beans.factory.xml;version=${spring.base.version}, + org.springframework*;version=${spring.base.version}, org.xml.sax;resolution:=optional, * diff --git a/pom.xml b/pom.xml index 05ec2202d..cb8a24fd6 100644 --- a/pom.xml +++ b/pom.xml @@ -20,9 +20,12 @@ 2.5.1 + 2.5 - + + 1.0 + 1.0.2 diff --git a/test-support/pom.xml b/test-support/pom.xml index 14c2f5292..e3d86e598 100644 --- a/test-support/pom.xml +++ b/test-support/pom.xml @@ -30,6 +30,8 @@ org.eclipse.*;resolution:=optional, org.knopflerfish*;resolution:=optional, org.apache.felix.*;resolution:=optional, + org.springframework.osgi*;version=${spring.osgi.import.version}, + org.springframework*;version=${spring.base.version}, * ${symName.prefix}.test From bbfcde97434705e2b48f47dfd4a3ba4399003e5b Mon Sep 17 00:00:00 2001 From: costin_leau Date: Sun, 9 Mar 2008 19:35:14 +0000 Subject: [PATCH 23/53] fix test import --- .../ServiceRefAwareWithSingleServiceTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/integration-tests/tests/src/test/java/org/springframework/osgi/iandt/serviceProxyFactoryBean/ServiceRefAwareWithSingleServiceTest.java b/integration-tests/tests/src/test/java/org/springframework/osgi/iandt/serviceProxyFactoryBean/ServiceRefAwareWithSingleServiceTest.java index 64d312110..fb7d5740d 100644 --- a/integration-tests/tests/src/test/java/org/springframework/osgi/iandt/serviceProxyFactoryBean/ServiceRefAwareWithSingleServiceTest.java +++ b/integration-tests/tests/src/test/java/org/springframework/osgi/iandt/serviceProxyFactoryBean/ServiceRefAwareWithSingleServiceTest.java @@ -19,6 +19,7 @@ import java.util.Dictionary; import java.util.Enumeration; import java.util.Map; +import java.util.Properties; import org.osgi.framework.ServiceRegistration; import org.springframework.aop.SpringProxy; @@ -27,7 +28,6 @@ import org.springframework.osgi.service.importer.support.Cardinality; import org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean; import org.springframework.osgi.util.BundleDelegatingClassLoader; -import org.springframework.osgi.util.internal.MapBasedDictionary; /** * @author Costin Leau @@ -55,7 +55,7 @@ protected void onTearDown() throws Exception { public void tstProxyForUnaryCardinality() throws Exception { long time = 1234; Date date = new Date(time); - Dictionary dict = new MapBasedDictionary(); + Dictionary dict = new Properties(); ServiceRegistration reg = publishService(date); fb = new OsgiServiceProxyFactoryBean(); @@ -105,7 +105,7 @@ public void testServiceReferenceProperties() throws Exception { long time = 1234; Date date = new Date(time); - Dictionary dict = new MapBasedDictionary(); + Dictionary dict = new Properties(); dict.put("foo", "bar"); dict.put("george", "michael"); From 49424da725cca6eabdd9a4c1e3ddf851f6b25035 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Mon, 10 Mar 2008 14:10:28 +0000 Subject: [PATCH 24/53] OSGI-405 + increased logging level to INFO for service dependency waiting statements --- changelog.txt | 6 ++++++ .../startup/DependencyServiceManager.java | 14 +++++--------- ...ependencyWaiterApplicationContextExecutor.java | 15 +++++++-------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/changelog.txt b/changelog.txt index 2f8aab3d0..59e9631c0 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,9 +5,15 @@ http://www.springframework.org/osgi Changes in version 1.0.2 (2008-03-xx) ------------------------------------- +General +* adjusted the manifests so no internal packages are exposed and the versions both spring and spring-osgi are present + Package org.springframework.osgi.context * AbstractOsgiBundleApplicationContext registers the application context as an OSGi service using just the interfaces +Package org.springframework.osgi.extender +* raised service dependency waiting logging level to INFO (from DEBUG) + Package org.springframework.osgi.util * BundleDelegatingClassLoader relies on default hashCode/equals methods to prevent caching proxies on bundle updates diff --git a/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyServiceManager.java b/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyServiceManager.java index e05a63066..a8a114c80 100644 --- a/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyServiceManager.java +++ b/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyServiceManager.java @@ -97,10 +97,8 @@ public void serviceChanged(ServiceEvent serviceEvent) { if (unsatisfiedDependencies.isEmpty()) { deregister(); // context.listener = null; - if (debug) { - log.debug("No outstanding dependencies, completing initialization for " - + context.getDisplayName()); - } + log.info("No outstanding OSGi service dependencies, completing initialization for " + + context.getDisplayName()); // execute task to complete initialization // NOTE: the runnable should be able to delegate any long @@ -208,7 +206,7 @@ protected void findServiceDependencies() { dependencies.add(dependency); if (!dependency.isServicePresent()) { if (debug) - log.debug("adding dependency for importer " + beanName); + log.debug("adding OSGi service dependency for importer " + beanName); unsatisfiedDependencies.add(dependency); } } @@ -217,10 +215,8 @@ protected void findServiceDependencies() { currentThread.setContextClassLoader(oldTCCL); } - if (debug) { - log.debug(dependencies.size() + " dependencies, " + unsatisfiedDependencies.size() + " unsatisfied for " - + context.getDisplayName()); - } + log.info(dependencies.size() + " OSGi service dependencies, " + unsatisfiedDependencies.size() + + " unsatisfied for " + context.getDisplayName()); } diff --git a/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyWaiterApplicationContextExecutor.java b/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyWaiterApplicationContextExecutor.java index 99bf261b0..66f231cf7 100644 --- a/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyWaiterApplicationContextExecutor.java +++ b/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyWaiterApplicationContextExecutor.java @@ -240,9 +240,8 @@ public void run() { // all dependencies are met, just go with stageTwo if (dl.isSatisfied()) { - if (debug) { - log.debug("No outstanding dependencies, completing initialization for " + getDisplayName()); - } + + log.info("No outstanding OSGi service dependencies, completing initialization for " + getDisplayName()); stageTwo(); } @@ -291,11 +290,11 @@ protected void stageTwo() { synchronized (monitor) { -// if (state == ContextState.DEPENDENCIES_RESOLVED) { -// if (debug) -// log.debug("context [" + getDisplayName() + "] already in state (" + state + "); bailing out"); -// return; -// } + // if (state == ContextState.DEPENDENCIES_RESOLVED) { + // if (debug) + // log.debug("context [" + getDisplayName() + "] already in state (" + state + "); bailing out"); + // return; + // } if (state != ContextState.RESOLVING_DEPENDENCIES) { logWrongState(ContextState.RESOLVING_DEPENDENCIES); return; From 11a817853470f4a26a759ff190ab067d55caca96 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Mon, 10 Mar 2008 15:14:38 +0000 Subject: [PATCH 25/53] OSGI-393 + added testcase that checks expected behavior (cannot reproduce the reported problem) --- .../BaseTestCaseWithVisibleMethods.java | 47 +++++++++ ...ifferentParentsInDifferentBundlesTest.java | 97 +++++++++++++++++++ .../packageA/BaseClassFromAnotherPackage.java | 4 +- .../BaseClassFromAnotherPackageAndBundle.java | 2 + ...ifferentParentsInDifferentBundlesTest.java | 65 ------------- .../TestInDifferentPackageThenItsParents.java | 21 +--- .../packageX/BaseClassInACertainPackage.java | 44 +++++++++ .../ParentClassWithCertainInterfaceTest.java | 31 ++++++ .../test/parsing/packageZ/FinalTestClass.java | 32 ++++++ .../src/test/resources/log4j.properties | 2 +- 10 files changed, 261 insertions(+), 84 deletions(-) create mode 100644 test-support/src/test/java/org/springframework/osgi/test/parsing/BaseTestCaseWithVisibleMethods.java create mode 100644 test-support/src/test/java/org/springframework/osgi/test/parsing/DifferentParentsInDifferentBundlesTest.java delete mode 100644 test-support/src/test/java/org/springframework/osgi/test/parsing/packageC/DifferentParentsInDifferentBundlesTest.java create mode 100644 test-support/src/test/java/org/springframework/osgi/test/parsing/packageX/BaseClassInACertainPackage.java create mode 100644 test-support/src/test/java/org/springframework/osgi/test/parsing/packageY/ParentClassWithCertainInterfaceTest.java create mode 100644 test-support/src/test/java/org/springframework/osgi/test/parsing/packageZ/FinalTestClass.java diff --git a/test-support/src/test/java/org/springframework/osgi/test/parsing/BaseTestCaseWithVisibleMethods.java b/test-support/src/test/java/org/springframework/osgi/test/parsing/BaseTestCaseWithVisibleMethods.java new file mode 100644 index 000000000..e0a4f49e5 --- /dev/null +++ b/test-support/src/test/java/org/springframework/osgi/test/parsing/BaseTestCaseWithVisibleMethods.java @@ -0,0 +1,47 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.test.parsing; + +import java.util.Properties; +import java.util.jar.Manifest; + +import org.springframework.osgi.test.AbstractConfigurableBundleCreatorTests; + +/** + * @author Costin Leau + * + */ +public class BaseTestCaseWithVisibleMethods extends AbstractConfigurableBundleCreatorTests { + + public String getRootPath() { + return super.getRootPath(); + } + + public Manifest getManifest() { + return super.getManifest(); + } + + public Properties getSettings() throws Exception { + return super.getSettings(); + } + + public String[] getBundleContentPattern() { + return super.getBundleContentPattern(); + } + + +} diff --git a/test-support/src/test/java/org/springframework/osgi/test/parsing/DifferentParentsInDifferentBundlesTest.java b/test-support/src/test/java/org/springframework/osgi/test/parsing/DifferentParentsInDifferentBundlesTest.java new file mode 100644 index 000000000..6cde16326 --- /dev/null +++ b/test-support/src/test/java/org/springframework/osgi/test/parsing/DifferentParentsInDifferentBundlesTest.java @@ -0,0 +1,97 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.test.parsing; + +import java.lang.reflect.Field; +import java.util.jar.Manifest; + +import junit.framework.TestCase; + +import org.osgi.framework.Constants; +import org.springframework.osgi.test.AbstractConfigurableBundleCreatorTests; +import org.springframework.osgi.test.parsing.packageA.BaseClassFromAnotherPackage; +import org.springframework.osgi.test.parsing.packageB.BaseClassFromAnotherPackageAndBundle; +import org.springframework.osgi.test.parsing.packageC.TestInDifferentPackageThenItsParents; +import org.springframework.osgi.test.parsing.packageZ.FinalTestClass; +import org.springframework.util.ObjectUtils; + +/** + * Integration that checks if the class hierarchy is properly parsed. Note this + * test doesn't run in OSGi, it just invokes the bytecode parsing. + * + * @author Costin Leau + * + */ +public class DifferentParentsInDifferentBundlesTest extends TestCase { + + public void testCheckBaseClassesHierarchy() throws Exception { + // create class + // make sure the packaging puts some of the tests parent in a different class + TestInDifferentPackageThenItsParents test = new TestInDifferentPackageThenItsParents() { + }; + + String importPackage = getImportPackage(test); + + // check parent package + // parent in a different bundle + assertTrue("missing parent package not considered", contains(importPackage, + BaseClassFromAnotherPackageAndBundle.class.getPackage().getName())); + // parent in a different package but the same bundle (i.e. no import) + assertFalse("contained parent not considered", contains(importPackage, + BaseClassFromAnotherPackage.class.getPackage().getName())); + // check present parent dependencies + assertTrue("contained parent dependencies not considered", contains(importPackage, "javax.imageio")); + } + + public void testSuperClassInterfacesConsidered() throws Exception { + FinalTestClass test = new FinalTestClass() { + }; + + String importPackage = getImportPackage(test); + // check test interface package + assertTrue("interface present on the test class ignored", contains(importPackage, "javax.swing.text")); + // check super class interface package + assertTrue("interface present on the test class ignored", contains(importPackage, + "javax.security.auth.callback")); + // check super class interface package + assertTrue("interface present on superclass ignored", contains(importPackage, "javax.print")); + } + + private Manifest getParsedManifestFor(BaseTestCaseWithVisibleMethods testCase) throws Exception { + + System.out.println(ObjectUtils.nullSafeToString(testCase.getBundleContentPattern())); + Field jarSettings = AbstractConfigurableBundleCreatorTests.class.getDeclaredField("jarSettings"); + // initialize settings + jarSettings.setAccessible(true); + jarSettings.set(null, testCase.getSettings()); + + Manifest mf = testCase.getManifest(); + + return mf; + } + + private String getImportPackage(BaseTestCaseWithVisibleMethods test) throws Exception { + Manifest mf = getParsedManifestFor(test); + String importPackage = mf.getMainAttributes().getValue(Constants.IMPORT_PACKAGE); + System.out.println("import package value is " + importPackage); + return importPackage; + } + + private boolean contains(String text, String item) { + return text.indexOf(item) > -1; + } +} diff --git a/test-support/src/test/java/org/springframework/osgi/test/parsing/packageA/BaseClassFromAnotherPackage.java b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageA/BaseClassFromAnotherPackage.java index 167c3b663..3bf14e7b1 100644 --- a/test-support/src/test/java/org/springframework/osgi/test/parsing/packageA/BaseClassFromAnotherPackage.java +++ b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageA/BaseClassFromAnotherPackage.java @@ -20,7 +20,7 @@ import javax.imageio.ImageIO; -import org.springframework.osgi.test.AbstractConfigurableBundleCreatorTests; +import org.springframework.osgi.test.parsing.BaseTestCaseWithVisibleMethods; /** * Simple base class from a different class that will be included in the @@ -29,7 +29,7 @@ * @author Costin Leau * */ -public class BaseClassFromAnotherPackage extends AbstractConfigurableBundleCreatorTests { +public class BaseClassFromAnotherPackage extends BaseTestCaseWithVisibleMethods { // strange import that doesn't do anything private static File file = ImageIO.getCacheDirectory(); diff --git a/test-support/src/test/java/org/springframework/osgi/test/parsing/packageB/BaseClassFromAnotherPackageAndBundle.java b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageB/BaseClassFromAnotherPackageAndBundle.java index c7e227aab..04485112d 100644 --- a/test-support/src/test/java/org/springframework/osgi/test/parsing/packageB/BaseClassFromAnotherPackageAndBundle.java +++ b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageB/BaseClassFromAnotherPackageAndBundle.java @@ -25,7 +25,9 @@ * @author Costin Leau * */ +// add an interface just to check the behaviour public class BaseClassFromAnotherPackageAndBundle extends BaseClassFromAnotherPackage { private Name context = new CompositeName(); + } diff --git a/test-support/src/test/java/org/springframework/osgi/test/parsing/packageC/DifferentParentsInDifferentBundlesTest.java b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageC/DifferentParentsInDifferentBundlesTest.java deleted file mode 100644 index 7aca45815..000000000 --- a/test-support/src/test/java/org/springframework/osgi/test/parsing/packageC/DifferentParentsInDifferentBundlesTest.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2006-2008 the original author or authors. - * - * Licensed 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.springframework.osgi.test.parsing.packageC; - -import java.lang.reflect.Field; -import java.util.jar.Manifest; - -import junit.framework.TestCase; - -import org.osgi.framework.Constants; -import org.springframework.osgi.test.AbstractConfigurableBundleCreatorTests; -import org.springframework.osgi.test.parsing.packageA.BaseClassFromAnotherPackage; -import org.springframework.osgi.test.parsing.packageB.BaseClassFromAnotherPackageAndBundle; - -/** - * Integration that checks if the class hierarchy is properly parsed. Note this - * test doesn't run in OSGi, it just invokes the bytecode parsing. - * - * @author Costin Leau - * - */ -public class DifferentParentsInDifferentBundlesTest extends TestCase { - - public void testCheckBaseClassesHierarchy() throws Exception { - // create class - TestInDifferentPackageThenItsParents test = new TestInDifferentPackageThenItsParents() { - }; - - Field jarSettings = AbstractConfigurableBundleCreatorTests.class.getDeclaredField("jarSettings"); - // initialize settings - jarSettings.setAccessible(true); - jarSettings.set(null, test.getSettings()); - - Manifest mf = test.getManifest(); - String value = mf.getMainAttributes().getValue(Constants.IMPORT_PACKAGE); - - // System.out.println("import package value is " + value); - // check parent package - assertTrue("missing parent not considered", contains(value, - BaseClassFromAnotherPackageAndBundle.class.getPackage().getName())); - assertFalse("contained parent not considered", contains(value, - BaseClassFromAnotherPackage.class.getPackage().getName())); - // check present parent dependencies - assertTrue("contained parent dependencies not considered", contains(value, "javax.imageio")); - - } - - private boolean contains(String text, String item) { - return text.indexOf(item) > -1; - } -} diff --git a/test-support/src/test/java/org/springframework/osgi/test/parsing/packageC/TestInDifferentPackageThenItsParents.java b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageC/TestInDifferentPackageThenItsParents.java index 4756deca9..b1e68cc0f 100644 --- a/test-support/src/test/java/org/springframework/osgi/test/parsing/packageC/TestInDifferentPackageThenItsParents.java +++ b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageC/TestInDifferentPackageThenItsParents.java @@ -16,16 +16,18 @@ package org.springframework.osgi.test.parsing.packageC; -import java.util.Properties; import java.util.jar.Manifest; import org.springframework.osgi.test.parsing.packageA.BaseClassFromAnotherPackage; import org.springframework.osgi.test.parsing.packageB.BaseClassFromAnotherPackageAndBundle; /** + * Abstract since we don't want to execute the test per se. + * * @author Costin Leau * */ +// callback interface (no exception or custom method signature pulled in) public abstract class TestInDifferentPackageThenItsParents extends BaseClassFromAnotherPackageAndBundle { public void testCheckBaseClassesHierarchy() throws Exception { @@ -33,23 +35,10 @@ public void testCheckBaseClassesHierarchy() throws Exception { System.out.println(mf.getMainAttributes().entrySet()); } - protected String[] getBundleContentPattern() { - String pkg = getClass().getPackage().getName().replace('.', '/').concat("/"); + public String[] getBundleContentPattern() { + String pkg = TestInDifferentPackageThenItsParents.class.getPackage().getName().replace('.', '/').concat("/"); String[] patterns = new String[] { pkg + "**/*", BaseClassFromAnotherPackage.class.getName().replace('.', '/').concat(".class") }; return patterns; } - - protected String getRootPath() { - return super.getRootPath(); - } - - protected Manifest getManifest() { - return super.getManifest(); - } - - protected Properties getSettings() throws Exception { - return super.getSettings(); - } - } diff --git a/test-support/src/test/java/org/springframework/osgi/test/parsing/packageX/BaseClassInACertainPackage.java b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageX/BaseClassInACertainPackage.java new file mode 100644 index 000000000..a6e148585 --- /dev/null +++ b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageX/BaseClassInACertainPackage.java @@ -0,0 +1,44 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.test.parsing.packageX; + +import java.io.File; +import java.net.URI; + +import javax.imageio.ImageIO; +import javax.print.URIException; + +import org.springframework.osgi.test.parsing.BaseTestCaseWithVisibleMethods; + +/** + * @author Costin Leau + * + */ +public abstract class BaseClassInACertainPackage extends BaseTestCaseWithVisibleMethods implements URIException { + + // strange import that doesn't do anything + private static File file = ImageIO.getCacheDirectory(); + + + public int getReason() { + throw new UnsupportedOperationException(); + } + + public URI getUnsupportedURI() { + throw new UnsupportedOperationException(); + } +} diff --git a/test-support/src/test/java/org/springframework/osgi/test/parsing/packageY/ParentClassWithCertainInterfaceTest.java b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageY/ParentClassWithCertainInterfaceTest.java new file mode 100644 index 000000000..ad476d318 --- /dev/null +++ b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageY/ParentClassWithCertainInterfaceTest.java @@ -0,0 +1,31 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.test.parsing.packageY; + +import javax.security.auth.callback.Callback; + +import org.springframework.osgi.test.parsing.packageX.BaseClassInACertainPackage; + +/** + * Test class that implements an interface. + * + * @author Costin Leau + * + */ +public abstract class ParentClassWithCertainInterfaceTest extends BaseClassInACertainPackage implements Callback { + +} diff --git a/test-support/src/test/java/org/springframework/osgi/test/parsing/packageZ/FinalTestClass.java b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageZ/FinalTestClass.java new file mode 100644 index 000000000..ca9448f63 --- /dev/null +++ b/test-support/src/test/java/org/springframework/osgi/test/parsing/packageZ/FinalTestClass.java @@ -0,0 +1,32 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.test.parsing.packageZ; + +import javax.swing.text.Position; + +import org.springframework.osgi.test.parsing.packageY.ParentClassWithCertainInterfaceTest; + +/** + * @author Costin Leau + * + */ +public abstract class FinalTestClass extends ParentClassWithCertainInterfaceTest implements Position { + + public int getOffset() { + throw new UnsupportedOperationException(); + } +} diff --git a/test-support/src/test/resources/log4j.properties b/test-support/src/test/resources/log4j.properties index 5736e2ec5..4306f7f03 100644 --- a/test-support/src/test/resources/log4j.properties +++ b/test-support/src/test/resources/log4j.properties @@ -3,4 +3,4 @@ log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout.ConversionPattern=%p [%c] - %m%n log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -#log4j.logger.org.springframework.osgi=DEBUG \ No newline at end of file +log4j.logger.org.springframework.osgi=TRACE \ No newline at end of file From 48432f2de88505317456e7b2bc6b3939697ffba9 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Wed, 19 Mar 2008 15:23:44 +0000 Subject: [PATCH 26/53] + fix problem with bundle location under KF --- changelog.txt | 2 +- .../org/springframework/osgi/test/AbstractOsgiTests.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 59e9631c0..e3b5a286b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -15,7 +15,7 @@ Package org.springframework.osgi.extender * raised service dependency waiting logging level to INFO (from DEBUG) Package org.springframework.osgi.util -* BundleDelegatingClassLoader relies on default hashCode/equals methods to prevent caching proxies on bundle updates +* BundleDelegatingClassLoader relies on default hashCode/equals methods to prevent class caching on bundle updates Package org.springframework.osgi.test * Instalation bundles have the location set to the backing resource URL if possible, falling back to the description diff --git a/test-support/src/main/java/org/springframework/osgi/test/AbstractOsgiTests.java b/test-support/src/main/java/org/springframework/osgi/test/AbstractOsgiTests.java index c7b20b37f..a26c09c23 100644 --- a/test-support/src/main/java/org/springframework/osgi/test/AbstractOsgiTests.java +++ b/test-support/src/main/java/org/springframework/osgi/test/AbstractOsgiTests.java @@ -18,6 +18,7 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import java.net.URLDecoder; import junit.framework.Protectable; import junit.framework.TestCase; @@ -48,6 +49,8 @@ */ public abstract class AbstractOsgiTests extends AbstractOptionalDependencyInjectionTests { + private static final String UTF_8_CHARSET = "UTF-8"; + // JVM shutdown hook private static Thread shutdownHook; @@ -310,7 +313,7 @@ private Bundle installBundle(Resource location) throws Exception { String bundleLocation; try { - bundleLocation = location.getURL().toExternalForm(); + bundleLocation = URLDecoder.decode(location.getURL().toExternalForm(), UTF_8_CHARSET); } catch (Exception ex) { // the URL cannot be created, fall back to the description From 97dfc589d2cc5a811a7ba83532de62cf164ede7a Mon Sep 17 00:00:00 2001 From: costin_leau Date: Thu, 20 Mar 2008 07:42:27 +0000 Subject: [PATCH 27/53] + revert update of maven plugin-plugin to version 2.3 since the new 2.4 makes the bundle archetype fail (for some reason) --- pom.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pom.xml b/pom.xml index cb8a24fd6..188fbb776 100644 --- a/pom.xml +++ b/pom.xml @@ -280,6 +280,17 @@ limitations under the License. + + + + org.apache.maven.plugins + maven-plugin-plugin + 2.3 + + + + + From 9e75ca2a00f1942ed4038511a5de791757a77fba Mon Sep 17 00:00:00 2001 From: costin_leau Date: Thu, 20 Mar 2008 08:21:33 +0000 Subject: [PATCH 28/53] + tweak bundle-archetype a bit --- bundle-archetype/pom.xml | 8 +++----- .../src/main/resources/META-INF/archetype.xml | 2 +- .../src/main/resources/archetype-resources/pom.xml | 5 +++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/bundle-archetype/pom.xml b/bundle-archetype/pom.xml index d2dae9b7d..e68ce91ed 100644 --- a/bundle-archetype/pom.xml +++ b/bundle-archetype/pom.xml @@ -1,5 +1,5 @@ - + spring-osgi org.springframework.osgi @@ -10,17 +10,15 @@ spring-osgi-bundle-archetype maven-plugin Spring OSGi Archetype + Spring OSGi Maven2 Archetype http://www.springframework.org/osgi - - + - false src/main/resources - \ No newline at end of file diff --git a/bundle-archetype/src/main/resources/META-INF/archetype.xml b/bundle-archetype/src/main/resources/META-INF/archetype.xml index c26c31cab..cbd68a6a3 100644 --- a/bundle-archetype/src/main/resources/META-INF/archetype.xml +++ b/bundle-archetype/src/main/resources/META-INF/archetype.xml @@ -1,5 +1,5 @@ - spring-osgi-bundle-artifact + spring-osgi-bundle-archetype src/main/java/Bean.java src/main/java/impl/BeanImpl.java diff --git a/bundle-archetype/src/main/resources/archetype-resources/pom.xml b/bundle-archetype/src/main/resources/archetype-resources/pom.xml index 5adea1604..9cffaca33 100644 --- a/bundle-archetype/src/main/resources/archetype-resources/pom.xml +++ b/bundle-archetype/src/main/resources/archetype-resources/pom.xml @@ -1,5 +1,6 @@ - - + + 4.0.0 ${groupId} ${artifactId} From a868b61a0901aeb33a1a5d4d8ed5d573495789ea Mon Sep 17 00:00:00 2001 From: costin_leau Date: Mon, 24 Mar 2008 08:23:56 +0000 Subject: [PATCH 29/53] OSGI-407 --- docs/src/docbkx/reference/bundle-app-context.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/docbkx/reference/bundle-app-context.xml b/docs/src/docbkx/reference/bundle-app-context.xml index 2f6bb35c8..6b5001bb5 100644 --- a/docs/src/docbkx/reference/bundle-app-context.xml +++ b/docs/src/docbkx/reference/bundle-app-context.xml @@ -33,7 +33,7 @@ The Spring Dynamic Modules Extender bundle Spring Dynamic Modules provides an OSGi bundle - org.springframework.osgi.bundles.extender. This + org.springframework.bundle.osgi.extender. This bundle is responsible for instantiating the Spring application contexts for your application bundles. It serves the same purpose as the ContextLoaderListener From d1e5ac47da65e956efeebfea8e27ca6e0989d368 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Mon, 24 Mar 2008 09:39:20 +0000 Subject: [PATCH 30/53] OSGI-403 --- docs/src/docbkx/reference/testing.xml | 68 +++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 9 deletions(-) diff --git a/docs/src/docbkx/reference/testing.xml b/docs/src/docbkx/reference/testing.xml index 5dea7aadd..e1787eb49 100644 --- a/docs/src/docbkx/reference/testing.xml +++ b/docs/src/docbkx/reference/testing.xml @@ -86,8 +86,9 @@ public void testComponent() throws Exception { problem that appears when building base JUnit classes, by decoupling the runner from the test through annotations, Spring-DM cannot use them since it has to support Java 1.4. - Running the tests on JDK 1.5 is not an option since the differences - between 1.4 and 1.5 are quite subtle especially when dealing with synchronization. + However, it is planned for the future to provide an optional, + JVM 5-based testing extension to integrate the existing testing framework + with the aforementioned libraries. @@ -195,6 +196,7 @@ spring-osgi-extender, etc... TestBundle-testOsgiPlatformStarts-com.your.package. As you can see, the testing framework installs the mandatory requirements required for running the test such as the Spring, Spring-DM, slf4j jars among others. +
@@ -274,16 +276,29 @@ Reason: Missing Constraint: Import-Package: org.apache.commons.lang.time; versio are advanced topics as they increase the complexity of your test infrastructure. -
- Customizing test manifest +
+ Customizing the test manifest There are cases where the auto-generated test manifest does not suite the needs of the test. - For example the manifest requires some different headers or a certain package needs to be an optional import. - To provide your own manifest, simply override getManifestLocations(): + For example the manifest requires some different headers or a certain package needs to be an optional import. + + For simple cases, one can work directly with the generated manifest - in the example below, the bundle class path + is being specified: + + + + + Another alternative is to provide your own manifest by overriding getManifestLocations(): + return "classpath:com/xyz/abc/test/MyTestTest.MF"; +}]]> - However, the manifest requires some the folowing entry: + However each manifest needs the following entry: Bundle-Activator: org.springframework.osgi.test.JUnitTestActivator since without it, the testing infrastructure cannot function properly. Also, one needs to import JUnit, Spring and Spring-DM specific packages used by the base test suite: @@ -362,6 +377,41 @@ Reason: Missing Constraint: Import-Package: org.apache.commons.lang.time; versio
+
+ Understanding the automatic <code>MANIFEST.MF</code> creator + + A useful feature of the testing framework represents the automatic creation of the test manifest based on the test bundle content. The manifest + creator component uses byte-code analysis to determine the packages imported by the test classes so that it can generate the proper OSGi directives for them. + Since the generated bundle is used for running a test, the creator will use the following assumptions: + + + No packages will be exported. The on-the-fly bundle is used for running a test which + (usually) consumes OSGi packages for its execution. This behaviour can be changed by customizing + the manifest. + + + Split packages (i.e. classes from the same package can come from different bundles) are not supported. + + + This means that packages present in the test framework are considered complete and no Import-Package entry will be generated for them. + To avoid this problem, consider using sub-packages or moving the classes inside one bundle. Note that split packages are discouraged due to the + issues associated with them (see the OSGi Core spec, Chapter 3.13 - Required Bundles). + + + + The test bundle contains only test classes. + The byte-code parser will look only at the test classes hierarchy. Any other class included in the bundle, will not be considered so no imports + will be generated for it. Consider customizing the manifest yourself or attaching the extra code as inner classes to the test class. A future version + of Spring-DM might alleviate this problem by inspecting all classes included in the test bundle. + + + + + The reason behind the lack of such features is the byte-code parser is aimed to be simple and fast at creating test manifests - + it is not meant as a general-purpose tool for creating OSGi artifacts. + +
+
From ebaee1261c9730f73bab112982cb0b7decf8fd98 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Mon, 24 Mar 2008 09:48:27 +0000 Subject: [PATCH 31/53] OSGI-395 --- docs/src/docbkx/faq.xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/src/docbkx/faq.xml b/docs/src/docbkx/faq.xml index 32f3bfd21..322296ed1 100644 --- a/docs/src/docbkx/faq.xml +++ b/docs/src/docbkx/faq.xml @@ -402,13 +402,15 @@
-
- I've just updated my Spring DM library and now I get a <emphasis>LinkageError</emphasis>. How can I solve this? +
+ I'm using Eclipse PDE and I started getting some weird exceptions/behaviour. What's the matter? - The above error indicates that some classes, dependend on by others, have a different, incompatible version then the one required. - Normally this occur with workspaces (such as Eclipse) that are corrupt or stale. Consider doing a complete clean build or, in case of - Eclipse, creating a new workspace. + Eclipse PDE uses Equinox OSGi platform underneath which (like other OSGi platforms) caches the bundles between re-runs. When + the cache is not properly updated, one can encounter strange behaviour (such as the new services/code being picked up) + or errors ranging from class versioning to linkage. Consider doing a complete clean build or, in case of Eclipse, + creating a new workspace or deleting the bundle folder (depends on each project settings but most users should find it at: + [workspace_dir]\.metadata\.plugins\org.eclipse.pde.core\OSGi\org.eclipse.osgi\bundles).
From e62548959e998b1f63ebdde1f0f0f4a0c452082f Mon Sep 17 00:00:00 2001 From: costin_leau Date: Mon, 24 Mar 2008 10:46:18 +0000 Subject: [PATCH 32/53] + removed a lot of empty folders + updated release pom.xml --- docs/pom.xml | 2 +- release/pom.xml | 22 ++-- release/src/assembly/docs.xml | 3 +- release/src/assembly/parent.xml | 2 +- release/src/assembly/with-dependencies.xml | 84 ++++++++++--- .../osgi/test/platform/MBSProPlatform.jav | 115 ------------------ 6 files changed, 82 insertions(+), 146 deletions(-) delete mode 100644 test-support/src/main/java/org/springframework/osgi/test/platform/MBSProPlatform.jav diff --git a/docs/pom.xml b/docs/pom.xml index 5a724905f..d23426d20 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -22,7 +22,7 @@ com.agilejava.docbkx docbkx-maven-plugin - 2.0.7 + 2.0.6 single-page diff --git a/release/pom.xml b/release/pom.xml index 0cb9e06eb..d437f9f10 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -27,18 +27,11 @@ - maven-assembly-plugin + 2.2-beta-1 + false zip-files @@ -46,14 +39,23 @@ single - false + + + true + + + ${pom.version} + + src/assembly/no-dependencies.xml + diff --git a/release/src/assembly/docs.xml b/release/src/assembly/docs.xml index 3873e0a0b..726c471a4 100644 --- a/release/src/assembly/docs.xml +++ b/release/src/assembly/docs.xml @@ -6,11 +6,10 @@ ../changelog.txt ../license.txt ../notice.txt - ../notice.txt ../readme.txt ../readme-building.txt - dos + \ No newline at end of file diff --git a/release/src/assembly/parent.xml b/release/src/assembly/parent.xml index 7804588d4..6cadf08ee 100644 --- a/release/src/assembly/parent.xml +++ b/release/src/assembly/parent.xml @@ -7,7 +7,7 @@ pom.xml + unix - unix \ No newline at end of file diff --git a/release/src/assembly/with-dependencies.xml b/release/src/assembly/with-dependencies.xml index b3cbf42a4..a772054d8 100644 --- a/release/src/assembly/with-dependencies.xml +++ b/release/src/assembly/with-dependencies.xml @@ -9,6 +9,7 @@ true + org.springframework.osgi:spring-osgi-io @@ -35,22 +37,19 @@ false - dist/${artifactId}-${version}-sources.${extension} + dist/${artifactId}-${version}.${extension} false - - target/${artifactId}-${version}-sources.${extension} - sources/lib/${groupId}/${artifactId}-${version}.${extension} runtime - org.springframework.osgi:spring-osgi-io - org.springframework.osgi:spring-osgi-mock - org.springframework.osgi:spring-osgi-core - org.springframework.osgi:spring-osgi-extender - org.springframework.osgi:spring-osgi-test - org.springframework.osgi:spring-osgi-annotation + org.springframework.osgi:spring-osgi-io + org.springframework.osgi:spring-osgi-mock + org.springframework.osgi:spring-osgi-core + org.springframework.osgi:spring-osgi-extender + org.springframework.osgi:spring-osgi-test + org.springframework.osgi:spring-osgi-annotation @@ -63,13 +62,14 @@ sources/${artifactId} + src/main/java bin/** target/** - + @@ -84,12 +84,12 @@ samples/lib/${groupId}/${artifactId}-${version}.${extension} runtime - org.springframework.osgi:spring-osgi-io - org.springframework.osgi:spring-osgi-mock - org.springframework.osgi:spring-osgi-core - org.springframework.osgi:spring-osgi-extender - org.springframework.osgi:spring-osgi-test - org.springframework.osgi:spring-osgi-annotation + org.springframework.osgi:spring-osgi-io + org.springframework.osgi:spring-osgi-mock + org.springframework.osgi:spring-osgi-core + org.springframework.osgi:spring-osgi-extender + org.springframework.osgi:spring-osgi-test + org.springframework.osgi:spring-osgi-annotation @@ -111,4 +111,54 @@ + + + target/${artifactId}-${version}.jar + dist + + + + + + target/site/apidocs + docs/api + + + target/site/reference + docs/reference + + + + target/dependency + lib + + **/*.jar + + + + + samples + samples + + **/readme.txt + + dos + + + samples + samples + + **/src/** + **/build*.xml + **/*.bat + **/pom.xml + + + **/target + **/target/** + **/bin + **/bin/** + + + diff --git a/test-support/src/main/java/org/springframework/osgi/test/platform/MBSProPlatform.jav b/test-support/src/main/java/org/springframework/osgi/test/platform/MBSProPlatform.jav deleted file mode 100644 index 729da23ab..000000000 --- a/test-support/src/main/java/org/springframework/osgi/test/platform/MBSProPlatform.jav +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2002-2007 the original author or authors. - * - * Licensed 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.springframework.osgi.test.platform; - -import java.io.File; -import java.util.Properties; - -import org.osgi.framework.BundleContext; -import org.osgi.framework.Constants; -import org.springframework.osgi.test.util.IOUtils; -import org.springframework.util.ObjectUtils; - -import com.prosyst.mbs.impl.framework.BundleContextImpl; -import com.prosyst.mbs.impl.framework.Framework; -import com.prosyst.mbs.impl.framework.Start; - -/** - * Prosyst mBedded Server Professional Edition 6.1.x - * - * @author Costin Leau - */ -public class MBSProPlatform extends AbstractOsgiPlatform { - - private BundleContext context; - - private File storageDir; - - public MBSProPlatform() { - toString = "mBedded Professional OSGi Platform"; - } - - protected Properties getPlatformProperties() { - Properties props = new Properties(); - - // default properties - props.setProperty("mbs.loader.r4", "true"); - props.setProperty("mbs.storage.delete", "true"); - - // this affects only the connector version but still - props.setProperty("mbs.storage.mm.type", "ram"); - props.setProperty("mbs.certificates", "false"); - - // props.setProperty("mbs.boot.disableProcessing", "true"); - - props.setProperty(Constants.SUPPORTS_FRAMEWORK_FRAGMENT, "true"); - props.setProperty(Constants.SUPPORTS_FRAMEWORK_REQUIREBUNDLE, "true"); - - props.setProperty("mbs.debug", "0"); - - props.putAll(getTemporaryStorage()); - - return props; - } - - protected Properties getTemporaryStorage() { - Properties props = new Properties(); - storageDir = createTempDir("mbs"); - - props.setProperty("mbs.storage.root", storageDir.getAbsolutePath()); - - if (log.isTraceEnabled()) - log.trace("mBedded temporary storage dir is " + storageDir.getAbsolutePath()); - return props; - } - - /* - * (non-Javadoc) - * - * @see org.springframework.osgi.test.OsgiPlatform#getBundleContext() - */ - public BundleContext getBundleContext() { - return context; - } - - /* - * (non-Javadoc) - * - * @see org.springframework.osgi.test.OsgiPlatform#start() - */ - public void start() throws Exception { - // copy configuration properties to sys properties - Properties props = getConfigurationProperties(); - System.getProperties().putAll(props); - Start.main(new String[0]); - - context = BundleContextImpl.nullCtx; - } - - /* - * (non-Javadoc) - * - * @see org.springframework.osgi.test.OsgiPlatform#stop() - */ - public void stop() throws Exception { - try { - Framework.systemBundle.stop(); - } - finally { - IOUtils.delete(storageDir); - } - } -} From c76f1092e9e23c73b5a52dc5c622cf6245363617 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Mon, 24 Mar 2008 14:01:37 +0000 Subject: [PATCH 33/53] OSGI-399 OSGI-123 + readme.txt provides placeholder for the actual jar version + release plugin has been updated so maven assembly plugin is used as much as possible --- readme.txt | 12 +- release/pom.xml | 34 ++--- release/src/assembly/dependencies.xml | 71 ++++++++++ release/src/assembly/docs.xml | 25 +++- release/src/assembly/no-dependencies.xml | 53 +++----- release/src/assembly/with-dependencies.xml | 148 +++------------------ 6 files changed, 152 insertions(+), 191 deletions(-) create mode 100644 release/src/assembly/dependencies.xml diff --git a/readme.txt b/readme.txt index 2388af98d..81bc0a47b 100644 --- a/readme.txt +++ b/readme.txt @@ -66,31 +66,31 @@ The following distinct jar files are included in the distribution. This list spe third-party dependencies. Libraries in [brackets] are optional, i.e. just necessary for certain functionality. For an exact list of Spring-DM project dependencies see the respective Maven2 pom.xml files. -* spring-osgi-core-1.0.jar +* spring-osgi-core-${version}.jar - Contents: The Spring Dynamic Modules Core - Dependencies: slf4j, spring-aop, spring-beans, spring-core, spring-context, aop-alliance, spring-osgi-io [Log4J] -* spring-osgi-extender-1.0.jar +* spring-osgi-extender-${version}.jar - Contents: The Spring Dynamic Modules Extender - Dependencies: sl4fj, spring-osgi-core [Log4J] -* spring-osgi-io-1.0.jar +* spring-osgi-io-${version}.jar - Contents: The Spring Dynamic Modules IO library - Dependencies: sl4fj, spring-core [Log4J] -* spring-osgi-mock-1.0.jar +* spring-osgi-mock-${version}.jar - Contents: The Spring Dynamic Modules Mock library - Dependencies: OSGi API -* spring-osgi-test-1.0.jar +* spring-osgi-test-${version}.jar - Contents: The Spring Dynamic Modules Integration Testing framework - Dependencies: asm, junit, slf4j, spring-osgi-core, spring-osgi-extender [Equinox, Felix, Knopflerfish, Log4J] -* extensions / spring-osgi-annotation-1.0.jar +* extensions / spring-osgi-annotation-${version}.jar - Contents: The Spring Dynamic Modules Annotation Extension - Dependencies: slf4j, spring-beans, spring-core, spring-osgi-core [Log4J] diff --git a/release/pom.xml b/release/pom.xml index d437f9f10..dcefcb83d 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.springframework.osgi spring-osgi-dist - Spring OSGi distribution + Spring OSGi Distribution pom @@ -28,34 +28,38 @@ + maven-assembly-plugin - 2.2-beta-1 + 2.2-beta-2 false + - zip-files + wo-dependencies package single - - - - true - - - ${pom.version} - - src/assembly/no-dependencies.xml - + + with-dependencies + package + + single + + + true + src/assembly/with-dependencies.xml - --> diff --git a/release/src/assembly/dependencies.xml b/release/src/assembly/dependencies.xml new file mode 100644 index 000000000..b6d25beea --- /dev/null +++ b/release/src/assembly/dependencies.xml @@ -0,0 +1,71 @@ + + + + + + + + + ../target/libs + lib + + spring-osgi* + + + + + + + ../ + + + readme-building.txt + + dos + + + ../lib + lib + + readme.txt + + dos + + + + + diff --git a/release/src/assembly/docs.xml b/release/src/assembly/docs.xml index 726c471a4..d0abe2751 100644 --- a/release/src/assembly/docs.xml +++ b/release/src/assembly/docs.xml @@ -1,15 +1,28 @@ + + ../ + - ../changelog.txt - ../license.txt - ../notice.txt - ../readme.txt - ../readme-building.txt + changelog.txt + license.txt + notice.txt + readme.txt - dos + dos + true + + + + ../target/site/apidocs + docs/api + + + ../docs/target/docbkx + docs/reference + \ No newline at end of file diff --git a/release/src/assembly/no-dependencies.xml b/release/src/assembly/no-dependencies.xml index 2cb5a186f..67d5f450d 100644 --- a/release/src/assembly/no-dependencies.xml +++ b/release/src/assembly/no-dependencies.xml @@ -8,29 +8,18 @@ true + - - org.springframework.osgi:spring-osgi-mock - - - org.springframework.osgi:spring-osgi-io - - - org.springframework.osgi:spring-osgi-core - - - org.springframework.osgi:spring-osgi-extender - - - org.springframework.osgi:spring-osgi-test - - - org.springframework.osgi:spring-osgi-annotation - + org.springframework.osgi:spring-osgi-io + org.springframework.osgi:spring-osgi-mock + org.springframework.osgi:spring-osgi-core + org.springframework.osgi:spring-osgi-extender + org.springframework.osgi:spring-osgi-test + - false + false target @@ -42,29 +31,21 @@ + - - org.springframework.osgi.samples:samples - + org.springframework.osgi:spring-osgi-annotation + - - samples/${artifactId} - + false - - - pom.xml + + target + dist/extensions + + *.jar - - bin/** - target/** - **/clover.license - - diff --git a/release/src/assembly/with-dependencies.xml b/release/src/assembly/with-dependencies.xml index a772054d8..62bad508e 100644 --- a/release/src/assembly/with-dependencies.xml +++ b/release/src/assembly/with-dependencies.xml @@ -1,3 +1,4 @@ + with-dependencies @@ -5,11 +6,11 @@ src/assembly/docs.xml - src/assembly/parent.xml + src/assembly/dependencies.xml true - org.springframework.osgi:spring-osgi-io @@ -17,148 +18,39 @@ org.springframework.osgi:spring-osgi-core org.springframework.osgi:spring-osgi-extender org.springframework.osgi:spring-osgi-test - org.springframework.osgi:spring-osgi-annotation - - false - dist/${artifactId}-${version}.${extension} - false - - - --> - - - org.springframework.osgi:spring-osgi-io - org.springframework.osgi:spring-osgi-mock - org.springframework.osgi:spring-osgi-core - org.springframework.osgi:spring-osgi-extender - org.springframework.osgi:spring-osgi-test - org.springframework.osgi:spring-osgi-annotation - - - false - dist/${artifactId}-${version}.${extension} - false - - - sources/lib/${groupId}/${artifactId}-${version}.${extension} - runtime - - org.springframework.osgi:spring-osgi-io - org.springframework.osgi:spring-osgi-mock - org.springframework.osgi:spring-osgi-core - org.springframework.osgi:spring-osgi-extender - org.springframework.osgi:spring-osgi-test - org.springframework.osgi:spring-osgi-annotation - - - - sources/lib/${groupId}/${artifactId}-${version}.${extension} - provided - - - + - sources/${artifactId} + false - src/main/java - - bin/** - target/** - + target + dist + + *.jar + - + + - org.springframework.osgi.samples:samples + org.springframework.osgi:spring-osgi-annotation - - false - samples/${artifactId}-${version}.${extension} - false - - - samples/lib/${groupId}/${artifactId}-${version}.${extension} - runtime - - org.springframework.osgi:spring-osgi-io - org.springframework.osgi:spring-osgi-mock - org.springframework.osgi:spring-osgi-core - org.springframework.osgi:spring-osgi-extender - org.springframework.osgi:spring-osgi-test - org.springframework.osgi:spring-osgi-annotation - - - - sources/lib/${groupId}/${artifactId}-${version}.${extension} - provided - - - + - samples/${artifactId} + false - - bin/** - target/** - + target + dist/extensions + + *.jar + - - - target/${artifactId}-${version}.jar - dist - - - - - - target/site/apidocs - docs/api - - - target/site/reference - docs/reference - - - - target/dependency - lib - - **/*.jar - - - - - samples - samples - - **/readme.txt - - dos - - - samples - samples - - **/src/** - **/build*.xml - **/*.bat - **/pom.xml - - - **/target - **/target/** - **/bin - **/bin/** - - - From 5bf1611135547bb760d4ec01e06f76a3b5e1b316 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Mon, 24 Mar 2008 14:02:21 +0000 Subject: [PATCH 34/53] + remove unused file --- release/src/assembly/parent.xml | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 release/src/assembly/parent.xml diff --git a/release/src/assembly/parent.xml b/release/src/assembly/parent.xml deleted file mode 100644 index 6cadf08ee..000000000 --- a/release/src/assembly/parent.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - target - samples - - pom.xml - - unix - - - \ No newline at end of file From 47bcbf8c10db6e64854b322eac4e8d319ec55105 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Mon, 24 Mar 2008 14:43:05 +0000 Subject: [PATCH 35/53] + update changelog + fix small typos in the docs + update assembly plugin --- changelog.txt | 2 +- docs/pom.xml | 2 +- docs/src/docbkx/faq.xml | 2 +- docs/src/docbkx/reference/testing.xml | 2 +- release/pom.xml | 8 ++++---- release/src/assembly/docs.xml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/changelog.txt b/changelog.txt index e3b5a286b..5f026409e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,7 +2,7 @@ SPRING DYNAMIC MODULES FRAMEWORK CHANGELOG ========================================== http://www.springframework.org/osgi -Changes in version 1.0.2 (2008-03-xx) +Changes in version 1.0.2 (2008-03-25) ------------------------------------- General diff --git a/docs/pom.xml b/docs/pom.xml index d23426d20..5a724905f 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -22,7 +22,7 @@ com.agilejava.docbkx docbkx-maven-plugin - 2.0.6 + 2.0.7 single-page diff --git a/docs/src/docbkx/faq.xml b/docs/src/docbkx/faq.xml index 322296ed1..ccdd9ee80 100644 --- a/docs/src/docbkx/faq.xml +++ b/docs/src/docbkx/faq.xml @@ -96,7 +96,7 @@ JDK 1.4. Thus Spring Dynamic Modules cannot run on more constrained environments (such as the OSGi Minimum Execution Environment) unless Spring itself also runs in those environments. There are no current plans to make such a version of Spring. However as existing OSGi developers adopt Spring Dynamic Modules to simplify creation of OSGi applications and the user - base expands, the target audience can cover domains much broader than enterprise Java applications. + base expands, the target audience can cover domains much broader than enterprise Java applications. In time this could create a large enough demand to justify the investment needed to allow Spring and Spring-DM to run in restricted environments.
diff --git a/docs/src/docbkx/reference/testing.xml b/docs/src/docbkx/reference/testing.xml index e1787eb49..292db83fa 100644 --- a/docs/src/docbkx/reference/testing.xml +++ b/docs/src/docbkx/reference/testing.xml @@ -378,7 +378,7 @@ Reason: Missing Constraint: Import-Package: org.apache.commons.lang.time; versio
- Understanding the automatic <code>MANIFEST.MF</code> creator + Understanding the <code>MANIFEST.MF</code> generation A useful feature of the testing framework represents the automatic creation of the test manifest based on the test bundle content. The manifest creator component uses byte-code analysis to determine the packages imported by the test classes so that it can generate the proper OSGi directives for them. diff --git a/release/pom.xml b/release/pom.xml index dcefcb83d..15ddf75f8 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -1,21 +1,22 @@ 4.0.0 - org.springframework.osgi - spring-osgi-dist + org.springframework.osgi.release + spring-osgi Spring OSGi Distribution pom + org.springframework.osgi spring-osgi 1.0.2-SNAPSHOT .. - + ../mock ../io @@ -23,7 +24,6 @@ ../extender ../test-support ../annotation - ../samples diff --git a/release/src/assembly/docs.xml b/release/src/assembly/docs.xml index d0abe2751..2a61aa9a5 100644 --- a/release/src/assembly/docs.xml +++ b/release/src/assembly/docs.xml @@ -21,7 +21,7 @@ docs/api - ../docs/target/docbkx + ../docs/target/site/reference docs/reference From 96943b143decbdc3b616079752e2401f9ad9cba4 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Mon, 24 Mar 2008 16:48:36 +0000 Subject: [PATCH 36/53] + doc updates + improved PDF generation by linking xref as well --- .../src/docbkx/appendix/appendix-compendium.xml | 2 +- docs/src/docbkx/reference/service-registry.xml | 4 ++-- docs/src/docbkx/reference/testing.xml | 2 +- docs/src/docbkx/resources/xsl/fopdf.xsl | 17 +++++++++++++++++ 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/docs/src/docbkx/appendix/appendix-compendium.xml b/docs/src/docbkx/appendix/appendix-compendium.xml index b111926b0..474aa346c 100644 --- a/docs/src/docbkx/appendix/appendix-compendium.xml +++ b/docs/src/docbkx/appendix/appendix-compendium.xml @@ -117,7 +117,7 @@ Support for directly accessing configuration objects and their associated dictionaries, and for instantiating beans directly from configuration objects is on the Spring Dynamic Modules road map. See - for more information. + for more information.
diff --git a/docs/src/docbkx/reference/service-registry.xml b/docs/src/docbkx/reference/service-registry.xml index 5b9052505..80b33ba64 100644 --- a/docs/src/docbkx/reference/service-registry.xml +++ b/docs/src/docbkx/reference/service-registry.xml @@ -117,7 +117,7 @@ Using the OSGi namespace as a top-level namespace is particularly - convenient when following the recommendation of section 4.1 to use a + convenient when following the recommendation of to use a dedicated configuration file for all OSGi-related declarations.
@@ -324,7 +324,7 @@ public interface SubInterface extends SuperInterface {}]]> The Spring Dynamic Modules roadmap includes support for exporting properties registered in the OSGi Configuration Administration service as properties of the registered service. See - this appendix for more details. + for more details.
diff --git a/docs/src/docbkx/reference/testing.xml b/docs/src/docbkx/reference/testing.xml index 292db83fa..7a9376444 100644 --- a/docs/src/docbkx/reference/testing.xml +++ b/docs/src/docbkx/reference/testing.xml @@ -386,7 +386,7 @@ Reason: Missing Constraint: Import-Package: org.apache.commons.lang.time; versio No packages will be exported. The on-the-fly bundle is used for running a test which - (usually) consumes OSGi packages for its execution. This behaviour can be changed by customizing + (usually) consumes OSGi packages for its execution. This behaviour can be changed by customizing the manifest. diff --git a/docs/src/docbkx/resources/xsl/fopdf.xsl b/docs/src/docbkx/resources/xsl/fopdf.xsl index ac2fff485..d9232dff2 100644 --- a/docs/src/docbkx/resources/xsl/fopdf.xsl +++ b/docs/src/docbkx/resources/xsl/fopdf.xsl @@ -439,6 +439,23 @@ + + + + + + + + + + + + + + From 2f05d6b8c0f6a17a9ba00c2cb6d069f3f3945034 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Mon, 24 Mar 2008 17:01:46 +0000 Subject: [PATCH 37/53] + updated changelog --- changelog.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 5f026409e..636dd82ca 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,7 +6,8 @@ Changes in version 1.0.2 (2008-03-25) ------------------------------------- General -* adjusted the manifests so no internal packages are exposed and the versions both spring and spring-osgi are present +* adjusted the manifests so internal packages are not exported and the versions for both spring and spring-osgi are + present Package org.springframework.osgi.context * AbstractOsgiBundleApplicationContext registers the application context as an OSGi service using just the interfaces @@ -18,7 +19,7 @@ Package org.springframework.osgi.util * BundleDelegatingClassLoader relies on default hashCode/equals methods to prevent class caching on bundle updates Package org.springframework.osgi.test -* Instalation bundles have the location set to the backing resource URL if possible, falling back to the description +* Installed bundles have the location set to the backing resource URL if possible, falling back to the description Changes in version 1.0.1 (2008-02-29) From 241587ee467f4650c7e306235f5b1bb271f5cf69 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Mon, 24 Mar 2008 17:24:51 +0000 Subject: [PATCH 38/53] + preparing 1.0.2 release (increasing version to 1.0.2) --- annotation/pom.xml | 2 +- bundle-archetype/pom.xml | 2 +- .../resources/archetype-resources/.classpath | 10 +++++----- .../main/resources/archetype-resources/pom.xml | 2 +- core/.classpath | 2 +- core/pom.xml | 2 +- docs/pom.xml | 2 +- extender/pom.xml | 2 +- .../.classpath | 2 +- .../annotation.dependency.test.bundle/pom.xml | 2 +- .../bundles/annotation.test.bundle/.classpath | 2 +- .../bundles/annotation.test.bundle/pom.xml | 2 +- .../bundles/cardinality.0to1.bundle/pom.xml | 2 +- .../config.bundle/async.nowait.bundle/pom.xml | 2 +- .../config.bundle/async.wait.bundle/pom.xml | 2 +- .../config.bundle/no.publish.bundle/pom.xml | 2 +- .../bundles/config.bundle/pom.xml | 2 +- .../config.bundle/sync.nowait.bundle/pom.xml | 2 +- .../config.bundle/sync.tail.bundle/pom.xml | 2 +- .../config.bundle/sync.wait.bundle/pom.xml | 2 +- .../config.file.with.dots.bundle/pom.xml | 2 +- .../bundles/configuration.test.bundle/pom.xml | 2 +- .../bundles/deadlock.bundle/pom.xml | 2 +- .../bundles/dependency.factory.bundle/pom.xml | 2 +- .../bundles/dependency.test.bundle/pom.xml | 2 +- integration-tests/bundles/error.bundle/pom.xml | 2 +- .../bundles/extender.version.bundle/pom.xml | 2 +- .../bundles/io.fragment.1.bundle/pom.xml | 2 +- .../bundles/io.fragment.2.bundle/pom.xml | 2 +- .../bundles/lifecycle.test.bundle/pom.xml | 2 +- integration-tests/bundles/pom.xml | 2 +- .../bundles/proxy.creator.bundle/pom.xml | 2 +- .../bundles/reference.test.bundle/pom.xml | 2 +- .../bundles/scoped.a.bundle/pom.xml | 2 +- .../bundles/scoped.b.bundle/pom.xml | 2 +- .../bundles/scoped.common.bundle/pom.xml | 2 +- .../bundles/service.listener.bundle/pom.xml | 2 +- .../bundles/simple.service.2.bundle/pom.xml | 2 +- .../bundles/simple.service.3.bundle/pom.xml | 2 +- .../simple.service.bundle.2.identical/pom.xml | 2 +- .../simple.service.bundle.identical/pom.xml | 2 +- .../bundles/simple.service.bundle/pom.xml | 2 +- integration-tests/bundles/tccl.bundle/pom.xml | 2 +- .../bundles/trivial.bundle/pom.xml | 2 +- .../bundles/trivial.test.bundle/pom.xml | 2 +- integration-tests/pom.xml | 2 +- integration-tests/tests-tiger/.classpath | 8 ++++---- integration-tests/tests-tiger/pom.xml | 2 +- integration-tests/tests/.classpath | 18 +++++++++--------- integration-tests/tests/pom.xml | 2 +- io/.classpath | 2 +- io/pom.xml | 2 +- mock/pom.xml | 2 +- pom.xml | 2 +- release/pom.xml | 2 +- .../petclinic.sample.contract/pom.xml | 4 ++-- .../petclinic/petclinic.sample.hsqldb/pom.xml | 4 ++-- .../petclinic/petclinic.sample.jdbc/pom.xml | 4 ++-- .../petclinic/petclinic.sample.mysql/pom.xml | 4 ++-- samples/petclinic/pom.xml | 2 +- samples/pom.xml | 2 +- samples/simple-service/pom.xml | 2 +- .../simple-service-bundle/pom.xml | 2 +- .../simple-service-integration-test/pom.xml | 2 +- samples/weather/pom.xml | 2 +- samples/weather/weather-dao/pom.xml | 2 +- samples/weather/weather-extension/pom.xml | 2 +- .../.classpath | 2 +- .../weather-service-integration-test/pom.xml | 2 +- samples/weather/weather-service-test/pom.xml | 2 +- samples/weather/weather-service/pom.xml | 2 +- samples/weather/wiring-bundle/.classpath | 4 ++-- samples/weather/wiring-bundle/pom.xml | 2 +- test-support/.classpath | 4 ++-- test-support/pom.xml | 2 +- .../osgi/test/internal/boot-bundles.properties | 2 +- 76 files changed, 97 insertions(+), 97 deletions(-) diff --git a/annotation/pom.xml b/annotation/pom.xml index d359efb0c..b1374f69a 100644 --- a/annotation/pom.xml +++ b/annotation/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/bundle-archetype/pom.xml b/bundle-archetype/pom.xml index e68ce91ed..a3f64080f 100644 --- a/bundle-archetype/pom.xml +++ b/bundle-archetype/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/bundle-archetype/src/main/resources/archetype-resources/.classpath b/bundle-archetype/src/main/resources/archetype-resources/.classpath index 85273b816..118606eb4 100644 --- a/bundle-archetype/src/main/resources/archetype-resources/.classpath +++ b/bundle-archetype/src/main/resources/archetype-resources/.classpath @@ -16,11 +16,11 @@ - - - - - + + + + + diff --git a/bundle-archetype/src/main/resources/archetype-resources/pom.xml b/bundle-archetype/src/main/resources/archetype-resources/pom.xml index 9cffaca33..fbdcf6dbb 100644 --- a/bundle-archetype/src/main/resources/archetype-resources/pom.xml +++ b/bundle-archetype/src/main/resources/archetype-resources/pom.xml @@ -12,7 +12,7 @@ 1.4.3 2.5.1 - 1.0.2-SNAPSHOT + 1.0.2 3.2.2 diff --git a/core/.classpath b/core/.classpath index 4158c1b32..d79ba8e6d 100644 --- a/core/.classpath +++ b/core/.classpath @@ -7,7 +7,7 @@ - + diff --git a/core/pom.xml b/core/pom.xml index acd5af226..2e03f79ee 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/docs/pom.xml b/docs/pom.xml index 5a724905f..2f16faa39 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -4,7 +4,7 @@ org.springframework.osgi spring-osgi pom - 1.0.2-SNAPSHOT + 1.0.2 Spring OSGi http://www.springframework.org/osgi diff --git a/extender/pom.xml b/extender/pom.xml index 11c3321c3..108df55e9 100644 --- a/extender/pom.xml +++ b/extender/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/annotation.dependency.test.bundle/.classpath b/integration-tests/bundles/annotation.dependency.test.bundle/.classpath index 2fdfd7bd5..20f43cd21 100644 --- a/integration-tests/bundles/annotation.dependency.test.bundle/.classpath +++ b/integration-tests/bundles/annotation.dependency.test.bundle/.classpath @@ -5,6 +5,6 @@ - + diff --git a/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml b/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml index f51136869..980a068f8 100644 --- a/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml +++ b/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/annotation.test.bundle/.classpath b/integration-tests/bundles/annotation.test.bundle/.classpath index 10ff8342c..f2bde6615 100644 --- a/integration-tests/bundles/annotation.test.bundle/.classpath +++ b/integration-tests/bundles/annotation.test.bundle/.classpath @@ -5,6 +5,6 @@ - + diff --git a/integration-tests/bundles/annotation.test.bundle/pom.xml b/integration-tests/bundles/annotation.test.bundle/pom.xml index a6df0c76f..37b7d5df4 100644 --- a/integration-tests/bundles/annotation.test.bundle/pom.xml +++ b/integration-tests/bundles/annotation.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/cardinality.0to1.bundle/pom.xml b/integration-tests/bundles/cardinality.0to1.bundle/pom.xml index 59a3647db..f6121e129 100644 --- a/integration-tests/bundles/cardinality.0to1.bundle/pom.xml +++ b/integration-tests/bundles/cardinality.0to1.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 diff --git a/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml b/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml index 34c21db3d..5e4afaa35 100644 --- a/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 diff --git a/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml b/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml index c93a8145f..7f6885f16 100644 --- a/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 diff --git a/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml b/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml index 7effd0a99..e1ed13ed9 100644 --- a/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 diff --git a/integration-tests/bundles/config.bundle/pom.xml b/integration-tests/bundles/config.bundle/pom.xml index 8b9e5c840..a046a2b30 100644 --- a/integration-tests/bundles/config.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/pom.xml @@ -3,7 +3,7 @@ org.springframework.osgi spring-osgi-integration-test-bundles - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml b/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml index f612967d1..64d925641 100644 --- a/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 diff --git a/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml b/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml index 4dd1270dc..8f53ca68b 100644 --- a/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 diff --git a/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml b/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml index 972ede4ee..6651c3988 100644 --- a/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 diff --git a/integration-tests/bundles/config.file.with.dots.bundle/pom.xml b/integration-tests/bundles/config.file.with.dots.bundle/pom.xml index 79feb363f..d2caf3f88 100644 --- a/integration-tests/bundles/config.file.with.dots.bundle/pom.xml +++ b/integration-tests/bundles/config.file.with.dots.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/configuration.test.bundle/pom.xml b/integration-tests/bundles/configuration.test.bundle/pom.xml index 84415240f..a862071b5 100644 --- a/integration-tests/bundles/configuration.test.bundle/pom.xml +++ b/integration-tests/bundles/configuration.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/deadlock.bundle/pom.xml b/integration-tests/bundles/deadlock.bundle/pom.xml index aaa5fc35b..0bab00b24 100644 --- a/integration-tests/bundles/deadlock.bundle/pom.xml +++ b/integration-tests/bundles/deadlock.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/dependency.factory.bundle/pom.xml b/integration-tests/bundles/dependency.factory.bundle/pom.xml index d13413926..d4bdc1027 100644 --- a/integration-tests/bundles/dependency.factory.bundle/pom.xml +++ b/integration-tests/bundles/dependency.factory.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/dependency.test.bundle/pom.xml b/integration-tests/bundles/dependency.test.bundle/pom.xml index 64986a15e..bee617e3d 100644 --- a/integration-tests/bundles/dependency.test.bundle/pom.xml +++ b/integration-tests/bundles/dependency.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/error.bundle/pom.xml b/integration-tests/bundles/error.bundle/pom.xml index 76548f2a4..277447265 100644 --- a/integration-tests/bundles/error.bundle/pom.xml +++ b/integration-tests/bundles/error.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/extender.version.bundle/pom.xml b/integration-tests/bundles/extender.version.bundle/pom.xml index f24427fb4..5da1d1515 100644 --- a/integration-tests/bundles/extender.version.bundle/pom.xml +++ b/integration-tests/bundles/extender.version.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/io.fragment.1.bundle/pom.xml b/integration-tests/bundles/io.fragment.1.bundle/pom.xml index 419f12647..b4e367950 100644 --- a/integration-tests/bundles/io.fragment.1.bundle/pom.xml +++ b/integration-tests/bundles/io.fragment.1.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/io.fragment.2.bundle/pom.xml b/integration-tests/bundles/io.fragment.2.bundle/pom.xml index 7df5fb242..564602862 100644 --- a/integration-tests/bundles/io.fragment.2.bundle/pom.xml +++ b/integration-tests/bundles/io.fragment.2.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/lifecycle.test.bundle/pom.xml b/integration-tests/bundles/lifecycle.test.bundle/pom.xml index 485ebd1e5..8ecc993b7 100644 --- a/integration-tests/bundles/lifecycle.test.bundle/pom.xml +++ b/integration-tests/bundles/lifecycle.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/pom.xml b/integration-tests/bundles/pom.xml index c8986333d..86cdaf7ce 100644 --- a/integration-tests/bundles/pom.xml +++ b/integration-tests/bundles/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/proxy.creator.bundle/pom.xml b/integration-tests/bundles/proxy.creator.bundle/pom.xml index 83cc0e64f..86f0a1358 100644 --- a/integration-tests/bundles/proxy.creator.bundle/pom.xml +++ b/integration-tests/bundles/proxy.creator.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 diff --git a/integration-tests/bundles/reference.test.bundle/pom.xml b/integration-tests/bundles/reference.test.bundle/pom.xml index ea9a2d1d8..ba3e08231 100644 --- a/integration-tests/bundles/reference.test.bundle/pom.xml +++ b/integration-tests/bundles/reference.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/scoped.a.bundle/pom.xml b/integration-tests/bundles/scoped.a.bundle/pom.xml index 33905a7c9..ca582c2cc 100644 --- a/integration-tests/bundles/scoped.a.bundle/pom.xml +++ b/integration-tests/bundles/scoped.a.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/scoped.b.bundle/pom.xml b/integration-tests/bundles/scoped.b.bundle/pom.xml index aa4c089b6..2529f899b 100644 --- a/integration-tests/bundles/scoped.b.bundle/pom.xml +++ b/integration-tests/bundles/scoped.b.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/scoped.common.bundle/pom.xml b/integration-tests/bundles/scoped.common.bundle/pom.xml index 66b9fb5e6..21e1426ad 100644 --- a/integration-tests/bundles/scoped.common.bundle/pom.xml +++ b/integration-tests/bundles/scoped.common.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/service.listener.bundle/pom.xml b/integration-tests/bundles/service.listener.bundle/pom.xml index 07e319f50..e85d5bd25 100644 --- a/integration-tests/bundles/service.listener.bundle/pom.xml +++ b/integration-tests/bundles/service.listener.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.2.bundle/pom.xml b/integration-tests/bundles/simple.service.2.bundle/pom.xml index d6a8c648f..268e1c43d 100644 --- a/integration-tests/bundles/simple.service.2.bundle/pom.xml +++ b/integration-tests/bundles/simple.service.2.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.3.bundle/pom.xml b/integration-tests/bundles/simple.service.3.bundle/pom.xml index f08cc38c9..fa9f9576f 100644 --- a/integration-tests/bundles/simple.service.3.bundle/pom.xml +++ b/integration-tests/bundles/simple.service.3.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml b/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml index df6da7b88..3915b27c4 100644 --- a/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml +++ b/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.bundle.identical/pom.xml b/integration-tests/bundles/simple.service.bundle.identical/pom.xml index 7ff14e51a..90d118f23 100644 --- a/integration-tests/bundles/simple.service.bundle.identical/pom.xml +++ b/integration-tests/bundles/simple.service.bundle.identical/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.bundle/pom.xml b/integration-tests/bundles/simple.service.bundle/pom.xml index ba557302e..44caeb79d 100644 --- a/integration-tests/bundles/simple.service.bundle/pom.xml +++ b/integration-tests/bundles/simple.service.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/tccl.bundle/pom.xml b/integration-tests/bundles/tccl.bundle/pom.xml index 65d3d84eb..78958a5d2 100644 --- a/integration-tests/bundles/tccl.bundle/pom.xml +++ b/integration-tests/bundles/tccl.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/trivial.bundle/pom.xml b/integration-tests/bundles/trivial.bundle/pom.xml index 6ff0a9db5..a7794de22 100644 --- a/integration-tests/bundles/trivial.bundle/pom.xml +++ b/integration-tests/bundles/trivial.bundle/pom.xml @@ -2,7 +2,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/trivial.test.bundle/pom.xml b/integration-tests/bundles/trivial.test.bundle/pom.xml index c33900b9a..8b4c4a2d7 100644 --- a/integration-tests/bundles/trivial.test.bundle/pom.xml +++ b/integration-tests/bundles/trivial.test.bundle/pom.xml @@ -2,7 +2,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 33e42ce1d..b1f7e13f4 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/tests-tiger/.classpath b/integration-tests/tests-tiger/.classpath index 60b0c2e27..d7e7132db 100644 --- a/integration-tests/tests-tiger/.classpath +++ b/integration-tests/tests-tiger/.classpath @@ -5,7 +5,7 @@ - + @@ -17,9 +17,9 @@ - - - + + + diff --git a/integration-tests/tests-tiger/pom.xml b/integration-tests/tests-tiger/pom.xml index ddaab2866..82c4a43e5 100644 --- a/integration-tests/tests-tiger/pom.xml +++ b/integration-tests/tests-tiger/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/integration-tests/tests/.classpath b/integration-tests/tests/.classpath index 7235bd186..f883ed91c 100644 --- a/integration-tests/tests/.classpath +++ b/integration-tests/tests/.classpath @@ -11,16 +11,16 @@ - - - + + + - + - - + + @@ -31,8 +31,8 @@ - - - + + + diff --git a/integration-tests/tests/pom.xml b/integration-tests/tests/pom.xml index 70383131c..8ba4212e5 100644 --- a/integration-tests/tests/pom.xml +++ b/integration-tests/tests/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/io/.classpath b/io/.classpath index 21a2ff400..e192fc644 100644 --- a/io/.classpath +++ b/io/.classpath @@ -5,7 +5,7 @@ - + diff --git a/io/pom.xml b/io/pom.xml index 0eed4dbb6..04ec3e66d 100644 --- a/io/pom.xml +++ b/io/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/mock/pom.xml b/mock/pom.xml index b5f7d7cda..cb58cf306 100644 --- a/mock/pom.xml +++ b/mock/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/pom.xml b/pom.xml index 188fbb776..1c0713a00 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.springframework.osgi spring-osgi pom - 1.0.2-SNAPSHOT + 1.0.2 Spring Dynamic Modules http://www.springframework.org/osgi diff --git a/release/pom.xml b/release/pom.xml index 15ddf75f8..83a87cc54 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -13,7 +13,7 @@ org.springframework.osgi spring-osgi - 1.0.2-SNAPSHOT + 1.0.2 .. diff --git a/samples/petclinic/petclinic.sample.contract/pom.xml b/samples/petclinic/petclinic.sample.contract/pom.xml index 13a33f7e8..88880755c 100644 --- a/samples/petclinic/petclinic.sample.contract/pom.xml +++ b/samples/petclinic/petclinic.sample.contract/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 @@ -11,7 +11,7 @@ contract jar Spring OSGi Samples: Simple Petclinic Contract - 1.0.2-SNAPSHOT + 1.0.2 http://www.springframework.org/osgi diff --git a/samples/petclinic/petclinic.sample.hsqldb/pom.xml b/samples/petclinic/petclinic.sample.hsqldb/pom.xml index dd697f521..802f1df63 100644 --- a/samples/petclinic/petclinic.sample.hsqldb/pom.xml +++ b/samples/petclinic/petclinic.sample.hsqldb/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 @@ -11,7 +11,7 @@ hsqldb-impl jar Spring OSGi Samples: Simple Petclinic HSQLDB - 1.0.2-SNAPSHOT + 1.0.2 http://www.springframework.org/osgi diff --git a/samples/petclinic/petclinic.sample.jdbc/pom.xml b/samples/petclinic/petclinic.sample.jdbc/pom.xml index 68c87889e..754a50da8 100644 --- a/samples/petclinic/petclinic.sample.jdbc/pom.xml +++ b/samples/petclinic/petclinic.sample.jdbc/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 @@ -11,7 +11,7 @@ jdbc jar Spring OSGi Samples: Simple Petclinic JDBC - 1.0.2-SNAPSHOT + 1.0.2 http://www.springframework.org/osgi diff --git a/samples/petclinic/petclinic.sample.mysql/pom.xml b/samples/petclinic/petclinic.sample.mysql/pom.xml index ae5b7a3d8..32c5dcc62 100644 --- a/samples/petclinic/petclinic.sample.mysql/pom.xml +++ b/samples/petclinic/petclinic.sample.mysql/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 @@ -11,7 +11,7 @@ mysql-impl jar Spring OSGi Samples: Simple Petclinic MySQL - 1.0.2-SNAPSHOT + 1.0.2 http://www.springframework.org/osgi diff --git a/samples/petclinic/pom.xml b/samples/petclinic/pom.xml index 72693928d..44bd2df42 100644 --- a/samples/petclinic/pom.xml +++ b/samples/petclinic/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi.samples diff --git a/samples/pom.xml b/samples/pom.xml index 4ea8b5455..fc4878c07 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi.samples diff --git a/samples/simple-service/pom.xml b/samples/simple-service/pom.xml index 36fa3dd12..6f25b7a00 100644 --- a/samples/simple-service/pom.xml +++ b/samples/simple-service/pom.xml @@ -3,7 +3,7 @@ samples org.springframework.osgi.samples - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi.samples diff --git a/samples/simple-service/simple-service-bundle/pom.xml b/samples/simple-service/simple-service-bundle/pom.xml index 6739e4476..144aa7b50 100644 --- a/samples/simple-service/simple-service-bundle/pom.xml +++ b/samples/simple-service/simple-service-bundle/pom.xml @@ -2,7 +2,7 @@ simple-service org.springframework.osgi.samples - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi.samples diff --git a/samples/simple-service/simple-service-integration-test/pom.xml b/samples/simple-service/simple-service-integration-test/pom.xml index 2b8a60f19..29cddff01 100644 --- a/samples/simple-service/simple-service-integration-test/pom.xml +++ b/samples/simple-service/simple-service-integration-test/pom.xml @@ -3,7 +3,7 @@ simple-service org.springframework.osgi.samples - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi.samples diff --git a/samples/weather/pom.xml b/samples/weather/pom.xml index 9dc78a3fb..74641fde2 100644 --- a/samples/weather/pom.xml +++ b/samples/weather/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi.samples diff --git a/samples/weather/weather-dao/pom.xml b/samples/weather/weather-dao/pom.xml index c654061b6..8c9fafb73 100755 --- a/samples/weather/weather-dao/pom.xml +++ b/samples/weather/weather-dao/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.2-SNAPSHOT + 1.0.2 org.springframework.osgi.samples weather-dao diff --git a/samples/weather/weather-extension/pom.xml b/samples/weather/weather-extension/pom.xml index 223b7f4af..dec99981a 100644 --- a/samples/weather/weather-extension/pom.xml +++ b/samples/weather/weather-extension/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.2-SNAPSHOT + 1.0.2 org.springframework.osgi.samples weather-extension diff --git a/samples/weather/weather-service-integration-test/.classpath b/samples/weather/weather-service-integration-test/.classpath index 6686f313a..0b1b687ab 100644 --- a/samples/weather/weather-service-integration-test/.classpath +++ b/samples/weather/weather-service-integration-test/.classpath @@ -11,6 +11,6 @@ - + diff --git a/samples/weather/weather-service-integration-test/pom.xml b/samples/weather/weather-service-integration-test/pom.xml index 554a50bfa..b53ed7bf9 100644 --- a/samples/weather/weather-service-integration-test/pom.xml +++ b/samples/weather/weather-service-integration-test/pom.xml @@ -3,7 +3,7 @@ weather org.springframework.osgi.samples - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi.samples diff --git a/samples/weather/weather-service-test/pom.xml b/samples/weather/weather-service-test/pom.xml index 71841ba8b..5e938f155 100755 --- a/samples/weather/weather-service-test/pom.xml +++ b/samples/weather/weather-service-test/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.2-SNAPSHOT + 1.0.2 org.springframework.osgi.samples weather-service-test diff --git a/samples/weather/weather-service/pom.xml b/samples/weather/weather-service/pom.xml index 483ed2d7d..8fdfd0226 100755 --- a/samples/weather/weather-service/pom.xml +++ b/samples/weather/weather-service/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.2-SNAPSHOT + 1.0.2 org.springframework.osgi.samples weather-service diff --git a/samples/weather/wiring-bundle/.classpath b/samples/weather/wiring-bundle/.classpath index 01f8e24e1..b7628e472 100644 --- a/samples/weather/wiring-bundle/.classpath +++ b/samples/weather/wiring-bundle/.classpath @@ -13,7 +13,7 @@ - - + + diff --git a/samples/weather/wiring-bundle/pom.xml b/samples/weather/wiring-bundle/pom.xml index 9a0313407..88e4897ac 100755 --- a/samples/weather/wiring-bundle/pom.xml +++ b/samples/weather/wiring-bundle/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.2-SNAPSHOT + 1.0.2 org.springframework.osgi.samples wiring-bundle diff --git a/test-support/.classpath b/test-support/.classpath index 70f5760b9..e9107f0a7 100644 --- a/test-support/.classpath +++ b/test-support/.classpath @@ -15,8 +15,8 @@ - - + + diff --git a/test-support/pom.xml b/test-support/pom.xml index e3d86e598..848cad61b 100644 --- a/test-support/pom.xml +++ b/test-support/pom.xml @@ -2,7 +2,7 @@ spring-osgi org.springframework.osgi - 1.0.2-SNAPSHOT + 1.0.2 4.0.0 org.springframework.osgi diff --git a/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties b/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties index c90c8257a..16ff6de0b 100644 --- a/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties +++ b/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties @@ -26,7 +26,7 @@ ignore.junit.version=3.8.2-SNAPSHOT ignore.log4j.version=1.2.15-SNAPSHOT ignore.spring.version=2.5.1 -ignore.spring.osgi.version=1.0.2-SNAPSHOT +ignore.spring.osgi.version=1.0.2 ignore.slf4j.version=1.4.3 ignore.asm.version=2.2.3-SNAPSHOT From a079dee95b57ce3e2a8fc5f8abefa97877de52cb Mon Sep 17 00:00:00 2001 From: costin_leau Date: Mon, 24 Mar 2008 18:45:03 +0000 Subject: [PATCH 39/53] + move head to 1.0.3-SNAPSHOT --- annotation/pom.xml | 2 +- bundle-archetype/pom.xml | 2 +- .../resources/archetype-resources/.classpath | 10 +++++----- .../main/resources/archetype-resources/pom.xml | 2 +- core/.classpath | 2 +- core/pom.xml | 2 +- docs/pom.xml | 2 +- extender/pom.xml | 2 +- .../.classpath | 2 +- .../annotation.dependency.test.bundle/pom.xml | 2 +- .../bundles/annotation.test.bundle/.classpath | 2 +- .../bundles/annotation.test.bundle/pom.xml | 2 +- .../bundles/cardinality.0to1.bundle/pom.xml | 2 +- .../config.bundle/async.nowait.bundle/pom.xml | 2 +- .../config.bundle/async.wait.bundle/pom.xml | 2 +- .../config.bundle/no.publish.bundle/pom.xml | 2 +- .../bundles/config.bundle/pom.xml | 2 +- .../config.bundle/sync.nowait.bundle/pom.xml | 2 +- .../config.bundle/sync.tail.bundle/pom.xml | 2 +- .../config.bundle/sync.wait.bundle/pom.xml | 2 +- .../config.file.with.dots.bundle/pom.xml | 2 +- .../bundles/configuration.test.bundle/pom.xml | 2 +- .../bundles/deadlock.bundle/pom.xml | 2 +- .../bundles/dependency.factory.bundle/pom.xml | 2 +- .../bundles/dependency.test.bundle/pom.xml | 2 +- integration-tests/bundles/error.bundle/pom.xml | 2 +- .../bundles/extender.version.bundle/pom.xml | 2 +- .../bundles/io.fragment.1.bundle/pom.xml | 2 +- .../bundles/io.fragment.2.bundle/pom.xml | 2 +- .../bundles/lifecycle.test.bundle/pom.xml | 2 +- integration-tests/bundles/pom.xml | 2 +- .../bundles/proxy.creator.bundle/pom.xml | 2 +- .../bundles/reference.test.bundle/pom.xml | 2 +- .../bundles/scoped.a.bundle/pom.xml | 2 +- .../bundles/scoped.b.bundle/pom.xml | 2 +- .../bundles/scoped.common.bundle/pom.xml | 2 +- .../bundles/service.listener.bundle/pom.xml | 2 +- .../bundles/simple.service.2.bundle/pom.xml | 2 +- .../bundles/simple.service.3.bundle/pom.xml | 2 +- .../simple.service.bundle.2.identical/pom.xml | 2 +- .../simple.service.bundle.identical/pom.xml | 2 +- .../bundles/simple.service.bundle/pom.xml | 2 +- integration-tests/bundles/tccl.bundle/pom.xml | 2 +- .../bundles/trivial.bundle/pom.xml | 2 +- .../bundles/trivial.test.bundle/pom.xml | 2 +- integration-tests/pom.xml | 2 +- integration-tests/tests-tiger/.classpath | 8 ++++---- integration-tests/tests-tiger/pom.xml | 2 +- integration-tests/tests/.classpath | 18 +++++++++--------- integration-tests/tests/pom.xml | 2 +- io/.classpath | 2 +- io/pom.xml | 2 +- mock/pom.xml | 2 +- pom.xml | 8 ++++---- release/pom.xml | 2 +- .../petclinic.sample.contract/pom.xml | 4 ++-- .../petclinic/petclinic.sample.hsqldb/pom.xml | 4 ++-- .../petclinic/petclinic.sample.jdbc/pom.xml | 4 ++-- .../petclinic/petclinic.sample.mysql/pom.xml | 4 ++-- samples/petclinic/pom.xml | 2 +- samples/pom.xml | 2 +- samples/simple-service/pom.xml | 2 +- .../simple-service-bundle/pom.xml | 2 +- .../simple-service-integration-test/pom.xml | 2 +- samples/weather/pom.xml | 2 +- samples/weather/weather-dao/pom.xml | 2 +- samples/weather/weather-extension/pom.xml | 2 +- .../.classpath | 2 +- .../weather-service-integration-test/pom.xml | 2 +- samples/weather/weather-service-test/pom.xml | 2 +- samples/weather/weather-service/pom.xml | 2 +- samples/weather/wiring-bundle/.classpath | 4 ++-- samples/weather/wiring-bundle/pom.xml | 2 +- test-support/.classpath | 4 ++-- test-support/pom.xml | 2 +- .../osgi/test/internal/boot-bundles.properties | 2 +- 76 files changed, 100 insertions(+), 100 deletions(-) diff --git a/annotation/pom.xml b/annotation/pom.xml index b1374f69a..c8040fa0f 100644 --- a/annotation/pom.xml +++ b/annotation/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/bundle-archetype/pom.xml b/bundle-archetype/pom.xml index a3f64080f..ed3502aa6 100644 --- a/bundle-archetype/pom.xml +++ b/bundle-archetype/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/bundle-archetype/src/main/resources/archetype-resources/.classpath b/bundle-archetype/src/main/resources/archetype-resources/.classpath index 118606eb4..e1e9984cd 100644 --- a/bundle-archetype/src/main/resources/archetype-resources/.classpath +++ b/bundle-archetype/src/main/resources/archetype-resources/.classpath @@ -16,11 +16,11 @@ - - - - - + + + + + diff --git a/bundle-archetype/src/main/resources/archetype-resources/pom.xml b/bundle-archetype/src/main/resources/archetype-resources/pom.xml index fbdcf6dbb..76e246a41 100644 --- a/bundle-archetype/src/main/resources/archetype-resources/pom.xml +++ b/bundle-archetype/src/main/resources/archetype-resources/pom.xml @@ -12,7 +12,7 @@ 1.4.3 2.5.1 - 1.0.2 + 1.0.3-SNAPSHOT 3.2.2 diff --git a/core/.classpath b/core/.classpath index d79ba8e6d..32f7732c9 100644 --- a/core/.classpath +++ b/core/.classpath @@ -7,7 +7,7 @@ - + diff --git a/core/pom.xml b/core/pom.xml index 2e03f79ee..e9046cadd 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/docs/pom.xml b/docs/pom.xml index 2f16faa39..ebcc468a7 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -4,7 +4,7 @@ org.springframework.osgi spring-osgi pom - 1.0.2 + 1.0.3-SNAPSHOT Spring OSGi http://www.springframework.org/osgi diff --git a/extender/pom.xml b/extender/pom.xml index 108df55e9..eedf38d50 100644 --- a/extender/pom.xml +++ b/extender/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/annotation.dependency.test.bundle/.classpath b/integration-tests/bundles/annotation.dependency.test.bundle/.classpath index 20f43cd21..3d2ff0069 100644 --- a/integration-tests/bundles/annotation.dependency.test.bundle/.classpath +++ b/integration-tests/bundles/annotation.dependency.test.bundle/.classpath @@ -5,6 +5,6 @@ - + diff --git a/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml b/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml index 980a068f8..11d670ecb 100644 --- a/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml +++ b/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/annotation.test.bundle/.classpath b/integration-tests/bundles/annotation.test.bundle/.classpath index f2bde6615..ad4103415 100644 --- a/integration-tests/bundles/annotation.test.bundle/.classpath +++ b/integration-tests/bundles/annotation.test.bundle/.classpath @@ -5,6 +5,6 @@ - + diff --git a/integration-tests/bundles/annotation.test.bundle/pom.xml b/integration-tests/bundles/annotation.test.bundle/pom.xml index 37b7d5df4..89eabe550 100644 --- a/integration-tests/bundles/annotation.test.bundle/pom.xml +++ b/integration-tests/bundles/annotation.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/cardinality.0to1.bundle/pom.xml b/integration-tests/bundles/cardinality.0to1.bundle/pom.xml index f6121e129..52e1c6f26 100644 --- a/integration-tests/bundles/cardinality.0to1.bundle/pom.xml +++ b/integration-tests/bundles/cardinality.0to1.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml b/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml index 5e4afaa35..79c73c598 100644 --- a/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml b/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml index 7f6885f16..e00c983c6 100644 --- a/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml b/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml index e1ed13ed9..77f845c17 100644 --- a/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.bundle/pom.xml b/integration-tests/bundles/config.bundle/pom.xml index a046a2b30..3dc91f5b7 100644 --- a/integration-tests/bundles/config.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/pom.xml @@ -3,7 +3,7 @@ org.springframework.osgi spring-osgi-integration-test-bundles - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml b/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml index 64d925641..b690f474f 100644 --- a/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml b/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml index 8f53ca68b..b229cfc03 100644 --- a/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml b/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml index 6651c3988..372606a3b 100644 --- a/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/config.file.with.dots.bundle/pom.xml b/integration-tests/bundles/config.file.with.dots.bundle/pom.xml index d2caf3f88..d8490c081 100644 --- a/integration-tests/bundles/config.file.with.dots.bundle/pom.xml +++ b/integration-tests/bundles/config.file.with.dots.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/configuration.test.bundle/pom.xml b/integration-tests/bundles/configuration.test.bundle/pom.xml index a862071b5..3d400dc9b 100644 --- a/integration-tests/bundles/configuration.test.bundle/pom.xml +++ b/integration-tests/bundles/configuration.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/deadlock.bundle/pom.xml b/integration-tests/bundles/deadlock.bundle/pom.xml index 0bab00b24..adfcb517e 100644 --- a/integration-tests/bundles/deadlock.bundle/pom.xml +++ b/integration-tests/bundles/deadlock.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/dependency.factory.bundle/pom.xml b/integration-tests/bundles/dependency.factory.bundle/pom.xml index d4bdc1027..31611da4b 100644 --- a/integration-tests/bundles/dependency.factory.bundle/pom.xml +++ b/integration-tests/bundles/dependency.factory.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/dependency.test.bundle/pom.xml b/integration-tests/bundles/dependency.test.bundle/pom.xml index bee617e3d..01900b61f 100644 --- a/integration-tests/bundles/dependency.test.bundle/pom.xml +++ b/integration-tests/bundles/dependency.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/error.bundle/pom.xml b/integration-tests/bundles/error.bundle/pom.xml index 277447265..43bc17e42 100644 --- a/integration-tests/bundles/error.bundle/pom.xml +++ b/integration-tests/bundles/error.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/extender.version.bundle/pom.xml b/integration-tests/bundles/extender.version.bundle/pom.xml index 5da1d1515..a92da8d48 100644 --- a/integration-tests/bundles/extender.version.bundle/pom.xml +++ b/integration-tests/bundles/extender.version.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/io.fragment.1.bundle/pom.xml b/integration-tests/bundles/io.fragment.1.bundle/pom.xml index b4e367950..3807b6506 100644 --- a/integration-tests/bundles/io.fragment.1.bundle/pom.xml +++ b/integration-tests/bundles/io.fragment.1.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/io.fragment.2.bundle/pom.xml b/integration-tests/bundles/io.fragment.2.bundle/pom.xml index 564602862..a434fb970 100644 --- a/integration-tests/bundles/io.fragment.2.bundle/pom.xml +++ b/integration-tests/bundles/io.fragment.2.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/lifecycle.test.bundle/pom.xml b/integration-tests/bundles/lifecycle.test.bundle/pom.xml index 8ecc993b7..85b6043b3 100644 --- a/integration-tests/bundles/lifecycle.test.bundle/pom.xml +++ b/integration-tests/bundles/lifecycle.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/pom.xml b/integration-tests/bundles/pom.xml index 86cdaf7ce..41eb4f87b 100644 --- a/integration-tests/bundles/pom.xml +++ b/integration-tests/bundles/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/proxy.creator.bundle/pom.xml b/integration-tests/bundles/proxy.creator.bundle/pom.xml index 86f0a1358..3f1fab3cc 100644 --- a/integration-tests/bundles/proxy.creator.bundle/pom.xml +++ b/integration-tests/bundles/proxy.creator.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 diff --git a/integration-tests/bundles/reference.test.bundle/pom.xml b/integration-tests/bundles/reference.test.bundle/pom.xml index ba3e08231..09203b5c9 100644 --- a/integration-tests/bundles/reference.test.bundle/pom.xml +++ b/integration-tests/bundles/reference.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/scoped.a.bundle/pom.xml b/integration-tests/bundles/scoped.a.bundle/pom.xml index ca582c2cc..3a71db59c 100644 --- a/integration-tests/bundles/scoped.a.bundle/pom.xml +++ b/integration-tests/bundles/scoped.a.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/scoped.b.bundle/pom.xml b/integration-tests/bundles/scoped.b.bundle/pom.xml index 2529f899b..10b0e410d 100644 --- a/integration-tests/bundles/scoped.b.bundle/pom.xml +++ b/integration-tests/bundles/scoped.b.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/scoped.common.bundle/pom.xml b/integration-tests/bundles/scoped.common.bundle/pom.xml index 21e1426ad..96b335f29 100644 --- a/integration-tests/bundles/scoped.common.bundle/pom.xml +++ b/integration-tests/bundles/scoped.common.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/service.listener.bundle/pom.xml b/integration-tests/bundles/service.listener.bundle/pom.xml index e85d5bd25..369cb71c2 100644 --- a/integration-tests/bundles/service.listener.bundle/pom.xml +++ b/integration-tests/bundles/service.listener.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.2.bundle/pom.xml b/integration-tests/bundles/simple.service.2.bundle/pom.xml index 268e1c43d..44f4aea0a 100644 --- a/integration-tests/bundles/simple.service.2.bundle/pom.xml +++ b/integration-tests/bundles/simple.service.2.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.3.bundle/pom.xml b/integration-tests/bundles/simple.service.3.bundle/pom.xml index fa9f9576f..e6514c65f 100644 --- a/integration-tests/bundles/simple.service.3.bundle/pom.xml +++ b/integration-tests/bundles/simple.service.3.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml b/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml index 3915b27c4..f820c6411 100644 --- a/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml +++ b/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.bundle.identical/pom.xml b/integration-tests/bundles/simple.service.bundle.identical/pom.xml index 90d118f23..80efce6a8 100644 --- a/integration-tests/bundles/simple.service.bundle.identical/pom.xml +++ b/integration-tests/bundles/simple.service.bundle.identical/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.bundle/pom.xml b/integration-tests/bundles/simple.service.bundle/pom.xml index 44caeb79d..e39ce70ab 100644 --- a/integration-tests/bundles/simple.service.bundle/pom.xml +++ b/integration-tests/bundles/simple.service.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/tccl.bundle/pom.xml b/integration-tests/bundles/tccl.bundle/pom.xml index 78958a5d2..4b9362d52 100644 --- a/integration-tests/bundles/tccl.bundle/pom.xml +++ b/integration-tests/bundles/tccl.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/trivial.bundle/pom.xml b/integration-tests/bundles/trivial.bundle/pom.xml index a7794de22..3c39930c7 100644 --- a/integration-tests/bundles/trivial.bundle/pom.xml +++ b/integration-tests/bundles/trivial.bundle/pom.xml @@ -2,7 +2,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/trivial.test.bundle/pom.xml b/integration-tests/bundles/trivial.test.bundle/pom.xml index 8b4c4a2d7..449421536 100644 --- a/integration-tests/bundles/trivial.test.bundle/pom.xml +++ b/integration-tests/bundles/trivial.test.bundle/pom.xml @@ -2,7 +2,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index b1f7e13f4..f0f0759b8 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/tests-tiger/.classpath b/integration-tests/tests-tiger/.classpath index d7e7132db..dadb81bb0 100644 --- a/integration-tests/tests-tiger/.classpath +++ b/integration-tests/tests-tiger/.classpath @@ -5,7 +5,7 @@ - + @@ -17,9 +17,9 @@ - - - + + + diff --git a/integration-tests/tests-tiger/pom.xml b/integration-tests/tests-tiger/pom.xml index 82c4a43e5..4a7a7953b 100644 --- a/integration-tests/tests-tiger/pom.xml +++ b/integration-tests/tests-tiger/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/integration-tests/tests/.classpath b/integration-tests/tests/.classpath index f883ed91c..f219e4448 100644 --- a/integration-tests/tests/.classpath +++ b/integration-tests/tests/.classpath @@ -11,16 +11,16 @@ - - - + + + - + - - + + @@ -31,8 +31,8 @@ - - - + + + diff --git a/integration-tests/tests/pom.xml b/integration-tests/tests/pom.xml index 8ba4212e5..295eef980 100644 --- a/integration-tests/tests/pom.xml +++ b/integration-tests/tests/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/io/.classpath b/io/.classpath index e192fc644..54bcf1b76 100644 --- a/io/.classpath +++ b/io/.classpath @@ -5,7 +5,7 @@ - + diff --git a/io/pom.xml b/io/pom.xml index 04ec3e66d..8ae938bba 100644 --- a/io/pom.xml +++ b/io/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/mock/pom.xml b/mock/pom.xml index cb58cf306..0debe160e 100644 --- a/mock/pom.xml +++ b/mock/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/pom.xml b/pom.xml index 1c0713a00..6123b0027 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.springframework.osgi spring-osgi pom - 1.0.2 + 1.0.3-SNAPSHOT Spring Dynamic Modules http://www.springframework.org/osgi @@ -27,11 +27,11 @@ 1.0 - 1.0.2 + 1.0.3 - 1.0.2 - 1.0.2 + 1.0.3 + 1.0.3 * diff --git a/release/pom.xml b/release/pom.xml index 83a87cc54..1e49fb803 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -13,7 +13,7 @@ org.springframework.osgi spring-osgi - 1.0.2 + 1.0.3-SNAPSHOT .. diff --git a/samples/petclinic/petclinic.sample.contract/pom.xml b/samples/petclinic/petclinic.sample.contract/pom.xml index 88880755c..92d7a3c7e 100644 --- a/samples/petclinic/petclinic.sample.contract/pom.xml +++ b/samples/petclinic/petclinic.sample.contract/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 @@ -11,7 +11,7 @@ contract jar Spring OSGi Samples: Simple Petclinic Contract - 1.0.2 + 1.0.3-SNAPSHOT http://www.springframework.org/osgi diff --git a/samples/petclinic/petclinic.sample.hsqldb/pom.xml b/samples/petclinic/petclinic.sample.hsqldb/pom.xml index 802f1df63..15e67070c 100644 --- a/samples/petclinic/petclinic.sample.hsqldb/pom.xml +++ b/samples/petclinic/petclinic.sample.hsqldb/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 @@ -11,7 +11,7 @@ hsqldb-impl jar Spring OSGi Samples: Simple Petclinic HSQLDB - 1.0.2 + 1.0.3-SNAPSHOT http://www.springframework.org/osgi diff --git a/samples/petclinic/petclinic.sample.jdbc/pom.xml b/samples/petclinic/petclinic.sample.jdbc/pom.xml index 754a50da8..b3e2b5f6f 100644 --- a/samples/petclinic/petclinic.sample.jdbc/pom.xml +++ b/samples/petclinic/petclinic.sample.jdbc/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 @@ -11,7 +11,7 @@ jdbc jar Spring OSGi Samples: Simple Petclinic JDBC - 1.0.2 + 1.0.3-SNAPSHOT http://www.springframework.org/osgi diff --git a/samples/petclinic/petclinic.sample.mysql/pom.xml b/samples/petclinic/petclinic.sample.mysql/pom.xml index 32c5dcc62..1db23af7c 100644 --- a/samples/petclinic/petclinic.sample.mysql/pom.xml +++ b/samples/petclinic/petclinic.sample.mysql/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 @@ -11,7 +11,7 @@ mysql-impl jar Spring OSGi Samples: Simple Petclinic MySQL - 1.0.2 + 1.0.3-SNAPSHOT http://www.springframework.org/osgi diff --git a/samples/petclinic/pom.xml b/samples/petclinic/pom.xml index 44bd2df42..30879f207 100644 --- a/samples/petclinic/pom.xml +++ b/samples/petclinic/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/pom.xml b/samples/pom.xml index fc4878c07..16c6dca25 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/simple-service/pom.xml b/samples/simple-service/pom.xml index 6f25b7a00..804ef39f6 100644 --- a/samples/simple-service/pom.xml +++ b/samples/simple-service/pom.xml @@ -3,7 +3,7 @@ samples org.springframework.osgi.samples - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/simple-service/simple-service-bundle/pom.xml b/samples/simple-service/simple-service-bundle/pom.xml index 144aa7b50..5bc72d6fb 100644 --- a/samples/simple-service/simple-service-bundle/pom.xml +++ b/samples/simple-service/simple-service-bundle/pom.xml @@ -2,7 +2,7 @@ simple-service org.springframework.osgi.samples - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/simple-service/simple-service-integration-test/pom.xml b/samples/simple-service/simple-service-integration-test/pom.xml index 29cddff01..de9f02328 100644 --- a/samples/simple-service/simple-service-integration-test/pom.xml +++ b/samples/simple-service/simple-service-integration-test/pom.xml @@ -3,7 +3,7 @@ simple-service org.springframework.osgi.samples - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/weather/pom.xml b/samples/weather/pom.xml index 74641fde2..f6ecb95e4 100644 --- a/samples/weather/pom.xml +++ b/samples/weather/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/weather/weather-dao/pom.xml b/samples/weather/weather-dao/pom.xml index 8c9fafb73..50dea3ee1 100755 --- a/samples/weather/weather-dao/pom.xml +++ b/samples/weather/weather-dao/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.2 + 1.0.3-SNAPSHOT org.springframework.osgi.samples weather-dao diff --git a/samples/weather/weather-extension/pom.xml b/samples/weather/weather-extension/pom.xml index dec99981a..dc5d16443 100644 --- a/samples/weather/weather-extension/pom.xml +++ b/samples/weather/weather-extension/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.2 + 1.0.3-SNAPSHOT org.springframework.osgi.samples weather-extension diff --git a/samples/weather/weather-service-integration-test/.classpath b/samples/weather/weather-service-integration-test/.classpath index 0b1b687ab..c04a80e52 100644 --- a/samples/weather/weather-service-integration-test/.classpath +++ b/samples/weather/weather-service-integration-test/.classpath @@ -11,6 +11,6 @@ - + diff --git a/samples/weather/weather-service-integration-test/pom.xml b/samples/weather/weather-service-integration-test/pom.xml index b53ed7bf9..783bfa16e 100644 --- a/samples/weather/weather-service-integration-test/pom.xml +++ b/samples/weather/weather-service-integration-test/pom.xml @@ -3,7 +3,7 @@ weather org.springframework.osgi.samples - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi.samples diff --git a/samples/weather/weather-service-test/pom.xml b/samples/weather/weather-service-test/pom.xml index 5e938f155..524487cd7 100755 --- a/samples/weather/weather-service-test/pom.xml +++ b/samples/weather/weather-service-test/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.2 + 1.0.3-SNAPSHOT org.springframework.osgi.samples weather-service-test diff --git a/samples/weather/weather-service/pom.xml b/samples/weather/weather-service/pom.xml index 8fdfd0226..d4abd63b7 100755 --- a/samples/weather/weather-service/pom.xml +++ b/samples/weather/weather-service/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.2 + 1.0.3-SNAPSHOT org.springframework.osgi.samples weather-service diff --git a/samples/weather/wiring-bundle/.classpath b/samples/weather/wiring-bundle/.classpath index b7628e472..471095476 100644 --- a/samples/weather/wiring-bundle/.classpath +++ b/samples/weather/wiring-bundle/.classpath @@ -13,7 +13,7 @@ - - + + diff --git a/samples/weather/wiring-bundle/pom.xml b/samples/weather/wiring-bundle/pom.xml index 88e4897ac..8ce845046 100755 --- a/samples/weather/wiring-bundle/pom.xml +++ b/samples/weather/wiring-bundle/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.2 + 1.0.3-SNAPSHOT org.springframework.osgi.samples wiring-bundle diff --git a/test-support/.classpath b/test-support/.classpath index e9107f0a7..46e535e6e 100644 --- a/test-support/.classpath +++ b/test-support/.classpath @@ -15,8 +15,8 @@ - - + + diff --git a/test-support/pom.xml b/test-support/pom.xml index 848cad61b..e99765023 100644 --- a/test-support/pom.xml +++ b/test-support/pom.xml @@ -2,7 +2,7 @@ spring-osgi org.springframework.osgi - 1.0.2 + 1.0.3-SNAPSHOT 4.0.0 org.springframework.osgi diff --git a/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties b/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties index 16ff6de0b..4658ee55c 100644 --- a/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties +++ b/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties @@ -26,7 +26,7 @@ ignore.junit.version=3.8.2-SNAPSHOT ignore.log4j.version=1.2.15-SNAPSHOT ignore.spring.version=2.5.1 -ignore.spring.osgi.version=1.0.2 +ignore.spring.osgi.version=1.0.3-SNAPSHOT ignore.slf4j.version=1.4.3 ignore.asm.version=2.2.3-SNAPSHOT From fc5cdb1c538b8ad850d7cc3c515691e167c36b99 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Mon, 24 Mar 2008 18:46:27 +0000 Subject: [PATCH 40/53] + updated changelog to head --- changelog.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog.txt b/changelog.txt index 636dd82ca..7e89a8b02 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,10 @@ SPRING DYNAMIC MODULES FRAMEWORK CHANGELOG ========================================== http://www.springframework.org/osgi +Changes in version 1.0.3 (2008-0x-xx) +------------------------------------- + + Changes in version 1.0.2 (2008-03-25) ------------------------------------- From 4fa05c2b0b59b7bfff44d211c3efc155d5435e64 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Tue, 22 Apr 2008 17:04:03 +0000 Subject: [PATCH 41/53] OSGI-455 + backport critical fix + prevent refresh exception from being swallowed --- changelog.txt | 3 +++ .../support/AbstractDelegatedExecutionApplicationContext.java | 3 +++ docs/src/docbkx/reference/service-registry.xml | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 7e89a8b02..e34dca094 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,9 @@ http://www.springframework.org/osgi Changes in version 1.0.3 (2008-0x-xx) ------------------------------------- +Package org.springframework.osgi.context +* AbstractDelegatedExecutionApplicationContext rethrows all exceptions occuring during refresh + Changes in version 1.0.2 (2008-03-25) ------------------------------------- diff --git a/core/src/main/java/org/springframework/osgi/context/support/AbstractDelegatedExecutionApplicationContext.java b/core/src/main/java/org/springframework/osgi/context/support/AbstractDelegatedExecutionApplicationContext.java index 2b8a80386..0436f6225 100644 --- a/core/src/main/java/org/springframework/osgi/context/support/AbstractDelegatedExecutionApplicationContext.java +++ b/core/src/main/java/org/springframework/osgi/context/support/AbstractDelegatedExecutionApplicationContext.java @@ -210,6 +210,8 @@ public void startRefresh() { // Destroy already created singletons to avoid dangling // resources. beanFactory.destroySingletons(); + // rethrow exception to the caller + throws ex; } } } @@ -258,6 +260,7 @@ public void completeRefresh() { // resources. getBeanFactory().destroySingletons(); logger.error("Post refresh error", ex); + // rethrow exception to the caller throw ex; } } diff --git a/docs/src/docbkx/reference/service-registry.xml b/docs/src/docbkx/reference/service-registry.xml index 80b33ba64..fa8a74568 100644 --- a/docs/src/docbkx/reference/service-registry.xml +++ b/docs/src/docbkx/reference/service-registry.xml @@ -1478,7 +1478,7 @@ public void anyMethodName(ServiceReference ref);]]> The declaration above while valid, creates a dependecy between the listener and the importer it is defined upon. In order to create the importer, the listener has to be resolved and created but in order to do that, the importer called service needs to be retrieved (instantiated and configured). This cycle needs to be broken - down so that at least one bean can be fully created and configured. This scenario is supported is supported by Spring-DM + down so that at least one bean can be fully created and configured. This scenario is supported by Spring-DM for both exporter and importers however, if the listener is defined as a nested bean, the cycle cannot be resolved:
From 3d6190f7028ffac8edbbeea1b2a325173affb1b0 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Tue, 22 Apr 2008 18:05:12 +0000 Subject: [PATCH 42/53] OSGI-455 + fix typo --- .../support/AbstractDelegatedExecutionApplicationContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/springframework/osgi/context/support/AbstractDelegatedExecutionApplicationContext.java b/core/src/main/java/org/springframework/osgi/context/support/AbstractDelegatedExecutionApplicationContext.java index 0436f6225..25193668f 100644 --- a/core/src/main/java/org/springframework/osgi/context/support/AbstractDelegatedExecutionApplicationContext.java +++ b/core/src/main/java/org/springframework/osgi/context/support/AbstractDelegatedExecutionApplicationContext.java @@ -211,7 +211,7 @@ public void startRefresh() { // resources. beanFactory.destroySingletons(); // rethrow exception to the caller - throws ex; + throw ex; } } } From 7442ddce2b1fa0b5a08a9dc76caff131cb8ce702 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Wed, 23 Apr 2008 18:33:24 +0000 Subject: [PATCH 43/53] OSGI-460 + back port bug fix + improve test utils --- changelog.txt | 3 + .../springframework/osgi/util/DebugUtils.java | 45 ++++++++--- .../org/springframework/osgi/TestUtils.java | 29 +++++++ .../osgi/util/DebugUtilsTest.java | 81 +++++++++++++++++++ 4 files changed, 145 insertions(+), 13 deletions(-) create mode 100644 core/src/test/java/org/springframework/osgi/util/DebugUtilsTest.java diff --git a/changelog.txt b/changelog.txt index e34dca094..0606b5cb2 100644 --- a/changelog.txt +++ b/changelog.txt @@ -8,6 +8,9 @@ Changes in version 1.0.3 (2008-0x-xx) Package org.springframework.osgi.context * AbstractDelegatedExecutionApplicationContext rethrows all exceptions occuring during refresh +Package org.springframework.osgi.util +* fixed parsing exception in DebugUtils when dealing with version ranges + Changes in version 1.0.2 (2008-03-25) ------------------------------------- diff --git a/core/src/main/java/org/springframework/osgi/util/DebugUtils.java b/core/src/main/java/org/springframework/osgi/util/DebugUtils.java index eeedd7796..134916780 100644 --- a/core/src/main/java/org/springframework/osgi/util/DebugUtils.java +++ b/core/src/main/java/org/springframework/osgi/util/DebugUtils.java @@ -330,20 +330,39 @@ private static Version hasExport(Bundle bundle, String packageName) { */ private static Version getVersion(String stmt, String packageName) { if (stmt != null) { - for (StringTokenizer strok = new StringTokenizer(stmt, ","); strok.hasMoreTokens();) { - StringTokenizer parts = new StringTokenizer(strok.nextToken(), ";"); - String pkg = parts.nextToken().trim(); + String[] pkgTokens = stmt.split(COMMA); + for (int pkgTokenIndex = 0; pkgTokenIndex < pkgTokens.length; pkgTokenIndex++) { + String pkgToken = pkgTokens[pkgTokenIndex].trim(); + String pkg = null; + Version version = null; + // extract package first (incorrect, this needs to be changed) + int firstDirectiveIndex = pkgToken.indexOf(SEMI_COLON); + if (firstDirectiveIndex > -1) { + pkg = pkgToken.substring(0, firstDirectiveIndex); + } + else { + pkg = pkgToken; + version = Version.emptyVersion; + } + + // check for version only if we have a match if (pkg.equals(packageName)) { - Version version = Version.emptyVersion; - for (; parts.hasMoreTokens();) { - String modifier = parts.nextToken().trim(); - if (modifier.startsWith("version")) { - String vstr = modifier.substring(modifier.indexOf("=") + 1).trim(); - if (vstr.startsWith("\"")) - vstr = vstr.substring(1); - if (vstr.endsWith("\"")) - vstr = vstr.substring(0, vstr.length() - 1); - version = Version.parseVersion(vstr); + // no version determined, find one + if (version == null) { + String[] directiveTokens = pkgToken.substring(firstDirectiveIndex + 1).split(SEMI_COLON); + for (int directiveTokenIndex = 0; directiveTokenIndex < directiveTokens.length; directiveTokenIndex++) { + String directive = directiveTokens[directiveTokenIndex].trim(); + // found it + if (directive.startsWith(Constants.VERSION_ATTRIBUTE)) { + String value = directive.substring(directive.indexOf(EQUALS) + 1).trim(); + if (value.startsWith("\"[") || value.startsWith("\"(")) { + value = value.substring(2); + } + version = Version.parseVersion(value); + } + } + if (version == null) { + version = Version.emptyVersion; } } return version; diff --git a/core/src/test/java/org/springframework/osgi/TestUtils.java b/core/src/test/java/org/springframework/osgi/TestUtils.java index e0f10f474..1bef54890 100644 --- a/core/src/test/java/org/springframework/osgi/TestUtils.java +++ b/core/src/test/java/org/springframework/osgi/TestUtils.java @@ -13,10 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.springframework.osgi; import java.lang.reflect.Field; +import java.lang.reflect.Method; +import org.springframework.util.ObjectUtils; import org.springframework.util.ReflectionUtils; import org.springframework.util.ReflectionUtils.FieldCallback; import org.springframework.util.ReflectionUtils.FieldFilter; @@ -32,6 +35,7 @@ public abstract class TestUtils { public static Object getFieldValue(final Object object, final String fieldName) { final Object[] fld = new Object[1]; ReflectionUtils.doWithFields(object.getClass(), new FieldCallback() { + public void doWith(Field field) throws IllegalArgumentException, IllegalAccessException { field.setAccessible(true); fld[0] = field.get(object); @@ -47,4 +51,29 @@ public boolean matches(Field field) { return fld[0]; } + + private static Object invokeMethod(final Object target, final Class targetClass, String methodName, Object[] args) { + Class[] types = null; + if (ObjectUtils.isEmpty(args)) { + types = new Class[0]; + } + else { + types = new Class[args.length]; + for (int objectIndex = 0; objectIndex < args.length; objectIndex++) { + types[objectIndex] = args[objectIndex].getClass(); + } + } + + Method method = ReflectionUtils.findMethod(targetClass, methodName, types); + ReflectionUtils.makeAccessible(method); + return ReflectionUtils.invokeMethod(method, target, args); + } + + public static Object invokeMethod(final Object target, String methodName, Object[] args) { + return invokeMethod(target, target.getClass(), methodName, args); + } + + public static Object invokeStaticMethod(final Class target, String methodName, Object[] args) { + return invokeMethod(null, target, methodName, args); + } } diff --git a/core/src/test/java/org/springframework/osgi/util/DebugUtilsTest.java b/core/src/test/java/org/springframework/osgi/util/DebugUtilsTest.java new file mode 100644 index 000000000..5c9dec4b7 --- /dev/null +++ b/core/src/test/java/org/springframework/osgi/util/DebugUtilsTest.java @@ -0,0 +1,81 @@ +/* + * Copyright 2006-2008 the original author or authors. + * + * Licensed 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.springframework.osgi.util; + +import junit.framework.TestCase; + +import org.osgi.framework.Version; +import org.springframework.osgi.TestUtils; +import org.springframework.util.ObjectUtils; + +/** + * Test for the critical logging path in debug utils. + * + * @author Costin Leau + * + */ +public class DebugUtilsTest extends TestCase { + + private Version getVersion(String statement, String pkg) { + return (Version) TestUtils.invokeStaticMethod(DebugUtils.class, "getVersion", new String[] { statement, pkg }); + } + + public void tstStringSplit() throws Exception { + String str = "gigel;version=\"[12,3.4)\";resolution:=optional,costel;resolution:=optional;version=\"1.2\",florel;resolution:=optional;version=1.2"; + String split = ",+?"; + String[] tokens = str.split(split); + System.out.println("tokens found " + tokens.length); + System.out.println("split is " + ObjectUtils.nullSafeToString(tokens)); + } + + public void testNoVersion() throws Exception { + String pkg = "foo"; + assertEquals(Version.emptyVersion, getVersion(pkg, pkg)); + } + + public void testSingleVersion() throws Exception { + String pkg = "foo"; + String version = "1.2"; + assertEquals(Version.parseVersion(version), getVersion(pkg + ";version=" + version, pkg)); + } + + public void testVersionRange() throws Exception { + String pkg = "foo"; + String version = "1.2.0.bla"; + assertEquals(Version.parseVersion(version), getVersion(pkg + ";version=\"[" + version + ",3.4\")", pkg)); + } + + public void testVersionRangePlusExtraDirective() throws Exception { + String pkg = "foo"; + String version = "1.2.0.bla"; + assertEquals(Version.parseVersion(version), getVersion(pkg + ";version=\"[" + version + + ",3.4\");resolution:=optional", pkg)); + } + + public void testNoVersionPlusExtraDirective() throws Exception { + String pkg = "foo"; + assertEquals(Version.emptyVersion, getVersion(pkg + ";resolution:=optional", pkg)); + } + + public void testSingleVersionPlusExtraDirective() throws Exception { + String pkg = "foo"; + String version = "1.2.0.bla"; + assertEquals(Version.parseVersion(version), getVersion(pkg + ";version=" + version + ";resolution:=optional", + pkg)); + } + +} From 1bed30a9b775b069b6b2d7529957ab0558c2a8e0 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Wed, 23 Apr 2008 20:42:50 +0000 Subject: [PATCH 44/53] OSGI-460 + finish integrating backport --- .../main/java/org/springframework/osgi/util/DebugUtils.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/main/java/org/springframework/osgi/util/DebugUtils.java b/core/src/main/java/org/springframework/osgi/util/DebugUtils.java index 134916780..9109f3b3e 100644 --- a/core/src/main/java/org/springframework/osgi/util/DebugUtils.java +++ b/core/src/main/java/org/springframework/osgi/util/DebugUtils.java @@ -48,6 +48,12 @@ */ public abstract class DebugUtils { + private static final String EQUALS = "="; + private static final String DOUBLE_QUOTE = "\""; + private static final String SEMI_COLON = ";"; + private static final String COMMA = ","; + + /** use degradable logger */ private static final Log log = LogUtils.createLogger(DebugUtils.class); From 869324eb705ad946517bfd5506f0da1adde2a747 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Thu, 24 Apr 2008 08:04:35 +0000 Subject: [PATCH 45/53] OSGI-460 + finish integrating backport --- .../springframework/osgi/util/DebugUtils.java | 58 ++++++++++++++++--- 1 file changed, 51 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/org/springframework/osgi/util/DebugUtils.java b/core/src/main/java/org/springframework/osgi/util/DebugUtils.java index 9109f3b3e..79e8b2368 100644 --- a/core/src/main/java/org/springframework/osgi/util/DebugUtils.java +++ b/core/src/main/java/org/springframework/osgi/util/DebugUtils.java @@ -18,8 +18,10 @@ import java.io.IOException; import java.net.URL; +import java.util.ArrayList; import java.util.Dictionary; import java.util.Enumeration; +import java.util.List; import java.util.StringTokenizer; import java.util.jar.JarEntry; import java.util.jar.JarInputStream; @@ -53,7 +55,6 @@ public abstract class DebugUtils { private static final String SEMI_COLON = ";"; private static final String COMMA = ","; - /** use degradable logger */ private static final Log log = LogUtils.createLogger(DebugUtils.class); @@ -336,12 +337,12 @@ private static Version hasExport(Bundle bundle, String packageName) { */ private static Version getVersion(String stmt, String packageName) { if (stmt != null) { - String[] pkgTokens = stmt.split(COMMA); - for (int pkgTokenIndex = 0; pkgTokenIndex < pkgTokens.length; pkgTokenIndex++) { - String pkgToken = pkgTokens[pkgTokenIndex].trim(); + String[] pkgs = splitIntoPackages(stmt); + + for (int packageIndex = 0; packageIndex < pkgs.length; packageIndex++) { + String pkgToken = pkgs[packageIndex].trim(); String pkg = null; Version version = null; - // extract package first (incorrect, this needs to be changed) int firstDirectiveIndex = pkgToken.indexOf(SEMI_COLON); if (firstDirectiveIndex > -1) { pkg = pkgToken.substring(0, firstDirectiveIndex); @@ -361,8 +362,22 @@ private static Version getVersion(String stmt, String packageName) { // found it if (directive.startsWith(Constants.VERSION_ATTRIBUTE)) { String value = directive.substring(directive.indexOf(EQUALS) + 1).trim(); - if (value.startsWith("\"[") || value.startsWith("\"(")) { - value = value.substring(2); + + boolean lowEqualTo = value.startsWith("\"["); + boolean lowGreaterThen = value.startsWith("\"("); + if (lowEqualTo || lowGreaterThen) { + boolean highEqualTo = value.endsWith("]\""); + boolean highLessThen = value.endsWith(")\""); + + // remove brackets + value = value.substring(2, value.length() - 2); + int commaIndex = value.indexOf(COMMA); + + // TODO: currently, only the left side is considered + Version left = Version.parseVersion(value.substring(0, commaIndex)); + Version right = Version.parseVersion(value.substring(commaIndex + 1)); + + return left; } version = Version.parseVersion(value); } @@ -377,4 +392,33 @@ private static Version getVersion(String stmt, String packageName) { } return null; } + + private static String[] splitIntoPackages(String stmt) { + // spit the statement into packages but consider " + List pkgs = new ArrayList(2); + + StringBuffer pkg = new StringBuffer(); + boolean ignoreComma = false; + for (int stringIndex = 0; stringIndex < stmt.length(); stringIndex++) { + char currentChar = stmt.charAt(stringIndex); + if (currentChar == ',') { + if (ignoreComma) { + pkg.append(currentChar); + } + else { + pkgs.add(pkg.toString()); + pkg = new StringBuffer(); + ignoreComma = false; + } + } + else { + if (currentChar == '\"') { + ignoreComma = !ignoreComma; + } + pkg.append(currentChar); + } + } + pkgs.add(pkg.toString()); + return (String[]) pkgs.toArray(new String[pkgs.size()]); + } } From 9abcd2d085e1bad4d52aa506fa49a8fd24eb14ea Mon Sep 17 00:00:00 2001 From: andypiper Date: Tue, 29 Apr 2008 12:05:18 +0000 Subject: [PATCH 46/53] OSGI-466 --- ...nceDependencyBeanFactoryPostProcessor.java | 135 ++++++++++++++++++ ...ceReferenceInjectionBeanPostProcessor.java | 33 +++-- .../extensions/annotation/AnnotatedBean.java | 19 ++- .../annotation/OsgiServiceAnnotationTest.java | 56 +++++--- ...OsgiServiceImportDependencyDefinition.java | 21 +++ .../OsgiServiceImportDependencyFactory.java | 23 +++ .../internal/ContextLoaderListener.java | 7 + .../startup/DependencyServiceManager.java | 24 +++- .../startup/ServiceDependency.java | 7 +- .../dependencies/DependentImpl.java | 51 +++---- .../src/main/resources/META-INF/MANIFEST.MF | 3 +- .../META-INF/spring/dependencies.xml | 3 +- .../resources/META-INF/spring/reference.xml | 3 +- 13 files changed, 315 insertions(+), 70 deletions(-) create mode 100755 annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceDependencyBeanFactoryPostProcessor.java create mode 100755 core/src/main/java/org/springframework/osgi/service/importer/OsgiServiceImportDependencyDefinition.java create mode 100755 core/src/main/java/org/springframework/osgi/service/importer/OsgiServiceImportDependencyFactory.java diff --git a/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceDependencyBeanFactoryPostProcessor.java b/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceDependencyBeanFactoryPostProcessor.java new file mode 100755 index 000000000..529fc8094 --- /dev/null +++ b/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceDependencyBeanFactoryPostProcessor.java @@ -0,0 +1,135 @@ +package org.springframework.osgi.extensions.annotation; + +import java.lang.reflect.Method; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.osgi.framework.Filter; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.beans.factory.config.BeanFactoryPostProcessor; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; +import org.springframework.core.Ordered; +import org.springframework.core.PriorityOrdered; +import org.springframework.core.annotation.AnnotationUtils; +import org.springframework.osgi.service.exporter.OsgiServicePropertiesResolver; +import org.springframework.osgi.service.importer.OsgiServiceImportDependencyDefinition; +import org.springframework.osgi.service.importer.OsgiServiceImportDependencyFactory; +import org.springframework.osgi.util.OsgiFilterUtils; +import org.springframework.util.ObjectUtils; +import org.springframework.util.ReflectionUtils; + +/** + * @author Andy Piper + */ +public class ServiceReferenceDependencyBeanFactoryPostProcessor + implements BeanFactoryPostProcessor, OsgiServiceImportDependencyFactory, PriorityOrdered { + + private HashSet dependencies = new HashSet(); + private int order = Ordered.HIGHEST_PRECEDENCE; + + private static Log logger = LogFactory.getLog(ServiceReferenceDependencyBeanFactoryPostProcessor.class); + + public int getOrder() { + return order; + } + + public void setOrder(int order) { + this.order = order; + } + + public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { + String[] beanDefinitionNames = beanFactory.getBeanDefinitionNames(); + for (String definitionName : beanDefinitionNames) { + BeanDefinition definition = beanFactory.getBeanDefinition(definitionName); + String className = definition.getBeanClassName(); + try { + Class clazz = Class.forName(className, true, beanFactory.getBeanClassLoader()); + dependencies.addAll(getClassServiceDependencies(clazz, definitionName)); + } + catch (ClassNotFoundException cnfe) { + if (logger.isWarnEnabled()) + logger.warn("Could not load class [" + className + "]"); + } + } + if (logger.isDebugEnabled()) + logger.debug("Processing annotations for [" + beanFactory + "] found " + dependencies); + } + + public Set getServiceDependencyDefinitions() { + return dependencies; + } + + protected boolean hasServiceProperty(Class clazz) { + return AnnotationUtils.findAnnotation(clazz, ServiceReference.class) != null; + } + + private Set getClassServiceDependencies(final Class beanClass, final String beanName) { + final HashSet dependencies = new HashSet(); + ReflectionUtils.doWithMethods(beanClass, new ReflectionUtils.MethodCallback() { + + public void doWith(final Method method) { + final ServiceReference s = AnnotationUtils.getAnnotation(method, ServiceReference.class); + if (s != null && method.getParameterTypes().length == 1 + && !Collection.class.isAssignableFrom(method.getParameterTypes()[0])) { + try { + if (logger.isDebugEnabled()) + logger.debug("Processing annotation [" + s + "] for [" + beanClass.getName() + "." + + method.getName() + "()] on bean [" + beanName + "]"); + dependencies.add(new OsgiServiceImportDependencyDefinition() { + public Filter getFilter() { + return getUnifiedFilter(s, method, beanName); + } + + public boolean isMandatory() { + return s.cardinality().toCardinality().isMandatory(); + } + + public String toString() { + return beanName + "." + method.getName() + ": " + getFilter() + (isMandatory() ? " (mandatory)" + : " (optional)"); + } + }); + } + catch (Exception e) { + throw new IllegalArgumentException("Error processing service annotation", e); + } + } + } + }); + return dependencies; + } + + private Filter getUnifiedFilter(ServiceReference s, Method writeMethod, String beanName) { + String filter; + if (s.serviceTypes() == null || s.serviceTypes().length == 0 + || (s.serviceTypes().length == 1 && s.serviceTypes()[0].equals(ServiceReference.class))) { + Class[] params = writeMethod.getParameterTypes(); + if (params.length != 1) { + throw new IllegalArgumentException("Setter for [" + beanName + "] must have only one argument"); + } + filter = OsgiFilterUtils.unifyFilter(new Class[]{params[0]}, s.filter()); + } + else { + filter = OsgiFilterUtils.unifyFilter(s.serviceTypes(), s.filter()); + } + + if (logger.isTraceEnabled()) + logger.trace("unified classes=[" + filter + "]"); + + // add the serviceBeanName constraint + if (s.serviceBeanName().length() > 0) { + filter = OsgiFilterUtils.unifyFilter( + OsgiServicePropertiesResolver.BEAN_NAME_PROPERTY_KEY, new String[]{s.serviceBeanName()}, filter); + if (logger.isTraceEnabled()) + logger.trace("unified serviceBeanName [" + ObjectUtils.nullSafeToString(s.serviceBeanName()) + "] and filter=[" + + filter + "]"); + } + + // create (which implies validation) the actual filter + return OsgiFilterUtils.createFilter(filter); + } +} diff --git a/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceInjectionBeanPostProcessor.java b/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceInjectionBeanPostProcessor.java index b7d46ee60..1bfecb0ef 100755 --- a/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceInjectionBeanPostProcessor.java +++ b/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceInjectionBeanPostProcessor.java @@ -46,11 +46,11 @@ /** * BeanPostProcessor that processed annotation to inject * Spring-DM managed OSGi services. - * + * * @author Andy Piper */ public class ServiceReferenceInjectionBeanPostProcessor extends InstantiationAwareBeanPostProcessorAdapter implements - BundleContextAware, BeanFactoryAware, BeanClassLoaderAware { + BundleContextAware, BeanFactoryAware, BeanClassLoaderAware { private BundleContext bundleContext; @@ -68,7 +68,7 @@ public void setBeanClassLoader(ClassLoader classLoader) { /** * process FactoryBean created objects, since these will not have had * services injected. - * + * * @param bean * @param beanName */ @@ -92,7 +92,7 @@ public void doWith(Method method) { try { if (logger.isDebugEnabled()) logger.debug("Processing annotation [" + s + "] for [" + bean.getClass().getName() + "." - + method.getName() + "()] on bean [" + beanName + "]"); + + method.getName() + "()] on bean [" + beanName + "]"); method.invoke(bean, getServiceProperty(s, method, beanName)); } catch (Exception e) { @@ -104,7 +104,7 @@ public void doWith(Method method) { } public PropertyValues postProcessPropertyValues(PropertyValues pvs, PropertyDescriptor[] pds, Object bean, - String beanName) throws BeansException { + String beanName) throws BeansException { MutablePropertyValues newprops = new MutablePropertyValues(pvs); for (PropertyDescriptor pd : pds) { @@ -139,19 +139,28 @@ private Object getServiceProperty(ServiceReference s, Method writeMethod, String } } + private boolean impliedServiceType(ServiceReference s) { + return (s.serviceTypes() == null || s.serviceTypes().length == 0 + || (s.serviceTypes().length == 1 && s.serviceTypes()[0].equals(ServiceReference.class))); + } + // Package protected for testing private AbstractOsgiServiceImportFactoryBean getServicePropertyInternal(AbstractOsgiServiceImportFactoryBean pfb, - ServiceReference s, Method writeMethod, String beanName) throws Exception { + ServiceReference s, Method writeMethod, String beanName) throws Exception { if (s.filter().length() > 0) { pfb.setFilter(s.filter()); } - if (s.serviceTypes() == null || s.serviceTypes().length == 0 - || (s.serviceTypes().length == 1 && s.serviceTypes()[0].equals(ServiceReference.class))) { + if (impliedServiceType(s)) { Class[] params = writeMethod.getParameterTypes(); if (params.length != 1) { throw new IllegalArgumentException("Setter for [" + beanName + "] must have only one argument"); } - pfb.setInterfaces(new Class[] { params[0] }); + if (Collection.class.isAssignableFrom(params[0])) { + throw new IllegalArgumentException("Cannot infer type for collection-based reference [" + beanName + "]"); + } + else { + pfb.setInterfaces(new Class[]{params[0]}); + } } else { pfb.setInterfaces(s.serviceTypes()); @@ -168,13 +177,13 @@ private AbstractOsgiServiceImportFactoryBean getServicePropertyInternal(Abstract } /* package */AbstractOsgiServiceImportFactoryBean getServiceProperty(OsgiServiceProxyFactoryBean pfb, - ServiceReference s, Method writeMethod, String beanName) throws Exception { + ServiceReference s, Method writeMethod, String beanName) throws Exception { pfb.setTimeout(s.timeout()); return getServicePropertyInternal(pfb, s, writeMethod, beanName); } /* package */AbstractOsgiServiceImportFactoryBean getServiceProperty(OsgiServiceCollectionProxyFactoryBean pfb, - ServiceReference s, Method writeMethod, String beanName) throws Exception { + ServiceReference s, Method writeMethod, String beanName) throws Exception { Class[] params = writeMethod.getParameterTypes(); if (SortedSet.class.isAssignableFrom(params[0])) { pfb.setCollectionType(CollectionType.SORTED_SET); @@ -187,7 +196,7 @@ else if (List.class.isAssignableFrom(params[0])) { } else { throw new IllegalArgumentException("Setter for [" + beanName - + "] does not have a valid Collection type argument"); + + "] does not have a valid Collection type argument"); } return getServicePropertyInternal(pfb, s, writeMethod, beanName); } diff --git a/annotation/src/test/java/org/springframework/osgi/extensions/annotation/AnnotatedBean.java b/annotation/src/test/java/org/springframework/osgi/extensions/annotation/AnnotatedBean.java index dc3f87308..eb79574db 100755 --- a/annotation/src/test/java/org/springframework/osgi/extensions/annotation/AnnotatedBean.java +++ b/annotation/src/test/java/org/springframework/osgi/extensions/annotation/AnnotatedBean.java @@ -38,6 +38,7 @@ public class AnnotatedBean { private AnnotatedBean annotatedBeanTypeWithCardinality0_1; private List annotatedBeanTypeWithCardinality0_N; private SortedSet annotatedBeanTypeWithCardinality1_N; + private SortedSet annotatedBeanErrorTypeWithCardinality1_N; private AnnotatedBean annotatedBeanTypeWithClassLoaderClient; private AnnotatedBean annotatedBeanTypeWithClassLoaderServiceProvider; private AnnotatedBean annotatedBeanTypeWithClassLoaderUmanaged; @@ -114,20 +115,28 @@ public List getAnnotatedBeanTypeWithCardinality0_N() { return annotatedBeanTypeWithCardinality0_N; } - @ServiceReference(cardinality = ServiceReferenceCardinality.C0__N) + @ServiceReference(cardinality = ServiceReferenceCardinality.C0__N, serviceTypes = AnnotatedBean.class) public void setAnnotatedBeanTypeWithCardinality0_N(List annotatedBeanTypeWithCardinality0_N) { this.annotatedBeanTypeWithCardinality0_N = annotatedBeanTypeWithCardinality0_N; } - public SortedSet getAnnotatedBeanTypeWithCardinality1_N() { - return annotatedBeanTypeWithCardinality1_N; + public SortedSet getAnnotatedBeanErrorTypeWithCardinality1_N() { + return annotatedBeanErrorTypeWithCardinality1_N; } @ServiceReference(cardinality = ServiceReferenceCardinality.C1__N) - public void setAnnotatedBeanTypeWithCardinality1_N(SortedSet annotatedBeanTypeWithCardinality1_N) { - this.annotatedBeanTypeWithCardinality1_N = annotatedBeanTypeWithCardinality1_N; + public void setAnnotatedBeanErrorTypeWithCardinality1_N(SortedSet annotatedBeanTypeWithCardinality1_N) { + this.annotatedBeanErrorTypeWithCardinality1_N = annotatedBeanTypeWithCardinality1_N; } + public SortedSet getAnnotatedBeanTypeWithCardinality1_N() { + return annotatedBeanTypeWithCardinality1_N; + } + + @ServiceReference(cardinality = ServiceReferenceCardinality.C1__N, serviceTypes = AnnotatedBean.class) + public void setAnnotatedBeanTypeWithCardinality1_N(SortedSet annotatedBeanTypeWithCardinality1_N) { + this.annotatedBeanTypeWithCardinality1_N = annotatedBeanTypeWithCardinality1_N; + } public AnnotatedBean getAnnotatedBeanTypeWithClassLoaderClient() { return annotatedBeanTypeWithClassLoaderClient; } diff --git a/annotation/src/test/java/org/springframework/osgi/extensions/annotation/OsgiServiceAnnotationTest.java b/annotation/src/test/java/org/springframework/osgi/extensions/annotation/OsgiServiceAnnotationTest.java index 557288720..d01a68a69 100644 --- a/annotation/src/test/java/org/springframework/osgi/extensions/annotation/OsgiServiceAnnotationTest.java +++ b/annotation/src/test/java/org/springframework/osgi/extensions/annotation/OsgiServiceAnnotationTest.java @@ -23,7 +23,6 @@ import java.util.SortedSet; import junit.framework.TestCase; - import org.easymock.MockControl; import org.osgi.framework.BundleContext; import org.osgi.framework.Constants; @@ -64,18 +63,17 @@ protected void tearDown() throws Exception { /** * Disabled since it doesn't work as we can't proxy final classes. - * @throws Exception */ public void tstGetServicePropertySetters() throws Exception { OsgiServiceProxyFactoryBean pfb = new OsgiServiceProxyFactoryBean(); - Method setter = AnnotatedBean.class.getMethod("setStringType", new Class[] { String.class }); + Method setter = AnnotatedBean.class.getMethod("setStringType", new Class[]{String.class}); ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); Class[] intfs = (Class[]) getPrivateProperty(pfb, "serviceTypes"); assertEquals(intfs[0], String.class); - setter = AnnotatedBean.class.getMethod("setIntType", new Class[] { Integer.TYPE }); + setter = AnnotatedBean.class.getMethod("setIntType", new Class[]{Integer.TYPE}); ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); pfb = new OsgiServiceProxyFactoryBean(); @@ -88,48 +86,62 @@ public void tstGetServicePropertySetters() throws Exception { public void testGetServicePropertyCardinality() throws Exception { OsgiServiceProxyFactoryBean pfb = new OsgiServiceProxyFactoryBean(); Method setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithCardinality1_1", - new Class[] { AnnotatedBean.class }); + new Class[]{AnnotatedBean.class}); ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); assertTrue(pfb.isMandatory()); setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithCardinality0_1", - new Class[] { AnnotatedBean.class }); + new Class[]{AnnotatedBean.class}); ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); pfb = new OsgiServiceProxyFactoryBean(); processor.getServiceProperty(pfb, ref, setter, null); assertFalse(pfb.isMandatory()); } - // disabled since there are no annotations for multi-injection public void testProperMultiCardinality() throws Exception { OsgiServiceCollectionProxyFactoryBean pfb = new OsgiServiceCollectionProxyFactoryBean(); Method setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithCardinality0_N", - new Class[] { List.class }); + new Class[]{List.class}); ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); assertFalse(pfb.isMandatory()); setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithCardinality1_N", - new Class[] { SortedSet.class }); + new Class[]{SortedSet.class}); ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); pfb = new OsgiServiceCollectionProxyFactoryBean(); processor.getServiceProperty(pfb, ref, setter, null); assertTrue(pfb.isMandatory()); } + public void testErrorMultiCardinality() throws Exception { + OsgiServiceCollectionProxyFactoryBean pfb = new OsgiServiceCollectionProxyFactoryBean(); + + Method setter = AnnotatedBean.class.getMethod("setAnnotatedBeanErrorTypeWithCardinality1_N", + new Class[]{SortedSet.class}); + ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); + pfb = new OsgiServiceCollectionProxyFactoryBean(); + try { + processor.getServiceProperty(pfb, ref, setter, null); + fail("IllegalArgumentException should have been thrown"); + } + catch (Exception e) { + } + } + public void testGetServicePropertyClassloader() throws Exception { OsgiServiceProxyFactoryBean pfb = new OsgiServiceProxyFactoryBean(); Method setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithClassLoaderClient", - new Class[] { AnnotatedBean.class }); + new Class[]{AnnotatedBean.class}); ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); assertEquals(pfb.getContextClassLoader(), ImportContextClassLoader.CLIENT); pfb = new OsgiServiceProxyFactoryBean(); setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithClassLoaderUmanaged", - new Class[] { AnnotatedBean.class }); + new Class[]{AnnotatedBean.class}); ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); @@ -137,7 +149,7 @@ public void testGetServicePropertyClassloader() throws Exception { pfb = new OsgiServiceProxyFactoryBean(); setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithClassLoaderServiceProvider", - new Class[] { AnnotatedBean.class }); + new Class[]{AnnotatedBean.class}); ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); assertEquals(pfb.getContextClassLoader(), ImportContextClassLoader.SERVICE_PROVIDER); @@ -146,7 +158,7 @@ public void testGetServicePropertyClassloader() throws Exception { public void testGetServicePropertyBeanName() throws Exception { OsgiServiceProxyFactoryBean pfb = new OsgiServiceProxyFactoryBean(); Method setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithBeanName", - new Class[] { AnnotatedBean.class }); + new Class[]{AnnotatedBean.class}); ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); String beanName = (String) getPrivateProperty(pfb, "serviceBeanName"); @@ -157,7 +169,7 @@ public void testGetServicePropertyBeanName() throws Exception { public void testGetServicePropertyFilter() throws Exception { OsgiServiceProxyFactoryBean pfb = new OsgiServiceProxyFactoryBean(); Method setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithFilter", - new Class[] { AnnotatedBean.class }); + new Class[]{AnnotatedBean.class}); ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); String filter = (String) getPrivateProperty(pfb, "filter"); @@ -168,7 +180,7 @@ public void testGetServicePropertyFilter() throws Exception { public void testGetServicePropertyServiceClass() throws Exception { OsgiServiceProxyFactoryBean pfb = new OsgiServiceProxyFactoryBean(); Method setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithServiceType", - new Class[] { AnnotatedBean.class }); + new Class[]{AnnotatedBean.class}); ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); Class[] intfs = (Class[]) getPrivateProperty(pfb, "interfaces"); @@ -178,7 +190,7 @@ public void testGetServicePropertyServiceClass() throws Exception { public void testGetServicePropertyComplex() throws Exception { OsgiServiceProxyFactoryBean pfb = new OsgiServiceProxyFactoryBean(); Method setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeComplex", - new Class[] { AnnotatedBean.class }); + new Class[]{AnnotatedBean.class}); ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); Class[] intfs = (Class[]) getPrivateProperty(pfb, "interfaces"); @@ -304,9 +316,9 @@ else if (clazz.equals(Serializable.class.getName())) { ServiceReferenceInjectionBeanPostProcessor p = new ServiceReferenceInjectionBeanPostProcessor(); p.setBundleContext(context); p.setBeanClassLoader(getClass().getClassLoader()); - PropertyValues pvs = p.postProcessPropertyValues(new MutablePropertyValues(), new PropertyDescriptor[] { - new PropertyDescriptor("serviceBean", ServiceFactoryBean.class), - new PropertyDescriptor("serializableBean", ServiceFactoryBean.class) }, bean, "myBean"); + PropertyValues pvs = p.postProcessPropertyValues(new MutablePropertyValues(), new PropertyDescriptor[]{ + new PropertyDescriptor("serviceBean", ServiceFactoryBean.class), + new PropertyDescriptor("serializableBean", ServiceFactoryBean.class)}, bean, "myBean"); MyService msb = (MyService) pvs.getPropertyValue("serviceBean").getValue(); Serializable ssb = (Serializable) pvs.getPropertyValue("serializableBean").getValue(); @@ -350,9 +362,9 @@ else if (clazz.equals(Serializable.class.getName())) { ServiceReferenceInjectionBeanPostProcessor p = new ServiceReferenceInjectionBeanPostProcessor(); p.setBundleContext(context); p.setBeanClassLoader(getClass().getClassLoader()); - PropertyValues pvs = p.postProcessPropertyValues(new MutablePropertyValues(), new PropertyDescriptor[] { - new PropertyDescriptor("serviceBean", ServiceBean.class), - new PropertyDescriptor("serializableBean", ServiceBean.class) }, bean, "myBean"); + PropertyValues pvs = p.postProcessPropertyValues(new MutablePropertyValues(), new PropertyDescriptor[]{ + new PropertyDescriptor("serviceBean", ServiceBean.class), + new PropertyDescriptor("serializableBean", ServiceBean.class)}, bean, "myBean"); MyService msb = (MyService) pvs.getPropertyValue("serviceBean").getValue(); Serializable ssb = (Serializable) pvs.getPropertyValue("serializableBean").getValue(); diff --git a/core/src/main/java/org/springframework/osgi/service/importer/OsgiServiceImportDependencyDefinition.java b/core/src/main/java/org/springframework/osgi/service/importer/OsgiServiceImportDependencyDefinition.java new file mode 100755 index 000000000..aac51b161 --- /dev/null +++ b/core/src/main/java/org/springframework/osgi/service/importer/OsgiServiceImportDependencyDefinition.java @@ -0,0 +1,21 @@ +package org.springframework.osgi.service.importer; + +import org.osgi.framework.Filter; + +/** + * Defines a service dependency to be processed by + * {@link org.springframework.osgi.context.DelegatedExecutionOsgiBundleApplicationContext} + * + * @author Andy Piper + */ +public interface OsgiServiceImportDependencyDefinition { + /** + * @return the filter to be used for looking up the required service + */ + Filter getFilter(); + + /** + * @return whether or not this dependency is mandatory + */ + boolean isMandatory(); +} diff --git a/core/src/main/java/org/springframework/osgi/service/importer/OsgiServiceImportDependencyFactory.java b/core/src/main/java/org/springframework/osgi/service/importer/OsgiServiceImportDependencyFactory.java new file mode 100755 index 000000000..50dffc203 --- /dev/null +++ b/core/src/main/java/org/springframework/osgi/service/importer/OsgiServiceImportDependencyFactory.java @@ -0,0 +1,23 @@ +package org.springframework.osgi.service.importer; + +import java.util.Set; + +/** + * Interface to be implemented by beans wishing to add to the set of dependencies + * required by the {@link org.springframework.context.ApplicationContext}. The processed beans are used at the same + * time in the (@link ApplicationContext} lifecycle as + * {@link org.springframework.beans.factory.config.BeanFactoryPostProcessor}s, so similar considerations apply + * when using them. + * + * @author Andy Piper + * @see org.springframework.context.ApplicationContext + * @see org.springframework.beans.factory.config.BeanFactoryPostProcessor + */ +public interface OsgiServiceImportDependencyFactory { + /** + * Get service dependencies as defined by the bean to be used in determining startup. + * + * @return a set of OsgiServiceImportDependencyDefinitions + */ + public Set getServiceDependencyDefinitions(); +} diff --git a/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java b/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java index 5d554cd45..03e9d6986 100644 --- a/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java +++ b/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java @@ -212,6 +212,8 @@ protected void handleEvent(BundleEvent event) { private static final String ANNOTATION_BPP_CLASS = "org.springframework.osgi.extensions.annotation.ServiceReferenceInjectionBeanPostProcessor"; + private static final String ANNOTATION_BFPP_CLASS = "org.springframework.osgi.extensions.annotation.ServiceReferenceDependencyBeanFactoryPostProcessor"; + private static final Log log = LogFactory.getLog(ContextLoaderListener.class); // "Spring Application Context Creation Timer" @@ -727,6 +729,11 @@ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) beanFactory.addBeanPostProcessor(annotationBpp); } }); + + Class annotationBfppClass = context.getBundle().loadClass(ANNOTATION_BFPP_CLASS); + + final BeanFactoryPostProcessor annotationBfpp = (BeanFactoryPostProcessor) BeanUtils.instantiateClass(annotationBfppClass); + applicationContext.addBeanFactoryPostProcessor(annotationBfpp); } catch (ClassNotFoundException exception) { log.info("Spring-dm annotation package cannot be found; automatic annotation processing is disabled"); diff --git a/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyServiceManager.java b/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyServiceManager.java index a8a114c80..310ca720b 100644 --- a/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyServiceManager.java +++ b/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyServiceManager.java @@ -17,6 +17,8 @@ import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.osgi.context.DelegatedExecutionOsgiBundleApplicationContext; import org.springframework.osgi.service.importer.support.AbstractOsgiServiceImportFactoryBean; +import org.springframework.osgi.service.importer.OsgiServiceImportDependencyFactory; +import org.springframework.osgi.service.importer.OsgiServiceImportDependencyDefinition; import org.springframework.osgi.util.OsgiListenerUtils; import org.springframework.osgi.util.OsgiStringUtils; @@ -210,7 +212,27 @@ protected void findServiceDependencies() { unsatisfiedDependencies.add(dependency); } } - } + // Add dependencies defined by any OsgiServiceImportDependencyFactorys. + beans = BeanFactoryUtils.beanNamesForTypeIncludingAncestors(beanFactory, + OsgiServiceImportDependencyFactory.class, true, false); + for (int i = 0; i < beans.length; i++) { + String beanName = beans[i]; + OsgiServiceImportDependencyFactory reference = (OsgiServiceImportDependencyFactory) beanFactory.getBean(beanName); + Set depList = reference.getServiceDependencyDefinitions(); + for (Iterator iter = depList.iterator(); iter.hasNext();) { + OsgiServiceImportDependencyDefinition def = (OsgiServiceImportDependencyDefinition)iter.next(); + ServiceDependency dependency = new ServiceDependency(bundleContext, def.getFilter(), + def.isMandatory()); + + dependencies.add(dependency); + if (!dependency.isServicePresent()) { + if (debug) + log.debug("adding OSGi service dependency for filter " + def.getFilter()); + unsatisfiedDependencies.add(dependency); + } + } + } + } finally { currentThread.setContextClassLoader(oldTCCL); } diff --git a/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/ServiceDependency.java b/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/ServiceDependency.java index 8b4a1ca35..23ecd5c42 100644 --- a/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/ServiceDependency.java +++ b/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/ServiceDependency.java @@ -18,13 +18,13 @@ import org.osgi.framework.BundleContext; import org.osgi.framework.Filter; import org.osgi.framework.ServiceEvent; +import org.springframework.osgi.service.importer.OsgiServiceImportDependencyDefinition; import org.springframework.osgi.util.OsgiServiceReferenceUtils; /** * @author Costin Leau - * */ -public class ServiceDependency { +public class ServiceDependency implements OsgiServiceImportDependencyDefinition { protected final Filter filter; protected final String filterAsString; @@ -63,4 +63,7 @@ public Filter getFilter() { return filter; } + public boolean isMandatory() { + return isMandatory; + } } diff --git a/integration-tests/bundles/annotation.dependency.test.bundle/src/main/java/org/springframework/osgi/iandt/annotation/dependencies/DependentImpl.java b/integration-tests/bundles/annotation.dependency.test.bundle/src/main/java/org/springframework/osgi/iandt/annotation/dependencies/DependentImpl.java index 4f0eefa65..b3b608608 100644 --- a/integration-tests/bundles/annotation.dependency.test.bundle/src/main/java/org/springframework/osgi/iandt/annotation/dependencies/DependentImpl.java +++ b/integration-tests/bundles/annotation.dependency.test.bundle/src/main/java/org/springframework/osgi/iandt/annotation/dependencies/DependentImpl.java @@ -1,44 +1,45 @@ package org.springframework.osgi.iandt.annotation.dependencies; -import java.util.SortedSet; +import java.util.List; -import org.springframework.osgi.iandt.simpleservice2.MyService2; -import org.springframework.osgi.iandt.simpleservice.MyService; import org.springframework.osgi.extensions.annotation.ServiceReference; +import org.springframework.osgi.extensions.annotation.ServiceReferenceCardinality; +import org.springframework.osgi.iandt.simpleservice.MyService; +import org.springframework.osgi.iandt.simpleservice2.MyService2; /** * @author Andy Piper * @author Hal Hildebrand */ public class DependentImpl implements Dependent { - private MyService service1; - private MyService2 service2; - private MyService2 service3; - private SortedSet servicecollection; + private MyService service1; + private MyService2 service2; + private MyService2 service3; + private List servicecollection; - @ServiceReference - public void setService1(MyService service1) { - this.service1 = service1; - } + @ServiceReference + public void setService1(MyService service1) { + this.service1 = service1; + } - public void setService2(MyService2 service2) { - this.service2 = service2; - } + public void setService2(MyService2 service2) { + this.service2 = service2; + } - @ServiceReference - public void setServiceCollection(SortedSet service1) { - this.servicecollection = service1; + @ServiceReference(cardinality = ServiceReferenceCardinality.C1__N, serviceTypes = MyService.class) + public void setServiceCollection(List service1) { + this.servicecollection = service1; } - @ServiceReference - public void setService3(MyService2 service3) { - this.service3 = service3; - } + @ServiceReference + public void setService3(MyService2 service3) { + this.service3 = service3; + } - public boolean isResolved() { - return service2 != null && service3 != null && service1 != null && servicecollection != null - && servicecollection.size() > 0; - } + public boolean isResolved() { + return service2 != null && service3 != null && service1 != null && servicecollection != null + && servicecollection.size() > 0; + } } diff --git a/integration-tests/bundles/annotation.dependency.test.bundle/src/main/resources/META-INF/MANIFEST.MF b/integration-tests/bundles/annotation.dependency.test.bundle/src/main/resources/META-INF/MANIFEST.MF index 9918f5cdc..1e873910d 100644 --- a/integration-tests/bundles/annotation.dependency.test.bundle/src/main/resources/META-INF/MANIFEST.MF +++ b/integration-tests/bundles/annotation.dependency.test.bundle/src/main/resources/META-INF/MANIFEST.MF @@ -5,5 +5,6 @@ Bundle-ManifestVersion: 2 Bundle-ClassPath: . Spring-Context: *; eagerly-init-importers:=true Import-Package: org.springframework.osgi.iandt.simpleservice, - org.springframework.osgi.iandt.simpleservice2 + org.springframework.osgi.iandt.simpleservice2, + org.springframework.osgi.extensions.annotation Export-Package: org.springframework.osgi.iandt.annotation.dependencies diff --git a/integration-tests/bundles/annotation.dependency.test.bundle/src/main/resources/META-INF/spring/dependencies.xml b/integration-tests/bundles/annotation.dependency.test.bundle/src/main/resources/META-INF/spring/dependencies.xml index 24c537bd4..aa99e19dd 100644 --- a/integration-tests/bundles/annotation.dependency.test.bundle/src/main/resources/META-INF/spring/dependencies.xml +++ b/integration-tests/bundles/annotation.dependency.test.bundle/src/main/resources/META-INF/spring/dependencies.xml @@ -17,5 +17,6 @@ - + + diff --git a/integration-tests/bundles/annotation.test.bundle/src/main/resources/META-INF/spring/reference.xml b/integration-tests/bundles/annotation.test.bundle/src/main/resources/META-INF/spring/reference.xml index fc25f39ab..1cfc037ec 100644 --- a/integration-tests/bundles/annotation.test.bundle/src/main/resources/META-INF/spring/reference.xml +++ b/integration-tests/bundles/annotation.test.bundle/src/main/resources/META-INF/spring/reference.xml @@ -8,6 +8,7 @@ - + + From 527a5ecb22e904c2d151a927148b128d69c636b2 Mon Sep 17 00:00:00 2001 From: andypiper Date: Wed, 30 Apr 2008 13:46:55 +0000 Subject: [PATCH 47/53] OSGI-466 --- ...nceDependencyBeanFactoryPostProcessor.java | 19 ++++++++--- .../startup/DependencyServiceManager.java | 11 ++++--- .../startup/ServiceDependency.java | 32 +++++++++++++++---- 3 files changed, 47 insertions(+), 15 deletions(-) diff --git a/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceDependencyBeanFactoryPostProcessor.java b/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceDependencyBeanFactoryPostProcessor.java index 529fc8094..458a6dd0a 100755 --- a/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceDependencyBeanFactoryPostProcessor.java +++ b/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceDependencyBeanFactoryPostProcessor.java @@ -48,7 +48,7 @@ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) String className = definition.getBeanClassName(); try { Class clazz = Class.forName(className, true, beanFactory.getBeanClassLoader()); - dependencies.addAll(getClassServiceDependencies(clazz, definitionName)); + dependencies.addAll(getClassServiceDependencies(clazz, definitionName, definition)); } catch (ClassNotFoundException cnfe) { if (logger.isWarnEnabled()) @@ -67,14 +67,17 @@ protected boolean hasServiceProperty(Class clazz) { return AnnotationUtils.findAnnotation(clazz, ServiceReference.class) != null; } - private Set getClassServiceDependencies(final Class beanClass, final String beanName) { + private Set getClassServiceDependencies(final Class beanClass, final String beanName, + final BeanDefinition definition) { final HashSet dependencies = new HashSet(); ReflectionUtils.doWithMethods(beanClass, new ReflectionUtils.MethodCallback() { public void doWith(final Method method) { final ServiceReference s = AnnotationUtils.getAnnotation(method, ServiceReference.class); if (s != null && method.getParameterTypes().length == 1 - && !Collection.class.isAssignableFrom(method.getParameterTypes()[0])) { + && !Collection.class.isAssignableFrom(method.getParameterTypes()[0]) + // Ignore definitions overriden in the XML config + && !definition.getPropertyValues().contains(getPropertyName(method))) { try { if (logger.isDebugEnabled()) logger.debug("Processing annotation [" + s + "] for [" + beanClass.getName() + "." @@ -103,7 +106,15 @@ public String toString() { return dependencies; } - private Filter getUnifiedFilter(ServiceReference s, Method writeMethod, String beanName) { + private String getPropertyName(Method method) { + String name = method.getName(); + if (name.startsWith("set")) { + return Character.toLowerCase(name.charAt(3)) + name.substring(4); + } + return name; + } + + private Filter getUnifiedFilter(ServiceReference s, Method writeMethod, String beanName) { String filter; if (s.serviceTypes() == null || s.serviceTypes().length == 0 || (s.serviceTypes().length == 1 && s.serviceTypes()[0].equals(ServiceReference.class))) { diff --git a/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyServiceManager.java b/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyServiceManager.java index 310ca720b..2f52de900 100644 --- a/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyServiceManager.java +++ b/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyServiceManager.java @@ -130,7 +130,9 @@ private void updateDependencies(ServiceEvent serviceEvent) { case ServiceEvent.MODIFIED: unsatisfiedDependencies.remove(dependency); if (debug) { - log.debug("found service; eliminating " + dependency); + log.debug("found service for " + context.getDisplayName() + + "; eliminating " + dependency + ", remaining [" + + unsatisfiedDependencies + "]"); } break; @@ -198,8 +200,8 @@ protected void findServiceDependencies() { String realBean = beanName.substring(1); - if (debug) - log.debug("destroying bean " + realBean + " from context " + beanFactory); + //if (debug) + // log.debug("destroying bean " + realBean + " from context " + beanFactory); // clean up factory singleton // ((DefaultListableBeanFactory) @@ -238,8 +240,7 @@ protected void findServiceDependencies() { } log.info(dependencies.size() + " OSGi service dependencies, " + unsatisfiedDependencies.size() - + " unsatisfied for " + context.getDisplayName()); - + + " unsatisfied ["+ unsatisfiedDependencies + "] for " + context.getDisplayName()); } protected boolean isSatisfied() { diff --git a/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/ServiceDependency.java b/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/ServiceDependency.java index 23ecd5c42..36a7a84c9 100644 --- a/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/ServiceDependency.java +++ b/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/ServiceDependency.java @@ -33,13 +33,13 @@ public class ServiceDependency implements OsgiServiceImportDependencyDefinition protected final BundleContext bundleContext; - public ServiceDependency(BundleContext bc, Filter serviceFilter, boolean isMandatory) { - filter = serviceFilter; - this.filterAsString = filter.toString(); - this.isMandatory = isMandatory; - bundleContext = bc; + public ServiceDependency(BundleContext bc, Filter serviceFilter, boolean isMandatory) { + filter = serviceFilter; + this.filterAsString = filter.toString(); + this.isMandatory = isMandatory; + bundleContext = bc; - } + } public boolean matches(ServiceEvent event) { return filter.match(event.getServiceReference()); @@ -66,4 +66,24 @@ public Filter getFilter() { public boolean isMandatory() { return isMandatory; } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + final ServiceDependency that = (ServiceDependency) o; + + if (isMandatory != that.isMandatory) return false; + if (filterAsString != null ? !filterAsString.equals(that.filterAsString) : that.filterAsString != null) + return false; + + return true; + } + + public int hashCode() { + int result; + result = (filterAsString != null ? filterAsString.hashCode() : 0); + result = 29 * result + (isMandatory ? 1 : 0); + return result; + } } From fac86ebd954a810c74e2741aff2e83061c97acb4 Mon Sep 17 00:00:00 2001 From: andypiper Date: Wed, 30 Apr 2008 15:43:38 +0000 Subject: [PATCH 48/53] OSGI-466 --- ...ceReferenceInjectionBeanPostProcessor.java | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceInjectionBeanPostProcessor.java b/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceInjectionBeanPostProcessor.java index 1bfecb0ef..fd2114c7c 100755 --- a/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceInjectionBeanPostProcessor.java +++ b/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceInjectionBeanPostProcessor.java @@ -35,12 +35,14 @@ import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter; +import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.core.annotation.AnnotationUtils; import org.springframework.osgi.context.BundleContextAware; import org.springframework.osgi.service.importer.support.AbstractOsgiServiceImportFactoryBean; import org.springframework.osgi.service.importer.support.CollectionType; import org.springframework.osgi.service.importer.support.OsgiServiceCollectionProxyFactoryBean; import org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean; +import org.springframework.osgi.service.importer.support.Cardinality; import org.springframework.util.ReflectionUtils; /** @@ -93,7 +95,7 @@ public void doWith(Method method) { if (logger.isDebugEnabled()) logger.debug("Processing annotation [" + s + "] for [" + bean.getClass().getName() + "." + method.getName() + "()] on bean [" + beanName + "]"); - method.invoke(bean, getServiceProperty(s, method, beanName)); + method.invoke(bean, getServiceImporter(s, method, beanName).getObject()); } catch (Exception e) { throw new IllegalArgumentException("Error processing service annotation", e); @@ -113,7 +115,15 @@ public PropertyValues postProcessPropertyValues(PropertyValues pvs, PropertyDesc try { if (logger.isDebugEnabled()) logger.debug("Processing annotation [" + s + "] for [" + beanName + "." + pd.getName() + "]"); - newprops.addPropertyValue(pd.getName(), getServiceProperty(s, pd.getWriteMethod(), beanName)); + AbstractOsgiServiceImportFactoryBean importer = getServiceImporter(s, pd.getWriteMethod(), beanName); + // BPPs are created in stageOne(), even though they are run in stageTwo(). This check means that + // the call to getObject() will not fail with ServiceUnavailable. This is safe to do because + // ServiceReferenceDependencyBeanFactoryPostProcessor will ensure that mandatory services are + // satisfied before stageTwo() is run. + if (bean instanceof BeanPostProcessor) { + importer.setCardinality(Cardinality.C_0__1); + } + newprops.addPropertyValue(pd.getName(), importer.getObject()); } catch (Exception e) { throw new FatalBeanException("Could not create service reference", e); @@ -123,7 +133,7 @@ public PropertyValues postProcessPropertyValues(PropertyValues pvs, PropertyDesc return newprops; } - private Object getServiceProperty(ServiceReference s, Method writeMethod, String beanName) throws Exception { + private AbstractOsgiServiceImportFactoryBean getServiceImporter(ServiceReference s, Method writeMethod, String beanName) throws Exception { // Invocations will block here, so although the ApplicationContext is // created nothing will // proceed until all the dependencies are satisfied. @@ -132,10 +142,10 @@ private Object getServiceProperty(ServiceReference s, Method writeMethod, String throw new IllegalArgumentException("Setter for [" + beanName + "] must have only one argument"); } if (Collection.class.isAssignableFrom(params[0])) { - return getServiceProperty(new OsgiServiceCollectionProxyFactoryBean(), s, writeMethod, beanName).getObject(); + return getServiceProperty(new OsgiServiceCollectionProxyFactoryBean(), s, writeMethod, beanName); } else { - return getServiceProperty(new OsgiServiceProxyFactoryBean(), s, writeMethod, beanName).getObject(); + return getServiceProperty(new OsgiServiceProxyFactoryBean(), s, writeMethod, beanName); } } @@ -165,8 +175,8 @@ private AbstractOsgiServiceImportFactoryBean getServicePropertyInternal(Abstract else { pfb.setInterfaces(s.serviceTypes()); } - pfb.setCardinality(s.cardinality().toCardinality()); - pfb.setContextClassLoader(s.contextClassLoader().toImportContextClassLoader()); + pfb.setCardinality(s.cardinality().toCardinality()); + pfb.setContextClassLoader(s.contextClassLoader().toImportContextClassLoader()); pfb.setBundleContext(bundleContext); if (s.serviceBeanName().length() > 0) { pfb.setServiceBeanName(s.serviceBeanName()); From d810c400486efd9769572c64703f7f111b27baaf Mon Sep 17 00:00:00 2001 From: costin_leau Date: Thu, 3 Jul 2008 06:53:42 +0000 Subject: [PATCH 49/53] revert OSGI-466 (it is properly addressed in 1.1.0 branch) --- ...nceDependencyBeanFactoryPostProcessor.java | 146 ------------------ ...ceReferenceInjectionBeanPostProcessor.java | 57 +++---- .../extensions/annotation/AnnotatedBean.java | 19 +-- .../annotation/OsgiServiceAnnotationTest.java | 56 +++---- ...OsgiServiceImportDependencyDefinition.java | 21 --- .../OsgiServiceImportDependencyFactory.java | 23 --- .../internal/ContextLoaderListener.java | 7 - .../startup/DependencyServiceManager.java | 35 +---- .../startup/ServiceDependency.java | 39 +---- .../dependencies/DependentImpl.java | 51 +++--- .../src/main/resources/META-INF/MANIFEST.MF | 3 +- .../META-INF/spring/dependencies.xml | 3 +- .../resources/META-INF/spring/reference.xml | 3 +- 13 files changed, 88 insertions(+), 375 deletions(-) delete mode 100755 annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceDependencyBeanFactoryPostProcessor.java delete mode 100755 core/src/main/java/org/springframework/osgi/service/importer/OsgiServiceImportDependencyDefinition.java delete mode 100755 core/src/main/java/org/springframework/osgi/service/importer/OsgiServiceImportDependencyFactory.java diff --git a/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceDependencyBeanFactoryPostProcessor.java b/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceDependencyBeanFactoryPostProcessor.java deleted file mode 100755 index 458a6dd0a..000000000 --- a/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceDependencyBeanFactoryPostProcessor.java +++ /dev/null @@ -1,146 +0,0 @@ -package org.springframework.osgi.extensions.annotation; - -import java.lang.reflect.Method; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.osgi.framework.Filter; -import org.springframework.beans.BeansException; -import org.springframework.beans.factory.config.BeanDefinition; -import org.springframework.beans.factory.config.BeanFactoryPostProcessor; -import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; -import org.springframework.core.Ordered; -import org.springframework.core.PriorityOrdered; -import org.springframework.core.annotation.AnnotationUtils; -import org.springframework.osgi.service.exporter.OsgiServicePropertiesResolver; -import org.springframework.osgi.service.importer.OsgiServiceImportDependencyDefinition; -import org.springframework.osgi.service.importer.OsgiServiceImportDependencyFactory; -import org.springframework.osgi.util.OsgiFilterUtils; -import org.springframework.util.ObjectUtils; -import org.springframework.util.ReflectionUtils; - -/** - * @author Andy Piper - */ -public class ServiceReferenceDependencyBeanFactoryPostProcessor - implements BeanFactoryPostProcessor, OsgiServiceImportDependencyFactory, PriorityOrdered { - - private HashSet dependencies = new HashSet(); - private int order = Ordered.HIGHEST_PRECEDENCE; - - private static Log logger = LogFactory.getLog(ServiceReferenceDependencyBeanFactoryPostProcessor.class); - - public int getOrder() { - return order; - } - - public void setOrder(int order) { - this.order = order; - } - - public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { - String[] beanDefinitionNames = beanFactory.getBeanDefinitionNames(); - for (String definitionName : beanDefinitionNames) { - BeanDefinition definition = beanFactory.getBeanDefinition(definitionName); - String className = definition.getBeanClassName(); - try { - Class clazz = Class.forName(className, true, beanFactory.getBeanClassLoader()); - dependencies.addAll(getClassServiceDependencies(clazz, definitionName, definition)); - } - catch (ClassNotFoundException cnfe) { - if (logger.isWarnEnabled()) - logger.warn("Could not load class [" + className + "]"); - } - } - if (logger.isDebugEnabled()) - logger.debug("Processing annotations for [" + beanFactory + "] found " + dependencies); - } - - public Set getServiceDependencyDefinitions() { - return dependencies; - } - - protected boolean hasServiceProperty(Class clazz) { - return AnnotationUtils.findAnnotation(clazz, ServiceReference.class) != null; - } - - private Set getClassServiceDependencies(final Class beanClass, final String beanName, - final BeanDefinition definition) { - final HashSet dependencies = new HashSet(); - ReflectionUtils.doWithMethods(beanClass, new ReflectionUtils.MethodCallback() { - - public void doWith(final Method method) { - final ServiceReference s = AnnotationUtils.getAnnotation(method, ServiceReference.class); - if (s != null && method.getParameterTypes().length == 1 - && !Collection.class.isAssignableFrom(method.getParameterTypes()[0]) - // Ignore definitions overriden in the XML config - && !definition.getPropertyValues().contains(getPropertyName(method))) { - try { - if (logger.isDebugEnabled()) - logger.debug("Processing annotation [" + s + "] for [" + beanClass.getName() + "." - + method.getName() + "()] on bean [" + beanName + "]"); - dependencies.add(new OsgiServiceImportDependencyDefinition() { - public Filter getFilter() { - return getUnifiedFilter(s, method, beanName); - } - - public boolean isMandatory() { - return s.cardinality().toCardinality().isMandatory(); - } - - public String toString() { - return beanName + "." + method.getName() + ": " + getFilter() + (isMandatory() ? " (mandatory)" - : " (optional)"); - } - }); - } - catch (Exception e) { - throw new IllegalArgumentException("Error processing service annotation", e); - } - } - } - }); - return dependencies; - } - - private String getPropertyName(Method method) { - String name = method.getName(); - if (name.startsWith("set")) { - return Character.toLowerCase(name.charAt(3)) + name.substring(4); - } - return name; - } - - private Filter getUnifiedFilter(ServiceReference s, Method writeMethod, String beanName) { - String filter; - if (s.serviceTypes() == null || s.serviceTypes().length == 0 - || (s.serviceTypes().length == 1 && s.serviceTypes()[0].equals(ServiceReference.class))) { - Class[] params = writeMethod.getParameterTypes(); - if (params.length != 1) { - throw new IllegalArgumentException("Setter for [" + beanName + "] must have only one argument"); - } - filter = OsgiFilterUtils.unifyFilter(new Class[]{params[0]}, s.filter()); - } - else { - filter = OsgiFilterUtils.unifyFilter(s.serviceTypes(), s.filter()); - } - - if (logger.isTraceEnabled()) - logger.trace("unified classes=[" + filter + "]"); - - // add the serviceBeanName constraint - if (s.serviceBeanName().length() > 0) { - filter = OsgiFilterUtils.unifyFilter( - OsgiServicePropertiesResolver.BEAN_NAME_PROPERTY_KEY, new String[]{s.serviceBeanName()}, filter); - if (logger.isTraceEnabled()) - logger.trace("unified serviceBeanName [" + ObjectUtils.nullSafeToString(s.serviceBeanName()) + "] and filter=[" - + filter + "]"); - } - - // create (which implies validation) the actual filter - return OsgiFilterUtils.createFilter(filter); - } -} diff --git a/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceInjectionBeanPostProcessor.java b/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceInjectionBeanPostProcessor.java index fd2114c7c..b7d46ee60 100755 --- a/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceInjectionBeanPostProcessor.java +++ b/annotation/src/main/java/org/springframework/osgi/extensions/annotation/ServiceReferenceInjectionBeanPostProcessor.java @@ -35,24 +35,22 @@ import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter; -import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.core.annotation.AnnotationUtils; import org.springframework.osgi.context.BundleContextAware; import org.springframework.osgi.service.importer.support.AbstractOsgiServiceImportFactoryBean; import org.springframework.osgi.service.importer.support.CollectionType; import org.springframework.osgi.service.importer.support.OsgiServiceCollectionProxyFactoryBean; import org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean; -import org.springframework.osgi.service.importer.support.Cardinality; import org.springframework.util.ReflectionUtils; /** * BeanPostProcessor that processed annotation to inject * Spring-DM managed OSGi services. - * + * * @author Andy Piper */ public class ServiceReferenceInjectionBeanPostProcessor extends InstantiationAwareBeanPostProcessorAdapter implements - BundleContextAware, BeanFactoryAware, BeanClassLoaderAware { + BundleContextAware, BeanFactoryAware, BeanClassLoaderAware { private BundleContext bundleContext; @@ -70,7 +68,7 @@ public void setBeanClassLoader(ClassLoader classLoader) { /** * process FactoryBean created objects, since these will not have had * services injected. - * + * * @param bean * @param beanName */ @@ -94,8 +92,8 @@ public void doWith(Method method) { try { if (logger.isDebugEnabled()) logger.debug("Processing annotation [" + s + "] for [" + bean.getClass().getName() + "." - + method.getName() + "()] on bean [" + beanName + "]"); - method.invoke(bean, getServiceImporter(s, method, beanName).getObject()); + + method.getName() + "()] on bean [" + beanName + "]"); + method.invoke(bean, getServiceProperty(s, method, beanName)); } catch (Exception e) { throw new IllegalArgumentException("Error processing service annotation", e); @@ -106,7 +104,7 @@ public void doWith(Method method) { } public PropertyValues postProcessPropertyValues(PropertyValues pvs, PropertyDescriptor[] pds, Object bean, - String beanName) throws BeansException { + String beanName) throws BeansException { MutablePropertyValues newprops = new MutablePropertyValues(pvs); for (PropertyDescriptor pd : pds) { @@ -115,15 +113,7 @@ public PropertyValues postProcessPropertyValues(PropertyValues pvs, PropertyDesc try { if (logger.isDebugEnabled()) logger.debug("Processing annotation [" + s + "] for [" + beanName + "." + pd.getName() + "]"); - AbstractOsgiServiceImportFactoryBean importer = getServiceImporter(s, pd.getWriteMethod(), beanName); - // BPPs are created in stageOne(), even though they are run in stageTwo(). This check means that - // the call to getObject() will not fail with ServiceUnavailable. This is safe to do because - // ServiceReferenceDependencyBeanFactoryPostProcessor will ensure that mandatory services are - // satisfied before stageTwo() is run. - if (bean instanceof BeanPostProcessor) { - importer.setCardinality(Cardinality.C_0__1); - } - newprops.addPropertyValue(pd.getName(), importer.getObject()); + newprops.addPropertyValue(pd.getName(), getServiceProperty(s, pd.getWriteMethod(), beanName)); } catch (Exception e) { throw new FatalBeanException("Could not create service reference", e); @@ -133,7 +123,7 @@ public PropertyValues postProcessPropertyValues(PropertyValues pvs, PropertyDesc return newprops; } - private AbstractOsgiServiceImportFactoryBean getServiceImporter(ServiceReference s, Method writeMethod, String beanName) throws Exception { + private Object getServiceProperty(ServiceReference s, Method writeMethod, String beanName) throws Exception { // Invocations will block here, so although the ApplicationContext is // created nothing will // proceed until all the dependencies are satisfied. @@ -142,41 +132,32 @@ private AbstractOsgiServiceImportFactoryBean getServiceImporter(ServiceReference throw new IllegalArgumentException("Setter for [" + beanName + "] must have only one argument"); } if (Collection.class.isAssignableFrom(params[0])) { - return getServiceProperty(new OsgiServiceCollectionProxyFactoryBean(), s, writeMethod, beanName); + return getServiceProperty(new OsgiServiceCollectionProxyFactoryBean(), s, writeMethod, beanName).getObject(); } else { - return getServiceProperty(new OsgiServiceProxyFactoryBean(), s, writeMethod, beanName); + return getServiceProperty(new OsgiServiceProxyFactoryBean(), s, writeMethod, beanName).getObject(); } } - private boolean impliedServiceType(ServiceReference s) { - return (s.serviceTypes() == null || s.serviceTypes().length == 0 - || (s.serviceTypes().length == 1 && s.serviceTypes()[0].equals(ServiceReference.class))); - } - // Package protected for testing private AbstractOsgiServiceImportFactoryBean getServicePropertyInternal(AbstractOsgiServiceImportFactoryBean pfb, - ServiceReference s, Method writeMethod, String beanName) throws Exception { + ServiceReference s, Method writeMethod, String beanName) throws Exception { if (s.filter().length() > 0) { pfb.setFilter(s.filter()); } - if (impliedServiceType(s)) { + if (s.serviceTypes() == null || s.serviceTypes().length == 0 + || (s.serviceTypes().length == 1 && s.serviceTypes()[0].equals(ServiceReference.class))) { Class[] params = writeMethod.getParameterTypes(); if (params.length != 1) { throw new IllegalArgumentException("Setter for [" + beanName + "] must have only one argument"); } - if (Collection.class.isAssignableFrom(params[0])) { - throw new IllegalArgumentException("Cannot infer type for collection-based reference [" + beanName + "]"); - } - else { - pfb.setInterfaces(new Class[]{params[0]}); - } + pfb.setInterfaces(new Class[] { params[0] }); } else { pfb.setInterfaces(s.serviceTypes()); } - pfb.setCardinality(s.cardinality().toCardinality()); - pfb.setContextClassLoader(s.contextClassLoader().toImportContextClassLoader()); + pfb.setCardinality(s.cardinality().toCardinality()); + pfb.setContextClassLoader(s.contextClassLoader().toImportContextClassLoader()); pfb.setBundleContext(bundleContext); if (s.serviceBeanName().length() > 0) { pfb.setServiceBeanName(s.serviceBeanName()); @@ -187,13 +168,13 @@ private AbstractOsgiServiceImportFactoryBean getServicePropertyInternal(Abstract } /* package */AbstractOsgiServiceImportFactoryBean getServiceProperty(OsgiServiceProxyFactoryBean pfb, - ServiceReference s, Method writeMethod, String beanName) throws Exception { + ServiceReference s, Method writeMethod, String beanName) throws Exception { pfb.setTimeout(s.timeout()); return getServicePropertyInternal(pfb, s, writeMethod, beanName); } /* package */AbstractOsgiServiceImportFactoryBean getServiceProperty(OsgiServiceCollectionProxyFactoryBean pfb, - ServiceReference s, Method writeMethod, String beanName) throws Exception { + ServiceReference s, Method writeMethod, String beanName) throws Exception { Class[] params = writeMethod.getParameterTypes(); if (SortedSet.class.isAssignableFrom(params[0])) { pfb.setCollectionType(CollectionType.SORTED_SET); @@ -206,7 +187,7 @@ else if (List.class.isAssignableFrom(params[0])) { } else { throw new IllegalArgumentException("Setter for [" + beanName - + "] does not have a valid Collection type argument"); + + "] does not have a valid Collection type argument"); } return getServicePropertyInternal(pfb, s, writeMethod, beanName); } diff --git a/annotation/src/test/java/org/springframework/osgi/extensions/annotation/AnnotatedBean.java b/annotation/src/test/java/org/springframework/osgi/extensions/annotation/AnnotatedBean.java index eb79574db..dc3f87308 100755 --- a/annotation/src/test/java/org/springframework/osgi/extensions/annotation/AnnotatedBean.java +++ b/annotation/src/test/java/org/springframework/osgi/extensions/annotation/AnnotatedBean.java @@ -38,7 +38,6 @@ public class AnnotatedBean { private AnnotatedBean annotatedBeanTypeWithCardinality0_1; private List annotatedBeanTypeWithCardinality0_N; private SortedSet annotatedBeanTypeWithCardinality1_N; - private SortedSet annotatedBeanErrorTypeWithCardinality1_N; private AnnotatedBean annotatedBeanTypeWithClassLoaderClient; private AnnotatedBean annotatedBeanTypeWithClassLoaderServiceProvider; private AnnotatedBean annotatedBeanTypeWithClassLoaderUmanaged; @@ -115,28 +114,20 @@ public List getAnnotatedBeanTypeWithCardinality0_N() { return annotatedBeanTypeWithCardinality0_N; } - @ServiceReference(cardinality = ServiceReferenceCardinality.C0__N, serviceTypes = AnnotatedBean.class) + @ServiceReference(cardinality = ServiceReferenceCardinality.C0__N) public void setAnnotatedBeanTypeWithCardinality0_N(List annotatedBeanTypeWithCardinality0_N) { this.annotatedBeanTypeWithCardinality0_N = annotatedBeanTypeWithCardinality0_N; } - public SortedSet getAnnotatedBeanErrorTypeWithCardinality1_N() { - return annotatedBeanErrorTypeWithCardinality1_N; + public SortedSet getAnnotatedBeanTypeWithCardinality1_N() { + return annotatedBeanTypeWithCardinality1_N; } @ServiceReference(cardinality = ServiceReferenceCardinality.C1__N) - public void setAnnotatedBeanErrorTypeWithCardinality1_N(SortedSet annotatedBeanTypeWithCardinality1_N) { - this.annotatedBeanErrorTypeWithCardinality1_N = annotatedBeanTypeWithCardinality1_N; + public void setAnnotatedBeanTypeWithCardinality1_N(SortedSet annotatedBeanTypeWithCardinality1_N) { + this.annotatedBeanTypeWithCardinality1_N = annotatedBeanTypeWithCardinality1_N; } - public SortedSet getAnnotatedBeanTypeWithCardinality1_N() { - return annotatedBeanTypeWithCardinality1_N; - } - - @ServiceReference(cardinality = ServiceReferenceCardinality.C1__N, serviceTypes = AnnotatedBean.class) - public void setAnnotatedBeanTypeWithCardinality1_N(SortedSet annotatedBeanTypeWithCardinality1_N) { - this.annotatedBeanTypeWithCardinality1_N = annotatedBeanTypeWithCardinality1_N; - } public AnnotatedBean getAnnotatedBeanTypeWithClassLoaderClient() { return annotatedBeanTypeWithClassLoaderClient; } diff --git a/annotation/src/test/java/org/springframework/osgi/extensions/annotation/OsgiServiceAnnotationTest.java b/annotation/src/test/java/org/springframework/osgi/extensions/annotation/OsgiServiceAnnotationTest.java index d01a68a69..557288720 100644 --- a/annotation/src/test/java/org/springframework/osgi/extensions/annotation/OsgiServiceAnnotationTest.java +++ b/annotation/src/test/java/org/springframework/osgi/extensions/annotation/OsgiServiceAnnotationTest.java @@ -23,6 +23,7 @@ import java.util.SortedSet; import junit.framework.TestCase; + import org.easymock.MockControl; import org.osgi.framework.BundleContext; import org.osgi.framework.Constants; @@ -63,17 +64,18 @@ protected void tearDown() throws Exception { /** * Disabled since it doesn't work as we can't proxy final classes. + * @throws Exception */ public void tstGetServicePropertySetters() throws Exception { OsgiServiceProxyFactoryBean pfb = new OsgiServiceProxyFactoryBean(); - Method setter = AnnotatedBean.class.getMethod("setStringType", new Class[]{String.class}); + Method setter = AnnotatedBean.class.getMethod("setStringType", new Class[] { String.class }); ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); Class[] intfs = (Class[]) getPrivateProperty(pfb, "serviceTypes"); assertEquals(intfs[0], String.class); - setter = AnnotatedBean.class.getMethod("setIntType", new Class[]{Integer.TYPE}); + setter = AnnotatedBean.class.getMethod("setIntType", new Class[] { Integer.TYPE }); ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); pfb = new OsgiServiceProxyFactoryBean(); @@ -86,62 +88,48 @@ public void tstGetServicePropertySetters() throws Exception { public void testGetServicePropertyCardinality() throws Exception { OsgiServiceProxyFactoryBean pfb = new OsgiServiceProxyFactoryBean(); Method setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithCardinality1_1", - new Class[]{AnnotatedBean.class}); + new Class[] { AnnotatedBean.class }); ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); assertTrue(pfb.isMandatory()); setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithCardinality0_1", - new Class[]{AnnotatedBean.class}); + new Class[] { AnnotatedBean.class }); ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); pfb = new OsgiServiceProxyFactoryBean(); processor.getServiceProperty(pfb, ref, setter, null); assertFalse(pfb.isMandatory()); } + // disabled since there are no annotations for multi-injection public void testProperMultiCardinality() throws Exception { OsgiServiceCollectionProxyFactoryBean pfb = new OsgiServiceCollectionProxyFactoryBean(); Method setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithCardinality0_N", - new Class[]{List.class}); + new Class[] { List.class }); ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); assertFalse(pfb.isMandatory()); setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithCardinality1_N", - new Class[]{SortedSet.class}); + new Class[] { SortedSet.class }); ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); pfb = new OsgiServiceCollectionProxyFactoryBean(); processor.getServiceProperty(pfb, ref, setter, null); assertTrue(pfb.isMandatory()); } - public void testErrorMultiCardinality() throws Exception { - OsgiServiceCollectionProxyFactoryBean pfb = new OsgiServiceCollectionProxyFactoryBean(); - - Method setter = AnnotatedBean.class.getMethod("setAnnotatedBeanErrorTypeWithCardinality1_N", - new Class[]{SortedSet.class}); - ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); - pfb = new OsgiServiceCollectionProxyFactoryBean(); - try { - processor.getServiceProperty(pfb, ref, setter, null); - fail("IllegalArgumentException should have been thrown"); - } - catch (Exception e) { - } - } - public void testGetServicePropertyClassloader() throws Exception { OsgiServiceProxyFactoryBean pfb = new OsgiServiceProxyFactoryBean(); Method setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithClassLoaderClient", - new Class[]{AnnotatedBean.class}); + new Class[] { AnnotatedBean.class }); ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); assertEquals(pfb.getContextClassLoader(), ImportContextClassLoader.CLIENT); pfb = new OsgiServiceProxyFactoryBean(); setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithClassLoaderUmanaged", - new Class[]{AnnotatedBean.class}); + new Class[] { AnnotatedBean.class }); ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); @@ -149,7 +137,7 @@ public void testGetServicePropertyClassloader() throws Exception { pfb = new OsgiServiceProxyFactoryBean(); setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithClassLoaderServiceProvider", - new Class[]{AnnotatedBean.class}); + new Class[] { AnnotatedBean.class }); ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); assertEquals(pfb.getContextClassLoader(), ImportContextClassLoader.SERVICE_PROVIDER); @@ -158,7 +146,7 @@ public void testGetServicePropertyClassloader() throws Exception { public void testGetServicePropertyBeanName() throws Exception { OsgiServiceProxyFactoryBean pfb = new OsgiServiceProxyFactoryBean(); Method setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithBeanName", - new Class[]{AnnotatedBean.class}); + new Class[] { AnnotatedBean.class }); ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); String beanName = (String) getPrivateProperty(pfb, "serviceBeanName"); @@ -169,7 +157,7 @@ public void testGetServicePropertyBeanName() throws Exception { public void testGetServicePropertyFilter() throws Exception { OsgiServiceProxyFactoryBean pfb = new OsgiServiceProxyFactoryBean(); Method setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithFilter", - new Class[]{AnnotatedBean.class}); + new Class[] { AnnotatedBean.class }); ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); String filter = (String) getPrivateProperty(pfb, "filter"); @@ -180,7 +168,7 @@ public void testGetServicePropertyFilter() throws Exception { public void testGetServicePropertyServiceClass() throws Exception { OsgiServiceProxyFactoryBean pfb = new OsgiServiceProxyFactoryBean(); Method setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeWithServiceType", - new Class[]{AnnotatedBean.class}); + new Class[] { AnnotatedBean.class }); ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); Class[] intfs = (Class[]) getPrivateProperty(pfb, "interfaces"); @@ -190,7 +178,7 @@ public void testGetServicePropertyServiceClass() throws Exception { public void testGetServicePropertyComplex() throws Exception { OsgiServiceProxyFactoryBean pfb = new OsgiServiceProxyFactoryBean(); Method setter = AnnotatedBean.class.getMethod("setAnnotatedBeanTypeComplex", - new Class[]{AnnotatedBean.class}); + new Class[] { AnnotatedBean.class }); ServiceReference ref = AnnotationUtils.getAnnotation(setter, ServiceReference.class); processor.getServiceProperty(pfb, ref, setter, null); Class[] intfs = (Class[]) getPrivateProperty(pfb, "interfaces"); @@ -316,9 +304,9 @@ else if (clazz.equals(Serializable.class.getName())) { ServiceReferenceInjectionBeanPostProcessor p = new ServiceReferenceInjectionBeanPostProcessor(); p.setBundleContext(context); p.setBeanClassLoader(getClass().getClassLoader()); - PropertyValues pvs = p.postProcessPropertyValues(new MutablePropertyValues(), new PropertyDescriptor[]{ - new PropertyDescriptor("serviceBean", ServiceFactoryBean.class), - new PropertyDescriptor("serializableBean", ServiceFactoryBean.class)}, bean, "myBean"); + PropertyValues pvs = p.postProcessPropertyValues(new MutablePropertyValues(), new PropertyDescriptor[] { + new PropertyDescriptor("serviceBean", ServiceFactoryBean.class), + new PropertyDescriptor("serializableBean", ServiceFactoryBean.class) }, bean, "myBean"); MyService msb = (MyService) pvs.getPropertyValue("serviceBean").getValue(); Serializable ssb = (Serializable) pvs.getPropertyValue("serializableBean").getValue(); @@ -362,9 +350,9 @@ else if (clazz.equals(Serializable.class.getName())) { ServiceReferenceInjectionBeanPostProcessor p = new ServiceReferenceInjectionBeanPostProcessor(); p.setBundleContext(context); p.setBeanClassLoader(getClass().getClassLoader()); - PropertyValues pvs = p.postProcessPropertyValues(new MutablePropertyValues(), new PropertyDescriptor[]{ - new PropertyDescriptor("serviceBean", ServiceBean.class), - new PropertyDescriptor("serializableBean", ServiceBean.class)}, bean, "myBean"); + PropertyValues pvs = p.postProcessPropertyValues(new MutablePropertyValues(), new PropertyDescriptor[] { + new PropertyDescriptor("serviceBean", ServiceBean.class), + new PropertyDescriptor("serializableBean", ServiceBean.class) }, bean, "myBean"); MyService msb = (MyService) pvs.getPropertyValue("serviceBean").getValue(); Serializable ssb = (Serializable) pvs.getPropertyValue("serializableBean").getValue(); diff --git a/core/src/main/java/org/springframework/osgi/service/importer/OsgiServiceImportDependencyDefinition.java b/core/src/main/java/org/springframework/osgi/service/importer/OsgiServiceImportDependencyDefinition.java deleted file mode 100755 index aac51b161..000000000 --- a/core/src/main/java/org/springframework/osgi/service/importer/OsgiServiceImportDependencyDefinition.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.springframework.osgi.service.importer; - -import org.osgi.framework.Filter; - -/** - * Defines a service dependency to be processed by - * {@link org.springframework.osgi.context.DelegatedExecutionOsgiBundleApplicationContext} - * - * @author Andy Piper - */ -public interface OsgiServiceImportDependencyDefinition { - /** - * @return the filter to be used for looking up the required service - */ - Filter getFilter(); - - /** - * @return whether or not this dependency is mandatory - */ - boolean isMandatory(); -} diff --git a/core/src/main/java/org/springframework/osgi/service/importer/OsgiServiceImportDependencyFactory.java b/core/src/main/java/org/springframework/osgi/service/importer/OsgiServiceImportDependencyFactory.java deleted file mode 100755 index 50dffc203..000000000 --- a/core/src/main/java/org/springframework/osgi/service/importer/OsgiServiceImportDependencyFactory.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.springframework.osgi.service.importer; - -import java.util.Set; - -/** - * Interface to be implemented by beans wishing to add to the set of dependencies - * required by the {@link org.springframework.context.ApplicationContext}. The processed beans are used at the same - * time in the (@link ApplicationContext} lifecycle as - * {@link org.springframework.beans.factory.config.BeanFactoryPostProcessor}s, so similar considerations apply - * when using them. - * - * @author Andy Piper - * @see org.springframework.context.ApplicationContext - * @see org.springframework.beans.factory.config.BeanFactoryPostProcessor - */ -public interface OsgiServiceImportDependencyFactory { - /** - * Get service dependencies as defined by the bean to be used in determining startup. - * - * @return a set of OsgiServiceImportDependencyDefinitions - */ - public Set getServiceDependencyDefinitions(); -} diff --git a/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java b/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java index 03e9d6986..5d554cd45 100644 --- a/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java +++ b/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java @@ -212,8 +212,6 @@ protected void handleEvent(BundleEvent event) { private static final String ANNOTATION_BPP_CLASS = "org.springframework.osgi.extensions.annotation.ServiceReferenceInjectionBeanPostProcessor"; - private static final String ANNOTATION_BFPP_CLASS = "org.springframework.osgi.extensions.annotation.ServiceReferenceDependencyBeanFactoryPostProcessor"; - private static final Log log = LogFactory.getLog(ContextLoaderListener.class); // "Spring Application Context Creation Timer" @@ -729,11 +727,6 @@ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) beanFactory.addBeanPostProcessor(annotationBpp); } }); - - Class annotationBfppClass = context.getBundle().loadClass(ANNOTATION_BFPP_CLASS); - - final BeanFactoryPostProcessor annotationBfpp = (BeanFactoryPostProcessor) BeanUtils.instantiateClass(annotationBfppClass); - applicationContext.addBeanFactoryPostProcessor(annotationBfpp); } catch (ClassNotFoundException exception) { log.info("Spring-dm annotation package cannot be found; automatic annotation processing is disabled"); diff --git a/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyServiceManager.java b/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyServiceManager.java index 2f52de900..a8a114c80 100644 --- a/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyServiceManager.java +++ b/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/DependencyServiceManager.java @@ -17,8 +17,6 @@ import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.osgi.context.DelegatedExecutionOsgiBundleApplicationContext; import org.springframework.osgi.service.importer.support.AbstractOsgiServiceImportFactoryBean; -import org.springframework.osgi.service.importer.OsgiServiceImportDependencyFactory; -import org.springframework.osgi.service.importer.OsgiServiceImportDependencyDefinition; import org.springframework.osgi.util.OsgiListenerUtils; import org.springframework.osgi.util.OsgiStringUtils; @@ -130,9 +128,7 @@ private void updateDependencies(ServiceEvent serviceEvent) { case ServiceEvent.MODIFIED: unsatisfiedDependencies.remove(dependency); if (debug) { - log.debug("found service for " + context.getDisplayName() - + "; eliminating " + dependency + ", remaining [" - + unsatisfiedDependencies + "]"); + log.debug("found service; eliminating " + dependency); } break; @@ -200,8 +196,8 @@ protected void findServiceDependencies() { String realBean = beanName.substring(1); - //if (debug) - // log.debug("destroying bean " + realBean + " from context " + beanFactory); + if (debug) + log.debug("destroying bean " + realBean + " from context " + beanFactory); // clean up factory singleton // ((DefaultListableBeanFactory) @@ -214,33 +210,14 @@ protected void findServiceDependencies() { unsatisfiedDependencies.add(dependency); } } - // Add dependencies defined by any OsgiServiceImportDependencyFactorys. - beans = BeanFactoryUtils.beanNamesForTypeIncludingAncestors(beanFactory, - OsgiServiceImportDependencyFactory.class, true, false); - for (int i = 0; i < beans.length; i++) { - String beanName = beans[i]; - OsgiServiceImportDependencyFactory reference = (OsgiServiceImportDependencyFactory) beanFactory.getBean(beanName); - Set depList = reference.getServiceDependencyDefinitions(); - for (Iterator iter = depList.iterator(); iter.hasNext();) { - OsgiServiceImportDependencyDefinition def = (OsgiServiceImportDependencyDefinition)iter.next(); - ServiceDependency dependency = new ServiceDependency(bundleContext, def.getFilter(), - def.isMandatory()); - - dependencies.add(dependency); - if (!dependency.isServicePresent()) { - if (debug) - log.debug("adding OSGi service dependency for filter " + def.getFilter()); - unsatisfiedDependencies.add(dependency); - } - } - } - } + } finally { currentThread.setContextClassLoader(oldTCCL); } log.info(dependencies.size() + " OSGi service dependencies, " + unsatisfiedDependencies.size() - + " unsatisfied ["+ unsatisfiedDependencies + "] for " + context.getDisplayName()); + + " unsatisfied for " + context.getDisplayName()); + } protected boolean isSatisfied() { diff --git a/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/ServiceDependency.java b/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/ServiceDependency.java index 36a7a84c9..8b4a1ca35 100644 --- a/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/ServiceDependency.java +++ b/extender/src/main/java/org/springframework/osgi/extender/internal/dependencies/startup/ServiceDependency.java @@ -18,13 +18,13 @@ import org.osgi.framework.BundleContext; import org.osgi.framework.Filter; import org.osgi.framework.ServiceEvent; -import org.springframework.osgi.service.importer.OsgiServiceImportDependencyDefinition; import org.springframework.osgi.util.OsgiServiceReferenceUtils; /** * @author Costin Leau + * */ -public class ServiceDependency implements OsgiServiceImportDependencyDefinition { +public class ServiceDependency { protected final Filter filter; protected final String filterAsString; @@ -33,13 +33,13 @@ public class ServiceDependency implements OsgiServiceImportDependencyDefinition protected final BundleContext bundleContext; - public ServiceDependency(BundleContext bc, Filter serviceFilter, boolean isMandatory) { - filter = serviceFilter; - this.filterAsString = filter.toString(); - this.isMandatory = isMandatory; - bundleContext = bc; + public ServiceDependency(BundleContext bc, Filter serviceFilter, boolean isMandatory) { + filter = serviceFilter; + this.filterAsString = filter.toString(); + this.isMandatory = isMandatory; + bundleContext = bc; - } + } public boolean matches(ServiceEvent event) { return filter.match(event.getServiceReference()); @@ -63,27 +63,4 @@ public Filter getFilter() { return filter; } - public boolean isMandatory() { - return isMandatory; - } - - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - final ServiceDependency that = (ServiceDependency) o; - - if (isMandatory != that.isMandatory) return false; - if (filterAsString != null ? !filterAsString.equals(that.filterAsString) : that.filterAsString != null) - return false; - - return true; - } - - public int hashCode() { - int result; - result = (filterAsString != null ? filterAsString.hashCode() : 0); - result = 29 * result + (isMandatory ? 1 : 0); - return result; - } } diff --git a/integration-tests/bundles/annotation.dependency.test.bundle/src/main/java/org/springframework/osgi/iandt/annotation/dependencies/DependentImpl.java b/integration-tests/bundles/annotation.dependency.test.bundle/src/main/java/org/springframework/osgi/iandt/annotation/dependencies/DependentImpl.java index b3b608608..4f0eefa65 100644 --- a/integration-tests/bundles/annotation.dependency.test.bundle/src/main/java/org/springframework/osgi/iandt/annotation/dependencies/DependentImpl.java +++ b/integration-tests/bundles/annotation.dependency.test.bundle/src/main/java/org/springframework/osgi/iandt/annotation/dependencies/DependentImpl.java @@ -1,45 +1,44 @@ package org.springframework.osgi.iandt.annotation.dependencies; -import java.util.List; +import java.util.SortedSet; -import org.springframework.osgi.extensions.annotation.ServiceReference; -import org.springframework.osgi.extensions.annotation.ServiceReferenceCardinality; -import org.springframework.osgi.iandt.simpleservice.MyService; import org.springframework.osgi.iandt.simpleservice2.MyService2; +import org.springframework.osgi.iandt.simpleservice.MyService; +import org.springframework.osgi.extensions.annotation.ServiceReference; /** * @author Andy Piper * @author Hal Hildebrand */ public class DependentImpl implements Dependent { - private MyService service1; - private MyService2 service2; - private MyService2 service3; - private List servicecollection; + private MyService service1; + private MyService2 service2; + private MyService2 service3; + private SortedSet servicecollection; - @ServiceReference - public void setService1(MyService service1) { - this.service1 = service1; - } + @ServiceReference + public void setService1(MyService service1) { + this.service1 = service1; + } - public void setService2(MyService2 service2) { - this.service2 = service2; - } - - @ServiceReference(cardinality = ServiceReferenceCardinality.C1__N, serviceTypes = MyService.class) - public void setServiceCollection(List service1) { - this.servicecollection = service1; - } + public void setService2(MyService2 service2) { + this.service2 = service2; + } @ServiceReference - public void setService3(MyService2 service3) { - this.service3 = service3; + public void setServiceCollection(SortedSet service1) { + this.servicecollection = service1; } + @ServiceReference + public void setService3(MyService2 service3) { + this.service3 = service3; + } - public boolean isResolved() { - return service2 != null && service3 != null && service1 != null && servicecollection != null - && servicecollection.size() > 0; - } + + public boolean isResolved() { + return service2 != null && service3 != null && service1 != null && servicecollection != null + && servicecollection.size() > 0; + } } diff --git a/integration-tests/bundles/annotation.dependency.test.bundle/src/main/resources/META-INF/MANIFEST.MF b/integration-tests/bundles/annotation.dependency.test.bundle/src/main/resources/META-INF/MANIFEST.MF index 1e873910d..9918f5cdc 100644 --- a/integration-tests/bundles/annotation.dependency.test.bundle/src/main/resources/META-INF/MANIFEST.MF +++ b/integration-tests/bundles/annotation.dependency.test.bundle/src/main/resources/META-INF/MANIFEST.MF @@ -5,6 +5,5 @@ Bundle-ManifestVersion: 2 Bundle-ClassPath: . Spring-Context: *; eagerly-init-importers:=true Import-Package: org.springframework.osgi.iandt.simpleservice, - org.springframework.osgi.iandt.simpleservice2, - org.springframework.osgi.extensions.annotation + org.springframework.osgi.iandt.simpleservice2 Export-Package: org.springframework.osgi.iandt.annotation.dependencies diff --git a/integration-tests/bundles/annotation.dependency.test.bundle/src/main/resources/META-INF/spring/dependencies.xml b/integration-tests/bundles/annotation.dependency.test.bundle/src/main/resources/META-INF/spring/dependencies.xml index aa99e19dd..24c537bd4 100644 --- a/integration-tests/bundles/annotation.dependency.test.bundle/src/main/resources/META-INF/spring/dependencies.xml +++ b/integration-tests/bundles/annotation.dependency.test.bundle/src/main/resources/META-INF/spring/dependencies.xml @@ -17,6 +17,5 @@ - - + diff --git a/integration-tests/bundles/annotation.test.bundle/src/main/resources/META-INF/spring/reference.xml b/integration-tests/bundles/annotation.test.bundle/src/main/resources/META-INF/spring/reference.xml index 1cfc037ec..fc25f39ab 100644 --- a/integration-tests/bundles/annotation.test.bundle/src/main/resources/META-INF/spring/reference.xml +++ b/integration-tests/bundles/annotation.test.bundle/src/main/resources/META-INF/spring/reference.xml @@ -8,7 +8,6 @@ - - + From 803197602a1c54a5d780d5ccb2752d6ca7421a4e Mon Sep 17 00:00:00 2001 From: costin_leau Date: Thu, 3 Jul 2008 06:54:25 +0000 Subject: [PATCH 50/53] OSGI-534 + fix doc typo + update changelog --- changelog.txt | 2 +- docs/src/docbkx/reference/deployment.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 0606b5cb2..1158a72d4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,7 +2,7 @@ SPRING DYNAMIC MODULES FRAMEWORK CHANGELOG ========================================== http://www.springframework.org/osgi -Changes in version 1.0.3 (2008-0x-xx) +Changes in version 1.0.3 (2008-07-03) ------------------------------------- Package org.springframework.osgi.context diff --git a/docs/src/docbkx/reference/deployment.xml b/docs/src/docbkx/reference/deployment.xml index 303dbabb1..12aaf2a50 100644 --- a/docs/src/docbkx/reference/deployment.xml +++ b/docs/src/docbkx/reference/deployment.xml @@ -151,7 +151,7 @@ context ::= path ( ';' path ) * (';' directive) * For example: - Creates an application context synchronously, using all of the From d4f1b68912a07d0b21c0b1baddd412275d890ca9 Mon Sep 17 00:00:00 2001 From: costin_leau Date: Thu, 3 Jul 2008 08:04:18 +0000 Subject: [PATCH 51/53] 1.0.3 release --- annotation/pom.xml | 2 +- bundle-archetype/pom.xml | 2 +- .../resources/archetype-resources/.classpath | 10 +++++----- .../main/resources/archetype-resources/pom.xml | 2 +- core/.classpath | 2 +- core/pom.xml | 2 +- docs/pom.xml | 2 +- extender/pom.xml | 2 +- .../.classpath | 2 +- .../annotation.dependency.test.bundle/pom.xml | 2 +- .../bundles/annotation.test.bundle/.classpath | 2 +- .../bundles/annotation.test.bundle/pom.xml | 2 +- .../bundles/cardinality.0to1.bundle/pom.xml | 2 +- .../config.bundle/async.nowait.bundle/pom.xml | 2 +- .../config.bundle/async.wait.bundle/pom.xml | 2 +- .../config.bundle/no.publish.bundle/pom.xml | 2 +- .../bundles/config.bundle/pom.xml | 2 +- .../config.bundle/sync.nowait.bundle/pom.xml | 2 +- .../config.bundle/sync.tail.bundle/pom.xml | 2 +- .../config.bundle/sync.wait.bundle/pom.xml | 2 +- .../config.file.with.dots.bundle/pom.xml | 2 +- .../bundles/configuration.test.bundle/pom.xml | 2 +- .../bundles/deadlock.bundle/pom.xml | 2 +- .../bundles/dependency.factory.bundle/pom.xml | 2 +- .../bundles/dependency.test.bundle/pom.xml | 2 +- integration-tests/bundles/error.bundle/pom.xml | 2 +- .../bundles/extender.version.bundle/pom.xml | 2 +- .../bundles/io.fragment.1.bundle/pom.xml | 2 +- .../bundles/io.fragment.2.bundle/pom.xml | 2 +- .../bundles/lifecycle.test.bundle/pom.xml | 2 +- integration-tests/bundles/pom.xml | 2 +- .../bundles/proxy.creator.bundle/pom.xml | 2 +- .../bundles/reference.test.bundle/pom.xml | 2 +- .../bundles/scoped.a.bundle/pom.xml | 2 +- .../bundles/scoped.b.bundle/pom.xml | 2 +- .../bundles/scoped.common.bundle/pom.xml | 2 +- .../bundles/service.listener.bundle/pom.xml | 2 +- .../bundles/simple.service.2.bundle/pom.xml | 2 +- .../bundles/simple.service.3.bundle/pom.xml | 2 +- .../simple.service.bundle.2.identical/pom.xml | 2 +- .../simple.service.bundle.identical/pom.xml | 2 +- .../bundles/simple.service.bundle/pom.xml | 2 +- integration-tests/bundles/tccl.bundle/pom.xml | 2 +- .../bundles/trivial.bundle/pom.xml | 2 +- .../bundles/trivial.test.bundle/pom.xml | 2 +- integration-tests/pom.xml | 2 +- integration-tests/tests-tiger/.classpath | 8 ++++---- integration-tests/tests-tiger/pom.xml | 2 +- integration-tests/tests/.classpath | 18 +++++++++--------- integration-tests/tests/pom.xml | 2 +- io/.classpath | 2 +- io/pom.xml | 2 +- mock/pom.xml | 2 +- pom.xml | 2 +- release/pom.xml | 2 +- .../petclinic.sample.contract/pom.xml | 4 ++-- .../petclinic/petclinic.sample.hsqldb/pom.xml | 4 ++-- .../petclinic/petclinic.sample.jdbc/pom.xml | 4 ++-- .../petclinic/petclinic.sample.mysql/pom.xml | 4 ++-- samples/petclinic/pom.xml | 2 +- samples/pom.xml | 2 +- samples/simple-service/pom.xml | 2 +- .../simple-service-bundle/pom.xml | 2 +- .../simple-service-integration-test/pom.xml | 2 +- samples/weather/pom.xml | 2 +- samples/weather/weather-dao/pom.xml | 2 +- samples/weather/weather-extension/pom.xml | 2 +- .../.classpath | 2 +- .../weather-service-integration-test/pom.xml | 2 +- samples/weather/weather-service-test/pom.xml | 2 +- samples/weather/weather-service/pom.xml | 2 +- samples/weather/wiring-bundle/.classpath | 4 ++-- samples/weather/wiring-bundle/pom.xml | 2 +- test-support/.classpath | 4 ++-- test-support/pom.xml | 2 +- .../osgi/test/internal/boot-bundles.properties | 2 +- 76 files changed, 97 insertions(+), 97 deletions(-) diff --git a/annotation/pom.xml b/annotation/pom.xml index c8040fa0f..7721830d0 100644 --- a/annotation/pom.xml +++ b/annotation/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/bundle-archetype/pom.xml b/bundle-archetype/pom.xml index ed3502aa6..f9a5e26fd 100644 --- a/bundle-archetype/pom.xml +++ b/bundle-archetype/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/bundle-archetype/src/main/resources/archetype-resources/.classpath b/bundle-archetype/src/main/resources/archetype-resources/.classpath index e1e9984cd..867585907 100644 --- a/bundle-archetype/src/main/resources/archetype-resources/.classpath +++ b/bundle-archetype/src/main/resources/archetype-resources/.classpath @@ -16,11 +16,11 @@ - - - - - + + + + + diff --git a/bundle-archetype/src/main/resources/archetype-resources/pom.xml b/bundle-archetype/src/main/resources/archetype-resources/pom.xml index 76e246a41..e1a34ea69 100644 --- a/bundle-archetype/src/main/resources/archetype-resources/pom.xml +++ b/bundle-archetype/src/main/resources/archetype-resources/pom.xml @@ -12,7 +12,7 @@ 1.4.3 2.5.1 - 1.0.3-SNAPSHOT + 1.0.3 3.2.2 diff --git a/core/.classpath b/core/.classpath index 32f7732c9..6ef88ef59 100644 --- a/core/.classpath +++ b/core/.classpath @@ -7,7 +7,7 @@ - + diff --git a/core/pom.xml b/core/pom.xml index e9046cadd..7aee368bd 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/docs/pom.xml b/docs/pom.xml index ebcc468a7..398654724 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -4,7 +4,7 @@ org.springframework.osgi spring-osgi pom - 1.0.3-SNAPSHOT + 1.0.3 Spring OSGi http://www.springframework.org/osgi diff --git a/extender/pom.xml b/extender/pom.xml index eedf38d50..50fa00ab9 100644 --- a/extender/pom.xml +++ b/extender/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/annotation.dependency.test.bundle/.classpath b/integration-tests/bundles/annotation.dependency.test.bundle/.classpath index 3d2ff0069..ea526626b 100644 --- a/integration-tests/bundles/annotation.dependency.test.bundle/.classpath +++ b/integration-tests/bundles/annotation.dependency.test.bundle/.classpath @@ -5,6 +5,6 @@ - + diff --git a/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml b/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml index 11d670ecb..3d782a2c4 100644 --- a/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml +++ b/integration-tests/bundles/annotation.dependency.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/annotation.test.bundle/.classpath b/integration-tests/bundles/annotation.test.bundle/.classpath index ad4103415..60a0c65c4 100644 --- a/integration-tests/bundles/annotation.test.bundle/.classpath +++ b/integration-tests/bundles/annotation.test.bundle/.classpath @@ -5,6 +5,6 @@ - + diff --git a/integration-tests/bundles/annotation.test.bundle/pom.xml b/integration-tests/bundles/annotation.test.bundle/pom.xml index 89eabe550..1ab5062cc 100644 --- a/integration-tests/bundles/annotation.test.bundle/pom.xml +++ b/integration-tests/bundles/annotation.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/cardinality.0to1.bundle/pom.xml b/integration-tests/bundles/cardinality.0to1.bundle/pom.xml index 52e1c6f26..ca60aa2ac 100644 --- a/integration-tests/bundles/cardinality.0to1.bundle/pom.xml +++ b/integration-tests/bundles/cardinality.0to1.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 diff --git a/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml b/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml index 79c73c598..6051daa53 100644 --- a/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/async.nowait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 diff --git a/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml b/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml index e00c983c6..33e8e032e 100644 --- a/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/async.wait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 diff --git a/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml b/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml index 77f845c17..1c6ce8fc7 100644 --- a/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/no.publish.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 diff --git a/integration-tests/bundles/config.bundle/pom.xml b/integration-tests/bundles/config.bundle/pom.xml index 3dc91f5b7..34ddfea5a 100644 --- a/integration-tests/bundles/config.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/pom.xml @@ -3,7 +3,7 @@ org.springframework.osgi spring-osgi-integration-test-bundles - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml b/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml index b690f474f..d06c5db94 100644 --- a/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/sync.nowait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 diff --git a/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml b/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml index b229cfc03..817f9ad9a 100644 --- a/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/sync.tail.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 diff --git a/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml b/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml index 372606a3b..6b2037fa5 100644 --- a/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml +++ b/integration-tests/bundles/config.bundle/sync.wait.bundle/pom.xml @@ -5,7 +5,7 @@ org.springframework.osgi.iandt.config.bundle org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 diff --git a/integration-tests/bundles/config.file.with.dots.bundle/pom.xml b/integration-tests/bundles/config.file.with.dots.bundle/pom.xml index d8490c081..ac19e93d0 100644 --- a/integration-tests/bundles/config.file.with.dots.bundle/pom.xml +++ b/integration-tests/bundles/config.file.with.dots.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/configuration.test.bundle/pom.xml b/integration-tests/bundles/configuration.test.bundle/pom.xml index 3d400dc9b..43ad0e860 100644 --- a/integration-tests/bundles/configuration.test.bundle/pom.xml +++ b/integration-tests/bundles/configuration.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/deadlock.bundle/pom.xml b/integration-tests/bundles/deadlock.bundle/pom.xml index adfcb517e..8c5a1fcf8 100644 --- a/integration-tests/bundles/deadlock.bundle/pom.xml +++ b/integration-tests/bundles/deadlock.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/dependency.factory.bundle/pom.xml b/integration-tests/bundles/dependency.factory.bundle/pom.xml index 31611da4b..ff647c330 100644 --- a/integration-tests/bundles/dependency.factory.bundle/pom.xml +++ b/integration-tests/bundles/dependency.factory.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/dependency.test.bundle/pom.xml b/integration-tests/bundles/dependency.test.bundle/pom.xml index 01900b61f..9693a524c 100644 --- a/integration-tests/bundles/dependency.test.bundle/pom.xml +++ b/integration-tests/bundles/dependency.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/error.bundle/pom.xml b/integration-tests/bundles/error.bundle/pom.xml index 43bc17e42..d041e157d 100644 --- a/integration-tests/bundles/error.bundle/pom.xml +++ b/integration-tests/bundles/error.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/extender.version.bundle/pom.xml b/integration-tests/bundles/extender.version.bundle/pom.xml index a92da8d48..14db27b9e 100644 --- a/integration-tests/bundles/extender.version.bundle/pom.xml +++ b/integration-tests/bundles/extender.version.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/io.fragment.1.bundle/pom.xml b/integration-tests/bundles/io.fragment.1.bundle/pom.xml index 3807b6506..cb0e492fd 100644 --- a/integration-tests/bundles/io.fragment.1.bundle/pom.xml +++ b/integration-tests/bundles/io.fragment.1.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/io.fragment.2.bundle/pom.xml b/integration-tests/bundles/io.fragment.2.bundle/pom.xml index a434fb970..fd0546288 100644 --- a/integration-tests/bundles/io.fragment.2.bundle/pom.xml +++ b/integration-tests/bundles/io.fragment.2.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/lifecycle.test.bundle/pom.xml b/integration-tests/bundles/lifecycle.test.bundle/pom.xml index 85b6043b3..56e62629d 100644 --- a/integration-tests/bundles/lifecycle.test.bundle/pom.xml +++ b/integration-tests/bundles/lifecycle.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/pom.xml b/integration-tests/bundles/pom.xml index 41eb4f87b..edca970bf 100644 --- a/integration-tests/bundles/pom.xml +++ b/integration-tests/bundles/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/proxy.creator.bundle/pom.xml b/integration-tests/bundles/proxy.creator.bundle/pom.xml index 3f1fab3cc..f8aab1fa6 100644 --- a/integration-tests/bundles/proxy.creator.bundle/pom.xml +++ b/integration-tests/bundles/proxy.creator.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 diff --git a/integration-tests/bundles/reference.test.bundle/pom.xml b/integration-tests/bundles/reference.test.bundle/pom.xml index 09203b5c9..1ffc41c30 100644 --- a/integration-tests/bundles/reference.test.bundle/pom.xml +++ b/integration-tests/bundles/reference.test.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/scoped.a.bundle/pom.xml b/integration-tests/bundles/scoped.a.bundle/pom.xml index 3a71db59c..101acd8e5 100644 --- a/integration-tests/bundles/scoped.a.bundle/pom.xml +++ b/integration-tests/bundles/scoped.a.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/scoped.b.bundle/pom.xml b/integration-tests/bundles/scoped.b.bundle/pom.xml index 10b0e410d..8f090bf67 100644 --- a/integration-tests/bundles/scoped.b.bundle/pom.xml +++ b/integration-tests/bundles/scoped.b.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/scoped.common.bundle/pom.xml b/integration-tests/bundles/scoped.common.bundle/pom.xml index 96b335f29..60c71eadc 100644 --- a/integration-tests/bundles/scoped.common.bundle/pom.xml +++ b/integration-tests/bundles/scoped.common.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/service.listener.bundle/pom.xml b/integration-tests/bundles/service.listener.bundle/pom.xml index 369cb71c2..e8916e9a3 100644 --- a/integration-tests/bundles/service.listener.bundle/pom.xml +++ b/integration-tests/bundles/service.listener.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.2.bundle/pom.xml b/integration-tests/bundles/simple.service.2.bundle/pom.xml index 44f4aea0a..901d920d6 100644 --- a/integration-tests/bundles/simple.service.2.bundle/pom.xml +++ b/integration-tests/bundles/simple.service.2.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.3.bundle/pom.xml b/integration-tests/bundles/simple.service.3.bundle/pom.xml index e6514c65f..65788d54b 100644 --- a/integration-tests/bundles/simple.service.3.bundle/pom.xml +++ b/integration-tests/bundles/simple.service.3.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml b/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml index f820c6411..32bb5f5c7 100644 --- a/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml +++ b/integration-tests/bundles/simple.service.bundle.2.identical/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.bundle.identical/pom.xml b/integration-tests/bundles/simple.service.bundle.identical/pom.xml index 80efce6a8..09caaed80 100644 --- a/integration-tests/bundles/simple.service.bundle.identical/pom.xml +++ b/integration-tests/bundles/simple.service.bundle.identical/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/simple.service.bundle/pom.xml b/integration-tests/bundles/simple.service.bundle/pom.xml index e39ce70ab..6d10a7216 100644 --- a/integration-tests/bundles/simple.service.bundle/pom.xml +++ b/integration-tests/bundles/simple.service.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/tccl.bundle/pom.xml b/integration-tests/bundles/tccl.bundle/pom.xml index 4b9362d52..6c1723177 100644 --- a/integration-tests/bundles/tccl.bundle/pom.xml +++ b/integration-tests/bundles/tccl.bundle/pom.xml @@ -5,7 +5,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/trivial.bundle/pom.xml b/integration-tests/bundles/trivial.bundle/pom.xml index 3c39930c7..a6c37aa6b 100644 --- a/integration-tests/bundles/trivial.bundle/pom.xml +++ b/integration-tests/bundles/trivial.bundle/pom.xml @@ -2,7 +2,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/bundles/trivial.test.bundle/pom.xml b/integration-tests/bundles/trivial.test.bundle/pom.xml index 449421536..28f867127 100644 --- a/integration-tests/bundles/trivial.test.bundle/pom.xml +++ b/integration-tests/bundles/trivial.test.bundle/pom.xml @@ -2,7 +2,7 @@ spring-osgi-integration-test-bundles org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index f0f0759b8..0ef0f4523 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/tests-tiger/.classpath b/integration-tests/tests-tiger/.classpath index dadb81bb0..bc93c21ae 100644 --- a/integration-tests/tests-tiger/.classpath +++ b/integration-tests/tests-tiger/.classpath @@ -5,7 +5,7 @@ - + @@ -17,9 +17,9 @@ - - - + + + diff --git a/integration-tests/tests-tiger/pom.xml b/integration-tests/tests-tiger/pom.xml index 4a7a7953b..4e99075d6 100644 --- a/integration-tests/tests-tiger/pom.xml +++ b/integration-tests/tests-tiger/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/integration-tests/tests/.classpath b/integration-tests/tests/.classpath index f219e4448..8543d0cd6 100644 --- a/integration-tests/tests/.classpath +++ b/integration-tests/tests/.classpath @@ -11,16 +11,16 @@ - - - + + + - + - - + + @@ -31,8 +31,8 @@ - - - + + + diff --git a/integration-tests/tests/pom.xml b/integration-tests/tests/pom.xml index 295eef980..8cf513e6e 100644 --- a/integration-tests/tests/pom.xml +++ b/integration-tests/tests/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/io/.classpath b/io/.classpath index 54bcf1b76..54a1b1074 100644 --- a/io/.classpath +++ b/io/.classpath @@ -5,7 +5,7 @@ - + diff --git a/io/pom.xml b/io/pom.xml index 8ae938bba..668613bfd 100644 --- a/io/pom.xml +++ b/io/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/mock/pom.xml b/mock/pom.xml index 0debe160e..361b54f94 100644 --- a/mock/pom.xml +++ b/mock/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/pom.xml b/pom.xml index 6123b0027..ba9e2e813 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.springframework.osgi spring-osgi pom - 1.0.3-SNAPSHOT + 1.0.3 Spring Dynamic Modules http://www.springframework.org/osgi diff --git a/release/pom.xml b/release/pom.xml index 1e49fb803..1f728217e 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -13,7 +13,7 @@ org.springframework.osgi spring-osgi - 1.0.3-SNAPSHOT + 1.0.3 .. diff --git a/samples/petclinic/petclinic.sample.contract/pom.xml b/samples/petclinic/petclinic.sample.contract/pom.xml index 92d7a3c7e..c114bab7b 100644 --- a/samples/petclinic/petclinic.sample.contract/pom.xml +++ b/samples/petclinic/petclinic.sample.contract/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 @@ -11,7 +11,7 @@ contract jar Spring OSGi Samples: Simple Petclinic Contract - 1.0.3-SNAPSHOT + 1.0.3 http://www.springframework.org/osgi diff --git a/samples/petclinic/petclinic.sample.hsqldb/pom.xml b/samples/petclinic/petclinic.sample.hsqldb/pom.xml index 15e67070c..9e9f8dbad 100644 --- a/samples/petclinic/petclinic.sample.hsqldb/pom.xml +++ b/samples/petclinic/petclinic.sample.hsqldb/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 @@ -11,7 +11,7 @@ hsqldb-impl jar Spring OSGi Samples: Simple Petclinic HSQLDB - 1.0.3-SNAPSHOT + 1.0.3 http://www.springframework.org/osgi diff --git a/samples/petclinic/petclinic.sample.jdbc/pom.xml b/samples/petclinic/petclinic.sample.jdbc/pom.xml index b3e2b5f6f..5f6c4deb2 100644 --- a/samples/petclinic/petclinic.sample.jdbc/pom.xml +++ b/samples/petclinic/petclinic.sample.jdbc/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 @@ -11,7 +11,7 @@ jdbc jar Spring OSGi Samples: Simple Petclinic JDBC - 1.0.3-SNAPSHOT + 1.0.3 http://www.springframework.org/osgi diff --git a/samples/petclinic/petclinic.sample.mysql/pom.xml b/samples/petclinic/petclinic.sample.mysql/pom.xml index 1db23af7c..ca36004ec 100644 --- a/samples/petclinic/petclinic.sample.mysql/pom.xml +++ b/samples/petclinic/petclinic.sample.mysql/pom.xml @@ -3,7 +3,7 @@ petclinic org.springframework.osgi.samples - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 @@ -11,7 +11,7 @@ mysql-impl jar Spring OSGi Samples: Simple Petclinic MySQL - 1.0.3-SNAPSHOT + 1.0.3 http://www.springframework.org/osgi diff --git a/samples/petclinic/pom.xml b/samples/petclinic/pom.xml index 30879f207..38350f9b3 100644 --- a/samples/petclinic/pom.xml +++ b/samples/petclinic/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi.samples diff --git a/samples/pom.xml b/samples/pom.xml index 16c6dca25..a46e765c3 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi.samples diff --git a/samples/simple-service/pom.xml b/samples/simple-service/pom.xml index 804ef39f6..14923b21c 100644 --- a/samples/simple-service/pom.xml +++ b/samples/simple-service/pom.xml @@ -3,7 +3,7 @@ samples org.springframework.osgi.samples - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi.samples diff --git a/samples/simple-service/simple-service-bundle/pom.xml b/samples/simple-service/simple-service-bundle/pom.xml index 5bc72d6fb..b95a0830f 100644 --- a/samples/simple-service/simple-service-bundle/pom.xml +++ b/samples/simple-service/simple-service-bundle/pom.xml @@ -2,7 +2,7 @@ simple-service org.springframework.osgi.samples - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi.samples diff --git a/samples/simple-service/simple-service-integration-test/pom.xml b/samples/simple-service/simple-service-integration-test/pom.xml index de9f02328..0176e51b4 100644 --- a/samples/simple-service/simple-service-integration-test/pom.xml +++ b/samples/simple-service/simple-service-integration-test/pom.xml @@ -3,7 +3,7 @@ simple-service org.springframework.osgi.samples - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi.samples diff --git a/samples/weather/pom.xml b/samples/weather/pom.xml index f6ecb95e4..5b7d1401a 100644 --- a/samples/weather/pom.xml +++ b/samples/weather/pom.xml @@ -3,7 +3,7 @@ spring-osgi org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi.samples diff --git a/samples/weather/weather-dao/pom.xml b/samples/weather/weather-dao/pom.xml index 50dea3ee1..71e18ebb3 100755 --- a/samples/weather/weather-dao/pom.xml +++ b/samples/weather/weather-dao/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.3-SNAPSHOT + 1.0.3 org.springframework.osgi.samples weather-dao diff --git a/samples/weather/weather-extension/pom.xml b/samples/weather/weather-extension/pom.xml index dc5d16443..33d1a86e3 100644 --- a/samples/weather/weather-extension/pom.xml +++ b/samples/weather/weather-extension/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.3-SNAPSHOT + 1.0.3 org.springframework.osgi.samples weather-extension diff --git a/samples/weather/weather-service-integration-test/.classpath b/samples/weather/weather-service-integration-test/.classpath index c04a80e52..18af7169b 100644 --- a/samples/weather/weather-service-integration-test/.classpath +++ b/samples/weather/weather-service-integration-test/.classpath @@ -11,6 +11,6 @@ - + diff --git a/samples/weather/weather-service-integration-test/pom.xml b/samples/weather/weather-service-integration-test/pom.xml index 783bfa16e..26610c106 100644 --- a/samples/weather/weather-service-integration-test/pom.xml +++ b/samples/weather/weather-service-integration-test/pom.xml @@ -3,7 +3,7 @@ weather org.springframework.osgi.samples - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi.samples diff --git a/samples/weather/weather-service-test/pom.xml b/samples/weather/weather-service-test/pom.xml index 524487cd7..707e043ce 100755 --- a/samples/weather/weather-service-test/pom.xml +++ b/samples/weather/weather-service-test/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.3-SNAPSHOT + 1.0.3 org.springframework.osgi.samples weather-service-test diff --git a/samples/weather/weather-service/pom.xml b/samples/weather/weather-service/pom.xml index d4abd63b7..6619ad7fe 100755 --- a/samples/weather/weather-service/pom.xml +++ b/samples/weather/weather-service/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.3-SNAPSHOT + 1.0.3 org.springframework.osgi.samples weather-service diff --git a/samples/weather/wiring-bundle/.classpath b/samples/weather/wiring-bundle/.classpath index 471095476..e01b88020 100644 --- a/samples/weather/wiring-bundle/.classpath +++ b/samples/weather/wiring-bundle/.classpath @@ -13,7 +13,7 @@ - - + + diff --git a/samples/weather/wiring-bundle/pom.xml b/samples/weather/wiring-bundle/pom.xml index 8ce845046..af59069e8 100755 --- a/samples/weather/wiring-bundle/pom.xml +++ b/samples/weather/wiring-bundle/pom.xml @@ -4,7 +4,7 @@ weather org.springframework.osgi.samples - 1.0.3-SNAPSHOT + 1.0.3 org.springframework.osgi.samples wiring-bundle diff --git a/test-support/.classpath b/test-support/.classpath index 46e535e6e..a0889533a 100644 --- a/test-support/.classpath +++ b/test-support/.classpath @@ -15,8 +15,8 @@ - - + + diff --git a/test-support/pom.xml b/test-support/pom.xml index e99765023..f90395878 100644 --- a/test-support/pom.xml +++ b/test-support/pom.xml @@ -2,7 +2,7 @@ spring-osgi org.springframework.osgi - 1.0.3-SNAPSHOT + 1.0.3 4.0.0 org.springframework.osgi diff --git a/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties b/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties index 4658ee55c..d70bb7cba 100644 --- a/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties +++ b/test-support/src/main/resources/org/springframework/osgi/test/internal/boot-bundles.properties @@ -26,7 +26,7 @@ ignore.junit.version=3.8.2-SNAPSHOT ignore.log4j.version=1.2.15-SNAPSHOT ignore.spring.version=2.5.1 -ignore.spring.osgi.version=1.0.3-SNAPSHOT +ignore.spring.osgi.version=1.0.3 ignore.slf4j.version=1.4.3 ignore.asm.version=2.2.3-SNAPSHOT From a26bfce3ac6c44410106a52ce3528b6f99d8150f Mon Sep 17 00:00:00 2001 From: costin_leau Date: Thu, 3 Jul 2008 08:59:44 +0000 Subject: [PATCH 52/53] OSGI-560 --- changelog.txt | 3 +++ .../osgi/extender/internal/ContextLoaderListener.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 1158a72d4..483d6b232 100644 --- a/changelog.txt +++ b/changelog.txt @@ -8,6 +8,9 @@ Changes in version 1.0.3 (2008-07-03) Package org.springframework.osgi.context * AbstractDelegatedExecutionApplicationContext rethrows all exceptions occuring during refresh +Package org.springframework.osgi.extender +* fixed reading of system property for enabling global annotation scanning + Package org.springframework.osgi.util * fixed parsing exception in DebugUtils when dealing with version ranges diff --git a/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java b/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java index 5d554cd45..e69780116 100644 --- a/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java +++ b/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java @@ -707,7 +707,7 @@ private void addAnnotationBPP(DelegatedExecutionOsgiBundleApplicationContext app Map config = getExternalConfiguration(); Object setting = config.get(AUTO_ANNOTATION_PROCESSING); - if (setting != null && setting instanceof String && Boolean.getBoolean((String) setting)) { + if (setting != null && setting instanceof String && Boolean.valueOf((String) setting)) { log.info("Enabled automatic Spring-DM annotation processing; [" + AUTO_ANNOTATION_PROCESSING + "=" + setting + "]"); From fedcec1fba29a829aabd7d9b5da9a2e3978b958b Mon Sep 17 00:00:00 2001 From: costin_leau Date: Thu, 3 Jul 2008 09:48:48 +0000 Subject: [PATCH 53/53] OSGI-560 + fix typo --- .../osgi/extender/internal/ContextLoaderListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java b/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java index e69780116..95bd9539d 100644 --- a/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java +++ b/extender/src/main/java/org/springframework/osgi/extender/internal/ContextLoaderListener.java @@ -707,7 +707,7 @@ private void addAnnotationBPP(DelegatedExecutionOsgiBundleApplicationContext app Map config = getExternalConfiguration(); Object setting = config.get(AUTO_ANNOTATION_PROCESSING); - if (setting != null && setting instanceof String && Boolean.valueOf((String) setting)) { + if (setting != null && setting instanceof String && Boolean.valueOf((String) setting).booleanValue()) { log.info("Enabled automatic Spring-DM annotation processing; [" + AUTO_ANNOTATION_PROCESSING + "=" + setting + "]");