Feature/build tool connector parity#97
Conversation
What: - Add build-tool connector capability catalog and parity documentation in AGENTS.md, QUALITY.md, and README.md. - Extend Gradle and Maven connector mappings for excludes, test source roots, Analysis Store artifacts, Joern semantic enrichment, cleanup, and reactor aggregation. - Add shared semantic enrichment orchestration for build-tool-neutral Joern import behavior. Why: - Maven needed the same forensic analysis capabilities exposed by the Gradle connector. - The quality gate now documents and verifies connector parity explicitly. Changes: - Update GenerationRequest and GenerateRulesUseCase to support exclude package prefixes. - Extend BtmGenExtension, GenerateBtmTask, BtmGenMojo, and MavenBtmGenParameters mapping. - Add Maven goals for btmgen-aggregate, analyze, analyze-aggregate, analyze-semantics, import-semantics, and clean-analysis. - Move Gradle semantic analysis task orchestration onto the shared SemanticEnrichmentRunner. - Add Maven reactor source-root collection with deterministic root ordering. - Add parity, Maven Analysis Store, Joern configuration, reactor aggregation, and coverage-focused tests. Impact: - New Maven connector features are behavior-relevant and align Maven output with Gradle under target/forensics. - Existing Gradle defaults remain compatible while adding excludes and includeTests configuration. - Dependency-aware scan-cache invalidation now conservatively rebuilds the H2 cache instead of failing. Testing: - .\\gradlew.bat test --dependency-verification strict --console=plain --stacktrace - .\\gradlew.bat clean test jacocoTestReport jacocoTestCoverageVerification checkPackageCoverage --dependency-verification strict --console=plain --stacktrace - .\\gradlew.bat validatePlugins --dependency-verification strict --no-daemon --console=plain --stacktrace - .\\gradlew.bat test --tests '*BtmGenerationAdapterValidationTest' --tests '*BuildToolConnectorParityTest' --tests '*MavenReactorAggregationTest' --tests '*HexagonRulesTest' --dependency-verification strict --console=plain --stacktrace
What: - Extract shared Maven BTM parameter mapping into common Mojo base classes. - Keep combined Maven analyze goals from deleting the Analysis Store before semantic enrichment. - Centralize repeated Maven test setup for project, session, source, log, and reflection helpers. Why: - SonarCloud reported excessive new-code duplication on PR #96. - The combined analyze flow must keep generated Analysis Store content available for Joern import. Changes: - Add AbstractBtmGenerationMojo and AbstractAggregateBtmGenerationMojo for shared Maven parameters and reactor roots. - Refactor BtmGenMojo, BtmGenAggregateMojo, AnalyzeMojo, and AnalyzeAggregateMojo onto the shared mapping. - Add shared analysis-store validation support and cleanup-policy regression coverage. - Update Maven parity tests to handle inherited Mojo fields. Impact: - Fixes behavior where forensics:analyze and forensics:analyze-aggregate could honor DELETE_ON_SUCCESS before semantic enrichment. - No public Gradle or Maven goal names were changed. - No dependency, Java, Gradle, JaCoCo, or Sonar configuration changes were introduced. Testing: - .\gradlew.bat test --tests '*MavenAnalysisGoalsTest' --tests '*MavenReactorAggregationTest' --tests '*MavenBtmGenParametersTest' --tests '*BtmGenMojoTest' --tests '*MavenAnalysisStoreParityTest' --tests '*MavenJoernConfigurationParityTest' --dependency-verification strict --console=plain --stacktrace - .\gradlew.bat test --tests '*BtmGenerationAdapterValidationTest' --dependency-verification strict --console=plain --stacktrace - .\gradlew.bat clean test jacocoTestReport jacocoTestCoverageVerification checkPackageCoverage --dependency-verification strict --console=plain --stacktrace - .\gradlew.bat validatePlugins --dependency-verification strict --no-daemon --console=plain --stacktrace - .\gradlew.bat test --tests '*BtmGenerationAdapterValidationTest' --tests '*BuildToolConnectorParityTest' --tests '*MavenReactorAggregationTest' --tests '*HexagonRulesTest' --dependency-verification strict --console=plain --stacktrace - .\gradlew.bat test --dependency-verification strict --console=plain --stacktrace - .\gradlew.bat generateMavenPluginDescriptor --dependency-verification strict --console=plain --stacktrace
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 02b701913c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return configuredFile == null | ||
| ? Path.of(defaultPath).toAbsolutePath().normalize() | ||
| : configuredFile.toPath().toAbsolutePath().normalize(); |
There was a problem hiding this comment.
Preserve PATH-based Joern executable resolution
filePath currently normalizes every configured executable to an absolute filesystem path. With the documented defaults (joern, joern-parse, joern-slice), that turns command names into paths like <project>/joern, so the semantic goals invoke non-existent files instead of resolving binaries from PATH. This breaks forensics:analyze, forensics:analyze-aggregate, and forensics:analyze-semantics unless users manually provide absolute executable paths.
Useful? React with 👍 / 👎.


No description provided.