Skip to content

Jdk 22 update#34

Merged
craig8 merged 15 commits intoGridOPTICS:developfrom
craig8:jdk-22-update
Nov 20, 2025
Merged

Jdk 22 update#34
craig8 merged 15 commits intoGridOPTICS:developfrom
craig8:jdk-22-update

Conversation

@craig8
Copy link
Copy Markdown
Contributor

@craig8 craig8 commented Oct 27, 2025

This pull request introduces a comprehensive modernization of the project's development tooling and CI/CD infrastructure. It replaces the legacy Travis CI setup with GitHub Actions workflows for build, test, code quality, security analysis, and release management. Additionally, it formalizes coding style standards and project configuration for consistent development across environments.

Continuous Integration & Delivery:

  • Introduced a multi-stage CI/CD pipeline in .github/workflows/ci.yml to automate testing, integration, and artifact management across multiple Java versions, including scheduled weekly runs and build status reporting.
  • Added a dedicated release workflow in .github/workflows/release.yml for automated artifact creation, changelog generation, and GitHub release publishing when tags are pushed or via manual dispatch.

Code Quality & Security:

  • Implemented code quality checks in .github/workflows/code-quality.yml for style (Checkstyle), formatting (Spotless), static analysis (PMD), and dependency vulnerability scanning (OWASP), with a quality gate job to focus on critical issues.
  • Added CodeQL security analysis workflow in .github/workflows/codeql.yml and a custom CodeQL configuration in .github/codeql/codeql-config.yml for advanced security scanning and reporting. [1] [2]

Project Configuration & Standards:

  • Added .editorconfig to enforce consistent coding styles for all major file types across the project.
  • Added Eclipse and Bndtools project configuration via .project for improved IDE support and build integration.

Legacy Cleanup:

  • Removed the legacy Travis CI configuration file .travis.yml, fully migrating CI to GitHub Actions.

Testing Enhancements:

  • Added a simplified test workflow in .github/workflows/test.yml for quick validation of builds, jar creation, and core functionality.

…lity

- Updated Gradle wrapper to version 8.10 in gradle-wrapper.properties.
- Modified .classpath files to include new source paths and updated JRE container to JavaSE-22.
- Updated bnd.bnd files to reflect new bundle versions and dependencies.
- Created build.gradle files for core, runner, itests, and testutil modules with necessary dependencies for JUnit 5, Mockito, and AssertJ.
- Refactored integration test classes to use JUnit 5 annotations and assertions.
- Updated various bundle versions across the project to SNAPSHOT versions for ongoing development.
- Changed imports in LoginService and LoginTestService to use Jakarta EE packages.
- Enhanced MultiReadHttpServletRequestWrapper to implement ReadListener interface.
- Simplified settings.gradle for better project structure and clarity.
- Updated bundle configurations to remove Felix DM annotations and replace them with OSGi DS annotations.
- Converted various components to use OSGi DS, including ClientServiceFactory, ExceptionLookup, and multiple security-related classes.
- Removed the Activator classes that were previously used for Felix DM and added service properties for OSGi DS.
- Adjusted service dependencies to use @reference annotations with appropriate cardinality and policies.
- Cleaned up code by removing unnecessary comments and unused imports.
- Deleted the PooledSqlServiceFactory class as part of the migration effort.
- Updated settings.gradle to note the need for Felix DM migration in integration tests.
@craig8 craig8 requested review from Copilot and poorva1209 October 27, 2025 18:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR comprehensively modernizes the GOSS project's development tooling, CI/CD infrastructure, and codebase for JDK 22 compatibility. The changes replace Travis CI with GitHub Actions workflows, migrate from Felix Dependency Manager to OSGi Declarative Services, update all dependencies to JDK 22-compatible versions, and establish comprehensive code quality standards.

Key Changes:

  • Migrated CI/CD from Travis CI to GitHub Actions with multi-stage pipelines for testing, code quality, security analysis, and releases
  • Updated project to JDK 22 with modernized dependencies (Spring 6.x, Shiro 1.13.x, Jackson 2.17.x, SLF4J 2.x)
  • Migrated from Felix Dependency Manager annotations to OSGi Declarative Services (@Component, @Reference)

