Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CI_CD_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The project uses **GitHub Actions** for CI/CD with **SonarCloud** integration fo
**Jobs:**

#### build-and-test
- Runs on Ubuntu with Java 21
- Runs on Ubuntu with Java 25
- Sets up MySQL 8.0 and PostgreSQL 15 services
- Builds all modules
- Runs unit tests for each module separately (authserver temporarily excluded)
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ main, develop ]

env:
JAVA_VERSION: '21'
JAVA_VERSION: '25'
MAVEN_OPTS: -Xmx3072m

jobs:
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
with:
fetch-depth: 0 # Shallow clones should be disabled for better SonarCloud analysis

- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
with:
fetch-depth: 0 # Shallow clones should be disabled for better SonarCloud analysis

- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [opened, synchronize, reopened]

env:
JAVA_VERSION: '21'
JAVA_VERSION: '25'
MAVEN_OPTS: -Xmx3072m

jobs:
Expand All @@ -19,7 +19,7 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
Expand Down
67 changes: 64 additions & 3 deletions .junie/guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
This is a complete monorepo implementation of the NAESB Energy Services Provider Interface (ESPI) 4.0 specification for Green Button energy data standards. The project provides OAuth2-based energy data exchange capabilities between utilities, third-party applications, and consumers.

**Key Technologies:**
- Java 21 (LTS)
- Spring Boot 3.5.0 (Jakarta EE 9+)
- Java 25 (LTS)
- Spring Boot 4.0.0
- Maven 3.9+ multi-module build
- OAuth2 authorization framework
- Green Button energy data standards
Expand Down Expand Up @@ -138,4 +138,65 @@ When working on the project, be aware of the migration status:
- When creating or updating tests, use the Junit `@DisplayName` annotation to provide a human readable name for the test. This will improve the quality of the test report.
- When creating or updating tests, use the Junit `@Nested` annotation to group related tests. This will improve the readability of the test report.
- When investigating test failures of transaction tests, verify the service implementation uses saveAndFlush() to save the entity. This will ensure the entity is saved to the database before the transaction is committed.
- When testing persistence operations with JPA, do not set the id property. The Id property is set by Hibernate when the entity is saved to the database, and should not be set ahead of time.
- When testing persistence operations with JPA, do not set the id property. The Id property is set by Hibernate when the entity is saved to the database, and should not be set ahead of time.

### Spring Boot 4.0 Updates and Deprecations
- The `@MockBean` annotation is deprecated. Use `@MockitoBean` instead.
- The `@SpyBean` annotation is deprecated. Use `@MockitoSpyBean` instead.
- For `@WebMvcTest` the package to import has changed from `org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest` to `org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest`.
- For `@DataJpaTest` the package to import has changed from `org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest` to `org.springframework.boot.data.jpa.test.autoconfigure.DataJpaTest`.
- Using the `@SpringBootTest` annotation will no longer provide any MockMVC support. If you want to use MockMVC in your tests you should now add an `@AutoConfigureMockMvc` annotation to the test class.
- Using the `@SpringBootTest` annotation will no longer provide any WebClient or TestRestTemplate beans. If you want to use a WebTestClient you should now add an `@AutoConfigureWebTestClient` annotation to the test class. If you want to use a TestRestTemplate you should add an `@AutoConfigureTestRestTemplate` annotation to the test class.
- The `@PropertyMapping` annotation has been relocated from the `org.springframework.boot.test.autoconfigure.properties` package to `org.springframework.boot.test.context`.
- The following Maven Dependency has been removed:
```xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
```
- For testing Spring MVC, the following Maven Dependencies is required:
```xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webmvc-test</artifactId>
<scope>test</scope>
</dependency>
```
- For testing Spring Data JPA, the following Maven Dependencies is required:
```xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa-test</artifactId>
<scope>test</scope>
</dependency>
```
- For testing Bean Validation, the following Maven Dependencies is required:
```xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation-test</artifactId>
<scope>test</scope>
</dependency>
```
- The Maven Dependency for TestContainers has changed from:
```xml
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
```
to:
```xml
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
```




33 changes: 16 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Complete monorepo implementation of the NAESB Energy Services Provider Interface
git clone https://github.com/GreenButtonAlliance/OpenESPI-GreenButton-Java.git
cd OpenESPI-GreenButton-Java

# Build all modules (Java 21 + Jakarta EE throughout)
# Build all modules (Java 25 + Jakarta EE throughout)
mvn clean install

# Run Spring Boot 3.5 modules
Expand All @@ -21,26 +21,25 @@ cd openespi-authserver && mvn spring-boot:run

| Module | Description | Java | Jakarta EE | Spring Boot | Status |
|--------|-------------|------|------------|-------------|--------|
| **openespi-common** | Shared domain models, services | 21 ✅ | 9+| 3.5.0 ✅ | **Production** |
| **openespi-datacustodian** | OAuth2 resource server | 21 ✅ | 9+| 3.5.0 ✅ | **Production** |
| **openespi-authserver** | OAuth2 authorization server | 21 ✅ | 9+| 3.5.0 ✅ | **Production** |
| **openespi-thirdparty** | Client application | 21 ✅ | 9+ ✅ | 4.0.6 ⚠️ | **Partial Migration** |
| **openespi-common** | Shared domain models, services | 25 ✅ | 11 | 4.0.1 ✅ | **Production** |
| **openespi-datacustodian** | OAuth2 resource server | 25 ✅ | 11 | 4.0.1 ✅ | **Production** |
| **openespi-authserver** | OAuth2 authorization server | 25 ✅ | 11 | 4.0.1 ✅ | **Production** |
| **openespi-thirdparty** | Client application | 25 ✅ | | 4.0.1 ⚠️ | **Partial Migration** |

## 🏗️ Architecture

```
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Third Party │───▶│ Authorization │───▶│ Data Custodian │
│ (Java 21+Jakarta)│ │ Server (SB 3.5) │ │ Server (SB 3.5) │
│ │ │ (Independent) │ │ │
│(Java 25+Jakarta)│ │ Server (SB 4.0) │ │ Server (SB 4.0) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │
│ │
└──────────────────────────────────────────────┘
┌─────────────────┐
│ OpenESPI Common │
(Spring Boot 3.5)│
│(Spring Boot 4.0)│
└─────────────────┘
```

Expand All @@ -53,30 +52,30 @@ cd openespi-authserver && mvn spring-boot:run
## ✨ Migration Achievements

**All modules now support:**
- ✅ **Java 21** - Modern JVM with performance improvements
- ✅ **Jakarta EE 9+** - Modern enterprise Java APIs
- ✅ **Java 25** - Modern JVM with performance improvements
- ✅ **Jakarta EE 11+** - Modern enterprise Java APIs
- ✅ **Consistent build system** - Maven 3.9+ throughout

**Spring Boot 3.5 modules:**
**Spring Boot 4.0 modules:**
- ✅ **openespi-common** - Foundation library
- ✅ **openespi-datacustodian** - Resource server
- ✅ **openespi-authserver** - Authorization server

**Partially migrated:**
- ⚠️ **openespi-thirdparty** - Java 21 + Jakarta ready, Spring Boot migration in progress
- ⚠️ **openespi-thirdparty** - Java 25 + Jakarta ready, Spring Boot migration in progress

## 🛠️ Development

### All Modules (Recommended)
```bash
# Build everything - all modules are Java 21 compatible
# Build everything - all modules are Java 25 compatible
mvn clean install

# Test specific module
mvn test -pl openespi-datacustodian -am
```

### Spring Boot 3.5 Only
### Spring Boot 4.0 Only
```bash
# Build only fully-migrated modules
mvn clean install -Pspring-boot-only
Expand Down Expand Up @@ -105,13 +104,13 @@ mvn spring-boot:run
The ThirdParty module preserves important migration work from the main branch:

**✅ Completed (from main branch):**
- Java 1.7 → Java 21 upgrade
- Java 1.7 → Java 25 upgrade
- javax.servlet → jakarta.servlet migration
- JSP/JSTL Jakarta compatibility
- Modern Maven toolchain

**📝 Next Steps:**
- Spring Framework → Spring Boot 3.5 migration
- Spring Framework → Spring Boot 4.0 migration
- OAuth2 client modernization
- Configuration externalization

Expand Down Expand Up @@ -299,6 +298,6 @@ Licensed under the Apache License 2.0. See [LICENSE](./LICENSE) for details.

---

**Migration Strategy:** All modules use `main` branches to preserve maximum migration work and ensure Java 21 + Jakarta EE consistency across the ecosystem.
**Migration Strategy:** All modules use `main` branches to preserve maximum migration work and ensure Java 25 + Jakarta EE consistency across the ecosystem.

**Built with ❤️ by the Green Button Alliance community**
Loading
Loading