Java update#1845
Merged
poorva1209 merged 39 commits intoGRIDAPPSD:developfrom Feb 6, 2026
Merged
Conversation
- 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.
There was a problem hiding this comment.
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 (
MockitoJUnitRunnerinstead of deprecated version), added comprehensive Javadoc, and improved test structure - Migrated from
javax.jmstojakarta.jmsnamespace - 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.
…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.
…onnections lazily
…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.
…leaner configuration
…upport and new simulation tests
…ppers with updated settings
…and ensure task dependencies
…egration and logging
…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
…ice instance handling in ServiceManagerImpl
… handling for simulation inputs and outputs
…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.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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
Dockerfile,LAUNCHER-README.md) [1] [2]build-docker.sh) and removal of legacy Travis CI scripts and configurations. [1] [2] [3] [4]Project Configuration and Tooling
.editorconfigfile 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].projectto reflect the new project name, add Gradle/Eclipse nature, and introduce resource filters for common directories. (.project)Documentation
LAUNCHER-README.mdexplaining the new launcher architecture, build steps, configuration, and troubleshooting for developers and users.Other Technical Updates
:developto:rc2for improved stability. (Dockerfile)Dockerfile)These changes collectively make the GridAPPS-D project compatible with modern Java versions, simplify deployment, and improve the developer experience.# Description