Skip to content

refactor!: repackage dev.sonarcli -> io.github.randomcodespace.sonarpredict#7

Merged
aksOps merged 1 commit into
mainfrom
chore/repackage
May 24, 2026
Merged

refactor!: repackage dev.sonarcli -> io.github.randomcodespace.sonarpredict#7
aksOps merged 1 commit into
mainfrom
chore/repackage

Conversation

@aksOps

@aksOps aksOps commented May 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Java packages and on-disk layout now match the Maven coordinates.

Before After
dev.sonarcli.cli.* io.github.randomcodespace.sonarpredict.cli.*
dev.sonarcli.daemon.* io.github.randomcodespace.sonarpredict.daemon.*
dev.sonarcli.protocol.* io.github.randomcodespace.sonarpredict.protocol.*

Maven groupId is unchanged — it was already io.github.randomcodespace.sonarpredict. This rename closes the gap between the Maven GAV and the Java package, so every artifact / class / FQCN reads from the same namespace.

Mechanics

  • git mv src/{main,test}/java/dev/sonarcli/{cli,daemon,protocol}io/github/randomcodespace/sonarpredict/... (history preserved as renames)
  • Two-pass sed across all 118 .java files:
    1. ^(package|import|import static) dev.sonarcli. → new prefix
    2. Inline FQCN refs (dev.sonarcli.protocol.dto.Issue etc. in javadoc / strings / qualified expressions)
  • pom.xml shade <mainClass> entries updated for both SonarCommand and DaemonMain
  • TestPathDetectorTest sample paths updated to current single-module layout (daemon/src/...src/..., old package → new)

Verify

mvn -B -ntp clean verify -Dsurefire.failIfNoSpecifiedTests=false
BUILD SUCCESS — 323/323 tests pass

Breaking changes

  • Anything that imports our types by FQCN must update. None of the published artifacts have been used by third-party code yet (v0.2.0 is unreleased).

Test plan

  • mvn clean verify green locally (323 tests)
  • CI: test, Self-scan, Scan parity, SonarCloud Code Analysis all green
  • After merge: cut v0.2.0 tag whenever you're ready (publish.yml handles Maven Central + GitHub Release)

…redict

Java package + on-disk layout now match the Maven coordinates:
  groupId io.github.randomcodespace.sonarpredict   (unchanged)
  package io.github.randomcodespace.sonarpredict.{cli,daemon,protocol}

Changes
  src/{main,test}/java/dev/sonarcli/  ->  io/github/randomcodespace/sonarpredict/
    via git mv so history is preserved
  package + import + FQCN refs sed-replaced across 118 .java files
  pom.xml shade mainClass entries updated:
    SonarCommand: io.github.randomcodespace.sonarpredict.cli.SonarCommand
    DaemonMain:   io.github.randomcodespace.sonarpredict.daemon.DaemonMain
  TestPathDetectorTest sample paths updated to single-module layout

Verify
  mvn -B -ntp clean verify -Dsurefire.failIfNoSpecifiedTests=false  ->  BUILD SUCCESS
  323/323 tests pass
@sonarqubecloud

Copy link
Copy Markdown

@aksOps aksOps merged commit 30c89ce into main May 24, 2026
12 checks passed
@aksOps aksOps deleted the chore/repackage branch May 24, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant