Skip to content

Java update#1845

Merged
poorva1209 merged 39 commits intoGRIDAPPSD:developfrom
craigpnnl:java-update
Feb 6, 2026
Merged

Java update#1845
poorva1209 merged 39 commits intoGRIDAPPSD:developfrom
craigpnnl:java-update

Conversation

@craigpnnl
Copy link
Copy Markdown
Contributor

@craigpnnl craigpnnl commented Dec 11, 2025

APPROVE THE FOLLOW FIRST

Note the following are branches to develop. Once there and finally tested before this release, then we can create a release branch everywhere

Next continue on with this one :)

This pull request introduces major updates to the GridAPPS-D build and deployment process, focusing on modernizing the launcher and Docker integration to support Java 21 and streamline development workflows. The most important changes include replacing the legacy BND export with a new Apache Felix-based launcher, updating the Docker build and deployment scripts, and refreshing project configuration for improved consistency and compatibility.

Build and Deployment Modernization

  • Replaced the BND export mechanism with a custom Apache Felix launcher compatible with Java 21, updating the Dockerfile to copy the new launcher and bundle structure instead of the old BND JAR. (Dockerfile, LAUNCHER-README.md) [1] [2]
  • Updated the Docker build process to use the new launcher distribution, including changes to build scripts (build-docker.sh) and removal of legacy Travis CI scripts and configurations. [1] [2] [3] [4]

Project Configuration and Tooling

  • Added a comprehensive .editorconfig file and Eclipse formatter settings to enforce consistent coding styles across the project. (.editorconfig, .settings/eclipse-java-formatter.xml, .settings/org.eclipse.jdt.core.prefs) [1] [2] [3]
  • Updated .project to reflect the new project name, add Gradle/Eclipse nature, and introduce resource filters for common directories. (.project)

Documentation

  • Added a detailed LAUNCHER-README.md explaining the new launcher architecture, build steps, configuration, and troubleshooting for developers and users.

Other Technical Updates

  • Changed the GridAPPS-D base image version in the Dockerfile from :develop to :rc2 for improved stability. (Dockerfile)
  • Improved user creation logic in the Dockerfile to be compatible with the new base image and ensure correct permissions. (Dockerfile)

These changes collectively make the GridAPPS-D project compatible with modern Java versions, simplify deployment, and improve the developer experience.# Description

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

craigpnnl and others added 5 commits November 17, 2025 20:15
- Updated Java compiler options to source and target version 21 in build.bnd and enroute.bnd.
- Removed deprecated dependency on org.apache.felix.dependencymanager.annotation-3.2.0.jar.
- Enhanced repository configurations in repositories.bnd to support new Maven and local repositories.
- Introduced a new launcher script (run-gridappsd.sh) and a Java class (GridAPPSDLauncher.java) to manage the OSGi framework startup.
- Added configuration properties for the Felix framework in a new config.properties file.
- Updated Gradle wrapper to version 8.10 and adjusted settings.gradle for simplified project structure.
- Modified runtime type adapter factory to use updated Gson methods for JSON parsing.
- Cleaned up unnecessary dependencies and improved project structure for better maintainability.
Formatted all Java source files using Eclipse formatter configuration
from GOSS project for consistent code style across the codebase.

Applied using Spotless Gradle plugin with eclipse-java-formatter.xml.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Updated imports from javax.jms to jakarta.jms in ConfigurationManagerComponentTests, GridAppsDataSourcesComponentTests, ProcessManagerComponentTests, and other test files.
- Changed MockitoJUnitRunner import to the new package structure in all relevant test classes.
- Refactored DTOComponentTests to accommodate changes in the RequestSimulation and SimulationConfig classes, including renaming fields and adjusting assertions.
- Modified TestConstants to reflect updated JSON structures for simulation configurations and requests.
- Removed unused SecurityConfig mock from various test classes.
- Temporarily disabled ProvenTimeSeriesDataManagerImpl and ProvenProducer imports in TestManagerComponentTest.
…endencies

- Introduced new Gradle build files for gridappsd-jena and gridappsd-poi to embed all necessary dependencies.
- Created gridappsd-proven build file to wrap Proven dependencies and manage transitive dependencies.
- Updated settings.gradle to include new modules for gridappsd-proven, gridappsd-jena, and gridappsd-poi.
- Modified build.gradle to conditionally apply the BND plugin for specific projects.
- Enhanced collectBundles task to gather newly created wrapper bundles.
- Updated .gitignore to exclude Eclipse/Buildship IDE settings.
- Added BndRunnerPlugin to facilitate the creation of OSGi runners from .bndrun files.
- Updated Maven Central dependencies for GOSS-GridAPPS-D to support Java 21 and Jakarta EE migration.
…ionRequest, ServiceManager, and communication fault handling

- Updated ProcessManagerComponentTests to include placeholder tests for logging and subscription behavior.
- Improved ProcessNewSimulationRequestComponentTests with additional assertions for parsing and error handling.
- Enhanced ServiceManagerTests to verify instantiation and configuration without actual service dependencies.
- Added comprehensive tests for FaultCommand and EventCommand serialization and parsing in TestCommunicationFault.
- Removed commented-out code and unnecessary imports for cleaner test files.
@craigpnnl craigpnnl requested a review from Copilot December 11, 2025 02:32
Copy link
Copy Markdown

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 pull request modernizes the GridAPPS-D platform for Java 21 compatibility, focusing on test file maintenance, code formatting standardization, and cleanup of deprecated APIs. The changes ensure consistent code style, remove obsolete imports and whitespace, update test assertions, and migrate from deprecated Mockito and JMS APIs.

Key changes:

  • Updated test files to use modern Mockito runner (MockitoJUnitRunner instead of deprecated version), added comprehensive Javadoc, and improved test structure
  • Migrated from javax.jms to jakarta.jms namespace
  • Replaced deprecated Java constructors (new Double(), new Integer(), new Long()) with modern factory methods (Double.parseDouble(), Integer.valueOf(), etc.)
  • Removed trailing whitespace and extra blank lines throughout codebase
  • Updated license headers for consistent formatting

Reviewed changes

Copilot reviewed 192 out of 236 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Test files (multiple) Updated Mockito imports, added Javadoc, improved test structure and assertions
TestConstants.java Updated test data constants to reflect new DTO structure (e.g., power_system_configs array)
ProcessEvent.java Migrated to jakarta.jms.Destination, replaced deprecated JsonParser().parse() with JsonParser.parseString()
GridAppsDConstants.java Replaced deprecated wrapper constructors with factory methods
CompareResults.java, HistoricalComparison.java Replaced JsonParser().parse() with JsonParser.parseString()
RunCommandLine.java Replaced deprecated Runtime.exec(String) with ProcessBuilder
Multiple DTO/manager files Removed trailing whitespace, standardized formatting

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

@craigpnnl craigpnnl requested a review from afisher1 December 11, 2025 19:03
…ection scripts

- Created TestManagerInterfaceTests.java to validate the TestManager interface methods and their implementations.
- Added check-api.py script to analyze Java class files for API changes and suggest version bumps based on detected changes.
- Introduced version.py script for managing versioning of GridAPPS-D and GOSS bundles, including commands for showing, releasing, and bumping versions.
- Introduced `format` and `format-check` targets in the Makefile to format Java files using Spotless.
- Disabled the `testOSGi` task for the `gov.pnnl.goss.gridappsd.test` project in `build.gradle` to avoid unnecessary dependencies.
- Added Logback dependencies for OSGi runtime tests in `cnf/ext/central.maven`.
- Updated the version of `org.apache.felix.configadmin` in `cnf/ext/central.maven` and `bnd.bnd` to ensure consistency.
- Refactored comments and formatting in various test classes to improve readability and maintainability.
…imulationManager

- Implemented setter methods for ClientFactory and LogManager in ServiceManagerImpl.
- Added setter methods for ClientFactory, LogManager, AppManager, and SimulationManager in SimulationManagerImpl.
- Introduced setter methods for ClientFactory, LogManager, LogDataManager, DataManager, and SimulationManager in TestManagerImpl.

test: Create GridAppsDTestEnvironment for container-based integration tests

- Added GridAppsDTestEnvironment class to manage Docker Compose environment for integration tests.
- Implemented methods to start and stop Docker containers, check service health, and retrieve service endpoints.

test: Implement container-based simulation tests

- Created SimulationContainerTest to run simulations using Testcontainers.
- Added tests for running simulations, querying platform status, and data queries.

fix: Update SimulationRunIntegrationTest to use new simulation request format

- Modified buildSimulationRequest to use power_system_configs array and simulator_config.
- Updated simulation request handling in tests to align with new request structure.

chore: Add docker_manager.py for managing Docker containers

- Implemented a Python script to manage Docker containers for local development and testing.
- Supports commands for starting, stopping, logging, and checking the status of containers.
…latform log and update WeatherDataConverterTests with comprehensive unit tests for ProvenWeatherToGridlabdWeatherConverter. Enhance OSGi integration with Jersey client initialization in ProvenBundleActivator and JerseyClassLoaderHelper. Update Gradle build configurations and restart script for improved process management and error handling.
…ce installation and management. Enhance Makefile and entrypoint.sh for better Docker control and requirements handling. Update docker-compose.yml and docker_manager.py to support autostart functionality.
…ilt artifacts. Enhance Makefile with docker-shell target for easier container access.
…ogging levels for improved clarity, and remove obsolete local configuration files
…and volume mounts for launcher compatibility
…for faster downloads and enhance time conversion logic in ProvenTimeSeriesDataManagerImpl
refer to propertyfile-security so that it will download the provicder,
updated build.gradle to use the bnd resolution rather than its own.
@poorva1209 poorva1209 merged commit 62f8c1a into GRIDAPPSD:develop Feb 6, 2026
7 of 8 checks 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