Skip to content

feat(manifest): add socket manifest maven (1.1.125, Coana 15.5.5)#1373

Merged
Jeppe Fredsgaard Blaabjerg (jfblaa) merged 4 commits into
v1.xfrom
jfblaa/manifest-maven
Jun 22, 2026
Merged

feat(manifest): add socket manifest maven (1.1.125, Coana 15.5.5)#1373
Jeppe Fredsgaard Blaabjerg (jfblaa) merged 4 commits into
v1.xfrom
jfblaa/manifest-maven

Conversation

@jfblaa

@jfblaa Jeppe Fredsgaard Blaabjerg (jfblaa) commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new socket manifest maven command that generates a Socket facts file (.socket.facts.json) from a Maven pom.xml project, mirroring the existing gradle / scala (sbt) facts flows. socket-cli delegates to the Coana CLI's manifest maven command (which owns the Maven extension that resolves the dependency graph); socket-cli only constructs the args and verifies the emitted facts file.

This ships as the 1.1.125 release (1.1.124 was taken by --reach-retain-facts-file on v1.x, since merged in): the feature plus the Coana bump it depends on.

What's included

  • New command cmd-manifest-maven.mts — facts-only (Maven is already pom-native, so there is no --pom path). Flags: --bin (defaults to mvn on PATH; point at ./mvnw to use a wrapper), --maven-opts (e.g. -P <profile> -s <settings.xml>), --include-configs / --exclude-configs (Maven scopes), --ignore-unresolved, --verbose. Reads defaults from socket.json like the other JVM tools.
  • convert-maven-to-facts.mts — thin delegate to the shared runCoanaManifestFacts (widened to accept ecosystem: 'maven' / --maven-opts).
  • Auto-detectionpom.xml → maven in detect-manifest-actions.mts, wired into socket manifest auto (generate_auto_manifest.mts).
  • Setup wizard — a Maven choice + setupMaven in the socket manifest setup configurator.
  • Typesmaven entry in socket.json manifest defaults.
  • Docs/changelog — README section and a 1.1.125 changelog entry.
  • Coana bump@coana-tech/cli 15.5.0 → 15.5.5, which adds the manifest maven command this delegates to.

Review follow-ups (mtorp)

  • Changelog version label — relabeled the new section 1.1.1241.1.125 to match package.json, and aligned the PR title/body.
  • --*-opts space-splitting — replaced the per-tool split(' ') with a shared quote-aware tokenizer (parseBuildToolOpts) honoring single/double quotes, applied across gradle/kotlin/scala/maven + auto-manifest so the advertised -s "my settings.xml" case works without a maven-only divergence. Unquoted input tokenizes exactly as before; added a unit test.

Verification

  • pnpm build:dist:src, pnpm check:tsc, pnpm check:lint, biome format all clean.
  • New parse-build-tool-opts.test.mts and cmd-manifest-maven.test.mts; gradle/kotlin/scala/auto suites pass.
  • End-to-end smoke test against a real Maven project with the published 15.5.5 produces a complete graph (direct + transitive deps, correct tool: "maven" metadata).

Add a `socket manifest maven` command that generates a Socket facts file
(`.socket.facts.json`) from a Maven `pom.xml` project by delegating to the
Coana CLI's `manifest maven` command, mirroring the existing gradle/sbt
facts flows. Includes pom.xml auto-detection, `socket manifest auto`
wiring, the `socket manifest setup` configurator, socket.json defaults,
and `--maven-opts` / `--bin` pass-through.

Bump Coana CLI to 15.5.5, which adds the `manifest maven` command this
delegates to.
@socket-security

socket-security Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​coana-tech/​cli@​15.5.5741007998100

View full report

@mtorp Martin Torp (mtorp) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving — clean, low-risk addition that faithfully mirrors the existing Gradle/sbt facts delegation: type-safe flag/socket.json plumbing, an argv-based (no-shell) spawn path, and good rationale comments. CI is green across the board.

Two non-blocking notes inline:

  • CHANGELOG version label — the new section is the 1.1.125 release (per package.json) but is labeled 1.1.124; suggestion attached. Worth reconciling with the PR title/body too (they say 1.1.124).
  • --maven-opts space-splitting — a pre-existing, consistent limitation shared with --gradle-opts/--sbt-opts; flagged only because the Maven help text advertises the spaced-path case.

Comment thread CHANGELOG.md Outdated
Comment thread src/commands/manifest/cmd-manifest-maven.mts Outdated
…l opts

Address review feedback on the maven PR:

- CHANGELOG: the new section is the 1.1.125 release (per package.json after
  the v1.x merge), so relabel its heading `1.1.124` -> `1.1.125` (the link
  target was already v1.1.125).
- `--gradle-opts` / `--sbt-opts` / `--maven-opts` were split on every space,
  shredding a value with a spaced path (e.g. `-s "my settings.xml"`) into
  separate tokens. Introduce a shared quote-aware tokenizer
  (`parseBuildToolOpts`) honoring single/double quotes and use it across all
  manifest opts sites (gradle/kotlin/scala/maven + auto-manifest) so the fix
  is consistent rather than a maven-only divergence. Unquoted input tokenizes
  exactly as before.
@jfblaa Jeppe Fredsgaard Blaabjerg (jfblaa) changed the title feat(manifest): add socket manifest maven (1.1.124, Coana 15.5.5) feat(manifest): add socket manifest maven (1.1.125, Coana 15.5.5) Jun 22, 2026
@jfblaa Jeppe Fredsgaard Blaabjerg (jfblaa) merged commit 65ac25b into v1.x Jun 22, 2026
12 checks passed
@jfblaa Jeppe Fredsgaard Blaabjerg (jfblaa) deleted the jfblaa/manifest-maven branch June 22, 2026 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants