Skip to content

Commit 1449aa1

Browse files
authored
refactor: remove redundant TestContainers BOM from openespi-common (#45)
* refactor: remove redundant TestContainers BOM from openespi-common Spring Boot 3.5 dependency management already includes TestContainers BOM, making the explicit version declaration redundant. Verified with MySQL and PostgreSQL integration tests - all 21 tests pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]> * fix: add SonarCloud Maven plugin to active plugins section The sonar-maven-plugin was only defined in <pluginManagement> but not in the active <plugins> section, causing CI/CD failures when running mvn sonar:sonar. Maven requires plugins to be in the active <plugins> section to be executable via the prefix:goal syntax. Fixes SonarCloud Analysis and SonarCloud PR Analysis CI/CD failures. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]> * fix: use full Maven coordinates for SonarCloud plugin invocation Maven's plugin prefix resolver doesn't recognize 'sonar' prefix by default. Changed from 'mvn sonar:sonar' to 'mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar' in both CI/CD and PR checks workflows. This ensures the plugin can be resolved without requiring additional Maven settings.xml configuration for plugin groups. Fixes "No plugin found for prefix 'sonar'" CI/CD error. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 parent a866f03 commit 1449aa1

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ jobs:
159159
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
160160
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
161161
run: |
162-
mvn sonar:sonar \
162+
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
163163
-Dsonar.projectKey=GreenButtonAlliance_OpenESPI-GreenButton-Java \
164164
-Dsonar.organization=greenbuttonalliance \
165165
-Dsonar.host.url=https://sonarcloud.io \

.github/workflows/pr-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8989
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
9090
run: |
91-
mvn sonar:sonar \
91+
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
9292
-Dsonar.projectKey=GreenButtonAlliance_OpenESPI-GreenButton-Java \
9393
-Dsonar.organization=greenbuttonalliance \
9494
-Dsonar.host.url=https://sonarcloud.io \

openespi-common/pom.xml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
<!-- Modern Dependencies for Spring Boot 3.5.0 -->
8383
<lombok.version>1.18.34</lombok.version>
8484
<mapstruct.version>1.6.0</mapstruct.version>
85-
<testcontainers.version>1.20.1</testcontainers.version>
8685

8786
<!-- Legacy support for compatibility -->
8887
<commons-lang.version>2.6</commons-lang.version>
@@ -296,20 +295,6 @@
296295
</repository>
297296
</repositories>
298297

299-
<!-- Dependency Management for version consistency -->
300-
<dependencyManagement>
301-
<dependencies>
302-
<!-- Testcontainers BOM for version management -->
303-
<dependency>
304-
<groupId>org.testcontainers</groupId>
305-
<artifactId>testcontainers-bom</artifactId>
306-
<version>${testcontainers.version}</version>
307-
<type>pom</type>
308-
<scope>import</scope>
309-
</dependency>
310-
</dependencies>
311-
</dependencyManagement>
312-
313298
<dependencies>
314299
<!-- Spring Boot Starters for Common Library -->
315300
<dependency>

pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@
142142
</execution>
143143
</executions>
144144
</plugin>
145+
146+
<!-- SonarCloud Maven Plugin -->
147+
<plugin>
148+
<groupId>org.sonarsource.scanner.maven</groupId>
149+
<artifactId>sonar-maven-plugin</artifactId>
150+
</plugin>
145151
</plugins>
146152
</build>
147153
</project>

0 commit comments

Comments
 (0)