2.3 KiB
2.3 KiB
name, description
| name | description |
|---|---|
| maven-build-packaging | Use when changing Maven coordinates, compiler or plugin versions, wrapper, packaging, JavaScript resources, or Docker build integration. |
Maven build and packaging
- Use Maven and commit the Maven Wrapper; pin Maven distribution, compiler, Surefire, packaging, and flatten plugin versions.
- Inject
${revision}through-Drevision=...; useflatten-maven-pluginso published metadata resolves the version. - Set compiler release 17. Declare
org.sonarsource.api.plugin:sonar-plugin-api:13.0.0.3026asprovidedfor Community Build 25.9. - Configure
sonar-packaging-maven-pluginwith plugin keybifrost, ASCII display fallbackBifrost (Gitea Import)until manifest UTF-8 is verified, and plugin API minimum13.0.0.3026. - Do not confuse manifest
Sonar-Versionwith a SonarQube product version: it records the minimum plugin API version. Track the minimum tested SonarQube release separately. - Keep JavaScript dependency-free and package it as a static resource; no Node build step is needed.
- Produce
sonar-bifrost-plugin-${revision}.jar; inspect manifest and contents after packaging. - Build reproducibly where plugin versions permit; avoid timestamps and unpinned image tags.
- Docker build stages must use pinned JDK/Maven images and provide a clear host extraction command.
Checklist
- Wrapper and all plugin versions pinned.
- Public API dependency provided, not packaged.
- JAR filename and manifest correct.
- Static page resource included.
- Container build can export the JAR.
Sources
- SonarQube plugin packaging: https://docs.sonarsource.com/sonarqube-community-build/extension-guide/developing-a-plugin/plugin-basics (consulted 2026-10-28)
- Maven Wrapper: https://maven.apache.org/wrapper/ (consulted 2026-10-28)
- Maven CI-friendly versions: https://maven.apache.org/maven-ci-friendly.html (consulted 2026-10-28)
- SonarSource packaging plugin: https://github.com/SonarSource/sonar-packaging-maven-plugin (consulted 2026-10-28)
- Manifest metadata reference: https://docs.sonarsource.com/sonarqube-community-build/extension-guide/developing-a-plugin/plugin-basics (consulted 2026-10-28)
Not verified
- Exact minimum-version manifest syntax must be checked against the pinned packaging plugin release during build implementation.