Reviewed Changes

Copilot reviewed 99 out of 102 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
settings.gradle Simplified build configuration for JDK 22 compatibility, removed complex BND workspace initialization
pnnl.goss.core/test/.../HandlerRegistryImplTest.java Modernized test with JUnit 5, AssertJ, and added test for exception handling bug
pnnl.goss.core/src/.../*.java Updated OSGi annotations from Felix DM to Declarative Services across all components
pnnl.goss.core/src/.../MultiReadHttpServletRequestWrapper.java Added missing Servlet 3.1 API methods (isFinished, isReady, setReadListener)
pnnl.goss.core/src/.../Login*.java Migrated JAX-RS imports from javax to jakarta namespace
pnnl.goss.core/**/*.bnd Updated bundle versions to SNAPSHOT and modernized dependency specifications
pnnl.goss.core.testutil/src/.../CoreConfigSteps.java Replaced Amdatu testing framework with standard Map-based configuration utilities
pnnl.goss.core.runner/src/.../GossSimpleRunner.java Added new simplified runner without OSGi complexity
pnnl.goss.core.runner/**/*.bndrun Updated OSGi runtime requirements and removed Felix DM dependencies
pnnl.goss.core.itests/src/.../*.java Replaced legacy integration tests with modern JUnit 5-based tests
gradle.properties, cnf/** Updated Gradle wrapper to 8.10, BND to 7.1.0, and Maven Central repository configuration
README.md, QUICK-START.md, etc. Added comprehensive documentation for JDK 22 migration, development setup, and production deployment
.github/workflows/** Added complete CI/CD pipeline with build, test, code quality, security, and release workflows
.editorconfig, config/** Added coding standards configuration for Checkstyle, PMD, and OWASP dependency checking

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pnnl.goss.core/src/pnnl/goss/core/server/web/Hello.java Outdated
Comment thread pnnl.goss.core/src/pnnl/goss/core/server/web/Default.java Outdated
Comment thread settings.gradle Outdated
craig8 and others added 5 commits October 27, 2025 11:41
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…tency

- Updated HelloService.java to enhance code formatting and maintain consistency in comments.
- Refactored LoggedInFilter.java to improve readability and streamline token retrieval logic.
- Cleaned up LoginService.java and LoginTestService.java for better formatting and consistency.
- Enhanced MultiReadHttpServletRequestWrapper.java to improve readability and maintainability.
- Simplified XDomainFilter.java by improving formatting and consistency in method implementations.
- Refactored DataSourceObjectImpl.java and DataSourceRegistryImpl.java for better readability and consistency in logging.
- Improved HandlerRegistryImpl.java by enhancing code structure and readability.
- Updated PooledBasicDataSourceBuilderImpl.java to improve code clarity and maintainability.
- Enhanced HandlerRegistryImplTest.java for better readability and consistency in test structure.
…aintainability

- Updated LoginTestService to improve code formatting and structure.
- Refactored MultiReadHttpServletRequestWrapper for better clarity and consistency.
- Enhanced XDomainFilter for clearer CORS handling.
- Improved DataSourceObjectImpl and DataSourceRegistryImpl for better logging and structure.
- Refactored HandlerRegistryImpl to streamline request handling and improve readability.
- Updated PooledBasicDataSourceBuilderImpl for better property management and logging.
- Enhanced HandlerRegistryImplTest to improve test clarity and structure.
Copy link
Copy Markdown

@afisher1 afisher1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been testing the vscode setup. Everything seems to work. Task Build GOSS is successful. Task Run Tests I'm unsure about as on test seems to be taking an awful long time to run. See below.

  • Executing task: ./gradlew check

Configure project :
Building pnnl.goss.core with Java 22.0.2 (target: 22)
Building pnnl.goss.core.itests with Java 22.0.2 (target: 22)
Building pnnl.goss.core.runner with Java 22.0.2 (target: 22)
Building pnnl.goss.core.testutil with Java 22.0.2 (target: 22)
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended

Task :pnnl.goss.core:test

HandlerRegistryImplTest > Should successfully add and retrieve request handler PASSED

HandlerRegistryImplTest > Should successfully add and retrieve upload handler PASSED

HandlerRegistryImplTest > Should throw exception when handler not found PASSED
! could not resolve the bundles: [pnnl.goss.core.itests-2.0.2.SNAPSHOT org.osgi.framework.BundleException: Unable to resolve pnnl.goss.core.itests [1](R 1.0): missing requirement [pnnl.goss.core.itests [1](R 1.0)] osgi.wiring.package; (&(osgi.wiring.package=javax.jms)(version>=2.0.0)(!(version>=3.0.0))) Unresolved requirements: [[pnnl.goss.core.itests [1](R 1.0)] osgi.wiring.package; (&(osgi.wiring.package=javax.jms)(version>=2.0.0)(!(version>=3.0.0)))]
, biz.aQute.tester-6.4.0.202211291949 org.osgi.framework.BundleException: Unable to resolve biz.aQute.tester [2](R 2.0): missing requirement [biz.aQute.tester [2](R 2.0)] osgi.wiring.package; (&(osgi.wiring.package=junit.framework)(version>=3.8.0)(!(version>=5.0.0))) Unresolved requirements: [[biz.aQute.tester [2](R 2.0)] osgi.wiring.package; (&(osgi.wiring.package=junit.framework)(version>=3.8.0)(!(version>=5.0.0)))]
]
! Failed to start bundle pnnl.goss.core.itests-2.0.2.SNAPSHOT, exception Unable to resolve pnnl.goss.core.itests [1](R 1.0): missing requirement [pnnl.goss.core.itests [1](R 1.0)] osgi.wiring.package; (&(osgi.wiring.package=javax.jms)(version>=2.0.0)(!(version>=3.0.0))) Unresolved requirements: [[pnnl.goss.core.itests [1](R 1.0)] osgi.wiring.package; (&(osgi.wiring.package=javax.jms)(version>=2.0.0)(!(version>=3.0.0)))]
org.osgi.framework.BundleException: Unable to resolve pnnl.goss.core.itests [1](R 1.0): missing requirement [pnnl.goss.core.itests [1](R 1.0)] osgi.wiring.package; (&(osgi.wiring.package=javax.jms)(version>=2.0.0)(!(version>=3.0.0))) Unresolved requirements: [[pnnl.goss.core.itests [1](R 1.0)] osgi.wiring.package; (&(osgi.wiring.package=javax.jms)(version>=2.0.0)(!(version>=3.0.0)))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4398)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:1006)
at aQute.launcher.Launcher.start(Launcher.java:699)
at aQute.launcher.Launcher.startBundles(Launcher.java:679)
at aQute.launcher.Launcher.activate(Launcher.java:585)
at aQute.launcher.Launcher.launch(Launcher.java:404)
at aQute.launcher.Launcher.run(Launcher.java:186)
at aQute.launcher.Launcher.main(Launcher.java:162)
at aQute.launcher.pre.EmbeddedLauncher.executeWithRunPath(EmbeddedLauncher.java:170)
at aQute.launcher.pre.EmbeddedLauncher.findAndExecute(EmbeddedLauncher.java:135)
at aQute.launcher.pre.EmbeddedLauncher.main(EmbeddedLauncher.java:52)
! Failed to start bundle biz.aQute.tester-6.4.0.202211291949, exception Unable to resolve biz.aQute.tester [2](R 2.0): missing requirement [biz.aQute.tester [2](R 2.0)] osgi.wiring.package; (&(osgi.wiring.package=junit.framework)(version>=3.8.0)(!(version>=5.0.0))) Unresolved requirements: [[biz.aQute.tester [2](R 2.0)] osgi.wiring.package; (&(osgi.wiring.package=junit.framework)(version>=3.8.0)(!(version>=5.0.0)))]
org.osgi.framework.BundleException: Unable to resolve biz.aQute.tester [2](R 2.0): missing requirement [biz.aQute.tester [2](R 2.0)] osgi.wiring.package; (&(osgi.wiring.package=junit.framework)(version>=3.8.0)(!(version>=5.0.0))) Unresolved requirements: [[biz.aQute.tester [2](R 2.0)] osgi.wiring.package; (&(osgi.wiring.package=junit.framework)(version>=3.8.0)(!(version>=5.0.0)))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4398)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:1006)
at aQute.launcher.Launcher.start(Launcher.java:699)
at aQute.launcher.Launcher.startBundles(Launcher.java:679)
at aQute.launcher.Launcher.activate(Launcher.java:585)
at aQute.launcher.Launcher.launch(Launcher.java:404)
at aQute.launcher.Launcher.run(Launcher.java:186)
at aQute.launcher.Launcher.main(Launcher.java:162)
at aQute.launcher.pre.EmbeddedLauncher.executeWithRunPath(EmbeddedLauncher.java:170)
at aQute.launcher.pre.EmbeddedLauncher.findAndExecute(EmbeddedLauncher.java:135)
at aQute.launcher.pre.EmbeddedLauncher.main(EmbeddedLauncher.java:52)
<========-----> 62% EXECUTING [6m 3s]

:pnnl.goss.core.itests:testOSGi
IDLE

@afisher1
Copy link
Copy Markdown

disregard previous review comment. testOSGI has this same issue in the develop branch.

This change downgrades the project from JDK 22 to JDK 21 (LTS) for better
long-term support and compatibility. JDK 21 is the latest LTS release and
provides more stable support for production environments.

Changes:
- Update Gradle build configuration to target Java 21
- Update all .bnd files to use JavaSE-21 execution environment
- Update documentation to reflect JDK 21 requirements
- Update installation instructions across all documentation
- Maintain all dependency versions (they support both JDK 21 and 22)

Build and Runtime:
- Project builds successfully with OpenJDK 21.0.8
- All executable JARs run correctly with JDK 21
- Integration tests have existing OSGi classpath issues (not related to JDK version)

Documentation Updates:
- README.md: Updated JDK requirements and installation instructions
- DEVELOPER-SETUP.md: Updated IDE setup for JDK 21
- PRODUCTION-DEPLOYMENT.md: Updated deployment requirements for JDK 21
- QUICK-START.md: Updated quick start guide for JDK 21
- docs/README.md: Updated runtime requirements

The project now uses JDK 21 LTS, providing a stable foundation for both
development and production deployments while maintaining all modern Java
features and performance improvements.
- Created OSGiIntegrationTest.java to test OSGi environment detection, service lookup, configuration updates, and service registration.
- Implemented TestRunner.java for executing tests from the command line.
- Updated bnd.bnd files to include necessary dependencies for JUnit and Jakarta JMS.
- Added ClientServerTest.java to test ActiveMQ broker functionality with OpenWire and STOMP protocols.
- Refactored existing code to replace javax.jms imports with jakarta.jms for compatibility with Jakarta EE.
- Updated GossClient.java to streamline message handling for both OpenWire and STOMP protocols.
- Enhanced server implementation classes to utilize Jakarta JMS imports.
- Removed the old TestRunner.java file and replaced it with a new implementation.
- Added comprehensive integration tests for GOSS functionality, including BasicConnectionTest, CoreFunctionalityTest, GossEndToEndTest, GossOSGiEndToEndTest, and OSGiIntegrationTest.
- Updated .classpath to include test source directories and dependencies.
- Modified goss-core.bndrun to use JavaSE-21 and updated run bundles.
- Updated bnd.bnd and goss-client.bnd to change dependency versions for Apache Shiro and other libraries.
- Added a new META-INF/MANIFEST.MF file for JAXB implementation.
- Enhanced test coverage for client-server communication, including publish/subscribe patterns and multiple protocol support.
- Implemented service registration and configuration updates for OSGi environment tests.
@craig8 craig8 merged commit 7ff9f7d into GridOPTICS:develop Nov 20, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants