|
54 | 54 | </issueManagement> |
55 | 55 |
|
56 | 56 | <properties> |
57 | | - <maven.compiler.release>17</maven.compiler.release> |
58 | | - <maven.compiler.source>17</maven.compiler.source> |
59 | | - <maven.compiler.target>17</maven.compiler.target> |
| 57 | + <!-- |
| 58 | + Java 21 minimum: sonarlint-analysis-engine 11.3.0.85510 (LTA 2026.1) |
| 59 | + ships class files at major version 65 (Java 21). Compiling against |
| 60 | + it requires a JDK 21+ toolchain. CI's setup-java step is pinned to |
| 61 | + 21 in .github/workflows/*.yml to match. |
| 62 | + --> |
| 63 | + <maven.compiler.release>21</maven.compiler.release> |
| 64 | + <maven.compiler.source>21</maven.compiler.source> |
| 65 | + <maven.compiler.target>21</maven.compiler.target> |
60 | 66 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
61 | 67 |
|
62 | 68 | <jackson.version>2.17.2</jackson.version> |
63 | 69 | <junit.version>5.10.2</junit.version> |
64 | | - <sonarlint.engine.version>10.24.0.81415</sonarlint.engine.version> |
| 70 | + <!-- |
| 71 | + These versions track SonarQube Server 2026.1 LTA (released 2025-12-11). |
| 72 | +
|
| 73 | + To upgrade to a future LTA: |
| 74 | + 1. Look up the new LTA's bundled analyzer versions in the release |
| 75 | + notes at https://docs.sonarsource.com/sonarqube-server/<v>/setup-and-upgrade/release-upgrade-notes/ |
| 76 | + 2. Bump all 11 version properties below. |
| 77 | + 3. Run `mvn clean test` — the daemon test suite is the canary. |
| 78 | + 4. If a NEW required host bean appears (NoSuchBeanDefinitionException |
| 79 | + on a type other than AnalysisWarnings), add an @SonarLintSide no-op |
| 80 | + class in src/main/java/.../hostplugin/ and one context.addExtension(...) |
| 81 | + line in SonarPredictHostPlugin.define(). See spec §7.2 for details. |
| 82 | + --> |
| 83 | + <sonarlint.engine.version>11.3.0.85510</sonarlint.engine.version> |
65 | 84 | <picocli.version>4.7.7</picocli.version> |
66 | 85 |
|
67 | 86 | <!-- |
68 | 87 | The 10 SonarSource analyzer plugins — the runtime assets the daemon |
69 | 88 | loads. Single source of truth for the maven-dependency-plugin copy |
70 | 89 | executions below, which fetch them through Maven (so settings.xml |
71 | | - mirrors / Nexus / proxy apply). Versions match engine 10.24.0.81415. |
| 90 | + mirrors / Nexus / proxy apply). Versions match engine 11.3.0.85510 (LTA 2026.1). |
72 | 91 | --> |
73 | | - <sonar.plugin.java.version>8.15.0.39343</sonar.plugin.java.version> |
74 | | - <sonar.plugin.python.version>5.5.0.23291</sonar.plugin.python.version> |
75 | | - <sonar.plugin.javascript.version>10.24.0.33043</sonar.plugin.javascript.version> |
76 | | - <sonar.plugin.php.version>3.46.0.13151</sonar.plugin.php.version> |
77 | | - <sonar.plugin.kotlin.version>3.2.0.7239</sonar.plugin.kotlin.version> |
| 92 | + <sonar.plugin.java.version>8.29.0.43460</sonar.plugin.java.version> |
| 93 | + <sonar.plugin.python.version>5.22.0.33216</sonar.plugin.python.version> |
| 94 | + <sonar.plugin.javascript.version>12.5.0.41048</sonar.plugin.javascript.version> |
| 95 | + <sonar.plugin.php.version>3.57.0.15976</sonar.plugin.php.version> |
| 96 | + <sonar.plugin.kotlin.version>3.6.0.9326</sonar.plugin.kotlin.version> |
78 | 97 | <sonar.plugin.go.version>1.18.1.827</sonar.plugin.go.version> |
79 | | - <sonar.plugin.ruby.version>1.19.0.471</sonar.plugin.ruby.version> |
80 | | - <sonar.plugin.scala.version>1.19.0.484</sonar.plugin.scala.version> |
81 | | - <sonar.plugin.html.version>3.19.0.5695</sonar.plugin.html.version> |
82 | | - <sonar.plugin.xml.version>2.13.0.5938</sonar.plugin.xml.version> |
| 98 | + <sonar.plugin.ruby.version>1.22.0.1992</sonar.plugin.ruby.version> |
| 99 | + <sonar.plugin.scala.version>1.23.0.2394</sonar.plugin.scala.version> |
| 100 | + <sonar.plugin.html.version>3.27.0.7699</sonar.plugin.html.version> |
| 101 | + <sonar.plugin.xml.version>2.17.0.7895</sonar.plugin.xml.version> |
83 | 102 | </properties> |
84 | 103 |
|
85 | 104 | <dependencyManagement> |
|
129 | 148 | <artifactId>junit-jupiter</artifactId> |
130 | 149 | <scope>test</scope> |
131 | 150 | </dependency> |
| 151 | + <dependency> |
| 152 | + <groupId>org.assertj</groupId> |
| 153 | + <artifactId>assertj-core</artifactId> |
| 154 | + <version>3.27.7</version> |
| 155 | + <scope>test</scope> |
| 156 | + </dependency> |
| 157 | + <dependency> |
| 158 | + <groupId>org.mockito</groupId> |
| 159 | + <artifactId>mockito-core</artifactId> |
| 160 | + <version>5.15.2</version> |
| 161 | + <scope>test</scope> |
| 162 | + </dependency> |
132 | 163 | </dependencies> |
133 | 164 |
|
134 | 165 | <build> |
|
178 | 209 | <phase>process-classes</phase> |
179 | 210 | <goals><goal>jar</goal></goals> |
180 | 211 | </execution> |
| 212 | + <execution> |
| 213 | + <id>host-plugin-jar</id> |
| 214 | + <phase>process-test-classes</phase> |
| 215 | + <goals><goal>jar</goal></goals> |
| 216 | + <configuration> |
| 217 | + <classifier>host</classifier> |
| 218 | + <includes> |
| 219 | + <include>io/github/randomcodespace/sonarpredict/hostplugin/**</include> |
| 220 | + </includes> |
| 221 | + <archive> |
| 222 | + <manifestEntries> |
| 223 | + <Plugin-Class>io.github.randomcodespace.sonarpredict.hostplugin.SonarPredictHostPlugin</Plugin-Class> |
| 224 | + <Plugin-Key>sonarpredict-host</Plugin-Key> |
| 225 | + <Plugin-Name>Sonar Predictor Host</Plugin-Name> |
| 226 | + <Plugin-Version>${project.version}</Plugin-Version> |
| 227 | + <Sonar-Version>9.9</Sonar-Version> |
| 228 | + <SonarLint-Supported>true</SonarLint-Supported> |
| 229 | + </manifestEntries> |
| 230 | + </archive> |
| 231 | + </configuration> |
| 232 | + </execution> |
181 | 233 | </executions> |
182 | 234 | </plugin> |
183 | 235 |
|
|
348 | 400 | </executions> |
349 | 401 | </plugin> |
350 | 402 |
|
| 403 | + <!-- |
| 404 | + Copy the host plugin jar into the dev plugins/ directory so |
| 405 | + that AnalysisService (no-arg constructor → plugins/) and |
| 406 | + PluginRuntime.loadAll pick it up during mvn test. |
| 407 | +
|
| 408 | + The host-plugin-jar jar-plugin execution (process-test-classes) |
| 409 | + produces target/sonar-predictor-${project.version}-host.jar. |
| 410 | + This antrun execution binds to the SAME phase so it runs |
| 411 | + immediately after the jar is written. |
| 412 | +
|
| 413 | + The file is gitignored (plugins/*.jar). In production the host |
| 414 | + jar ships inside the dist zip's plugins/ directory via the |
| 415 | + assembly descriptor, so no separate production step is needed. |
| 416 | + --> |
| 417 | + <plugin> |
| 418 | + <groupId>org.apache.maven.plugins</groupId> |
| 419 | + <artifactId>maven-antrun-plugin</artifactId> |
| 420 | + <version>3.1.0</version> |
| 421 | + <executions> |
| 422 | + <execution> |
| 423 | + <id>copy-host-plugin-for-tests</id> |
| 424 | + <phase>process-test-classes</phase> |
| 425 | + <goals><goal>run</goal></goals> |
| 426 | + <configuration> |
| 427 | + <target> |
| 428 | + <copy todir="${project.basedir}/plugins" overwrite="true"> |
| 429 | + <fileset dir="${project.build.directory}"> |
| 430 | + <include name="${project.artifactId}-${project.version}-host.jar"/> |
| 431 | + </fileset> |
| 432 | + </copy> |
| 433 | + </target> |
| 434 | + </configuration> |
| 435 | + </execution> |
| 436 | + </executions> |
| 437 | + </plugin> |
| 438 | + |
351 | 439 | <!-- Assemble the dist bundle: bin/ launchers + lib/ fat jars + |
352 | 440 | plugins/ analyzer jars, zipped. Output: |
353 | 441 | target/sonar-predictor-dist-${project.version}.zip. --> |
|
0 commit comments