-
Notifications
You must be signed in to change notification settings - Fork 24
Make this project compatible with JDK 17 and Spring 7 #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bigmarvin
wants to merge
9
commits into
eclipse-gemini:main
Choose a base branch
from
bigmarvin:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
cb0abec
Add CLAUDE.md with build commands, module architecture, and project g…
bigmarvin 54b4c32
Add Maven wrapper and update CLAUDE.md to use ./mvnw
bigmarvin d3fc1e3
Upgrade project to build and pass unit tests on Java 21
bigmarvin b9492a0
Remove Knopflerfish OSGi platform support
bigmarvin 8936bb1
Migrate from Spring 5 (ServiceMix bundles) to Spring 7 (official arti…
bigmarvin 413283b
Wrap Spring 7 and dependencies as OSGi bundles for integration tests
bigmarvin 46b1700
Upgrade Eclipse Equinox from 3.18.600 to 3.23.100
bigmarvin 4e4c48c
Bump version to 4.0.0.BUILD-SNAPSHOT and update readme
bigmarvin 0ec88ae
fix: validate osgiListener arg and remove unused ignore properties
bigmarvin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| wrapperVersion=3.3.4 | ||
| distributionType=only-script | ||
| distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Project Overview | ||
|
|
||
| Eclipse Gemini Blueprint is the reference implementation of the OSGi Alliance Blueprint Service (OSGi 4.2 Compendium Specification). It integrates Spring Framework with OSGi, enabling Spring-based applications to run inside OSGi containers. Current version: 4.0.0.BUILD-SNAPSHOT, targeting Java 17+ (compiled with source/target 17), Spring 7.0.6, OSGi Core 8.0.0/Compendium 7.0.0. | ||
|
|
||
| ## Build Commands | ||
|
|
||
| ```bash | ||
| # Build and run unit tests (all modules except integration-tests) | ||
| ./mvnw install | ||
|
|
||
| # Integration tests with a specific OSGi framework (run from project root) | ||
| # Must pick one profile: equinox or felix | ||
| ./mvnw clean install -P equinox | ||
| ./mvnw clean install -P felix | ||
|
|
||
| # Run integration tests only (after initial install) | ||
| cd integration-tests && ./mvnw clean install -P equinox | ||
|
|
||
| # Run a single unit test | ||
| ./mvnw test -pl core -Dtest=ClassName | ||
|
|
||
| # Run a single integration test | ||
| cd integration-tests/tests && ./mvnw test -P equinox -Dtest=ClassName | ||
| ``` | ||
|
|
||
| Integration tests fork a fresh JVM per run with a 45-minute timeout. Test bundles and tests must be built together per profile — separating these stages causes OSGi dependency issues. | ||
|
|
||
| ## Module Architecture | ||
|
|
||
| ``` | ||
| mock/ → Mock implementations of OSGi interfaces (BundleContext, ServiceReference, etc.) | ||
| io/ → Resource loading abstractions for OSGi (OsgiBundleResource, ResourcePatternResolver) | ||
| core/ → Main module: application context, service import/export, Blueprint container, | ||
| XML config namespace, ConfigurationAdmin integration | ||
| extender/ → OSGi extender pattern: listens for bundle events and bootstraps Blueprint | ||
| containers for bundles containing Spring/Blueprint configuration | ||
| extensions/ → Proprietary extensions beyond the OSGi Blueprint specification | ||
| test-support/ → JUnit-based framework for running integration tests inside live OSGi containers | ||
| integration-tests/ | ||
| bundles/ → 50+ test bundles exercising various Blueprint scenarios | ||
| tests/ → Integration test runner module | ||
| ``` | ||
|
|
||
| **Dependency flow:** mock → io → core → extender → extensions; test-support depends on core + extender. | ||
|
|
||
| ## Key Architectural Concepts | ||
|
|
||
| - **Service Import/Export** (`core/.../service/`): Proxies that dynamically track OSGi services. Importers create proxies for consumed services; exporters register Spring beans as OSGi services. | ||
| - **Blueprint Container** (`core/.../blueprint/container/`): Implementation of the OSGi Blueprint Container spec — manages component lifecycle, dependency injection, and service binding. | ||
| - **Extender Pattern** (`extender/.../internal/activator/`): The extender bundle watches for other bundles being installed/started and automatically creates Blueprint containers for them. | ||
| - **OSGi-Spring Context Bridge** (`core/.../context/`): Extends Spring's `ApplicationContext` to work within OSGi, handling classloader delegation and bundle-scoped contexts. | ||
|
|
||
| ## OSGi Bundle Configuration | ||
|
|
||
| Each module uses a `bnd.bnd` file (processed by the `bnd-maven-plugin`) to generate OSGi manifest headers (Export-Package, Import-Package, Bundle-Activator, etc.). These are in each module's root directory. | ||
|
|
||
| ## Maven Profiles | ||
|
|
||
| | Profile | Purpose | | ||
| |---------|---------| | ||
| | `equinox` | Run integration tests on Eclipse Equinox | | ||
| | `felix` | Run integration tests on Apache Felix | | ||
| | `security` | Enable Java 2 Security Manager for tests | | ||
| | `clover` | Enable Clover code coverage | | ||
| | `release` | Full release build with GPG signing and docs | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removeApplicationListenercurrently callsAssert.notNull(null, ...), which will always throw and makes it impossible to remove listeners. This should validateosgiListener(or simply delegate without asserting) instead of asserting onnull.