Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Apache Maven

$ mvn Foundation Med Risk
Apache · Code & DevOps · Apache-2.0 · macos / linux / windows

Apache Maven (mvn) orchestrates Java/JVM compilation, dependency resolution, packaging, and plugin goals from pom.xml. It provides -B (--batch-mode), --color never, and -o (--offline), though its verbose text logs lack native --json output.

FCRS-1.0 Score
75 /100
Good
High Confidence
Zero-Friction Install
brew install maven
CLI vs MCP Decision CLI Preferred vs MCP

mvn compiles JVM bytecode, resolves ~/.m2 artifacts, and runs Surefire/Failsafe test suites locally; MCP servers cannot substitute for local build execution.

Agent-Readiness Checklist

Local Probe Evidence
— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md
Version
Apache Maven 3.9.12 (848fbb4bf2d427b72bdb2471c22fced7ebd9a7a1)
Startup
577 ms
Exit Codes (help / invalid)
0 / 1
NO_COLOR Clean / Non-TTY Safe
Yes / Safe
Captured --help excerpt
usage: mvn [options] [<goal(s)>] [<phase(s)>]

Options:
 -am,--also-make                         If project list is specified,
                                         also build projects required by
                                         the list
 -amd,--also-make-dependents             If project list is specified,
                                         also build projects that depend
                                         on projects on the list
 -B,--batch-mode                         Run in non-interactive (batch)
                                         mode (disables output color)
 -b,--builder <arg>                      The id of the build strategy to
                                         use
 -C,--strict-checksums                   Fail the build if checksums don't
                                         match
 -c,--lax-checksums                      Warn if checksums don't match
    --color <arg>                        Defines the color mode of the
                                         output. Supported are 'auto',
                                         'always', 'never'.
 -cpu,--check-plugin-updates             Ineffective, only kept for
                                         backward compatibility
 -D,--define <arg>                       Define a user property
 -e,--errors                             Produce execution error messages
 -emp,--encrypt-master-password <arg>    Encrypt master security password
 -ep,--encrypt-password <arg>            Encrypt server password
 -f,--file <arg>                         Force the use of an alternate POM
                                         file (or directory with pom.xml)
 -fae,--fail-at-end                      Only fail the build afterwards;
                                         allow all non-impacted builds to
                                         continue
 -ff,--fail-fast                         Stop at first failure in
                                         reactorized builds
 -fn,--fail-never                        NEVER fail the build, regardless
                                         of project result
 -gs,--global-settings <arg>             Alternate path for the global
                                         settings file
 -gt,--global-toolchains <arg>           Alternate path for the global
                                         toolchains file
 -h,--help                               Display help information
 -itr,--ignore-transitive-repositories   If set, Mav

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 15 / 25

Supports -B (--batch-mode), -q, --color never, and -o (--offline), but produces verbose unstructured text logs with no --json or global --dry-run.

  • -B --color never suppresses prompts and ANSI escapes
  • No native --json output across lifecycle goals
Trust & Safety 19 / 25

Build outputs stay under target/ and ~/.m2/repository, though mvn lacks a dry-run mode and deploy pushes remote artifacts.

  • -o offline mode prevents unexpected network resolution
  • No global --dry-run before running lifecycle plugins
Setup & Portability 12 / 15

Cross-platform via Homebrew, SDKMAN, and ./mvnw wrapper across macOS, Linux, and Windows, requiring a JDK.

  • Requires compatible JDK installed on host
Utility & Efficiency 12 / 15

Standardized JVM build lifecycle and vast plugin ecosystem, though cold JVM startup and verbose [INFO] logs consume context tokens.

  • Universal Java build lifecycle; slower incremental builds than Gradle/mvnd
Maintenance & Lineage 9 / 10

Apache Software Foundation flagship project (apache/maven) under Apache-2.0 license.

  • Official Apache Software Foundation repository
Docs & Verifiability 8 / 10

Extensive official documentation at maven.apache.org, though plugin-specific goal flags are spread across separate plugin sites.

  • Official CLI reference at maven.apache.org

Security, Auth & Guardrails

Auth Modes
No Auth Config File
Credential Storage

Public Maven Central needs no auth; private repository credentials and GPG keys are configured in ~/.m2/settings.xml.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

Apache-2.0 open-source CLI; free to use.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Apache Maven (mvn) Agent Rules
- Always pass `-B --color never` (and `-q` or `-fae` where appropriate) to avoid prompts and log bloat.
- Prefer `./mvnw` if present in the repo, and never run `mvn deploy` without explicit user approval.

Agent-Ready Command Recipes

Safe Read-Only Queries

Print resolved effective POM non-interactively
mvn -B --color never help:effective-pom

Resolves parent POMs, profiles, and properties to inspect the effective build configuration.

Inspect project dependency tree
mvn -B --color never dependency:tree

Prints transitive Maven dependency resolution without running compile or test phases.

Controlled Writes & Previews

Run tests in quiet batch mode
mvn -B -q --color never test

Compiles and executes unit tests non-interactively while suppressing [INFO] progress noise.

Strengths for Agents

  • + -B (--batch-mode) and --color never guarantee non-interactive, ANSI-free execution.
  • + mvn -q trims noisy [INFO] lines to keep error diagnostics concise for agents.
  • + dependency:tree and help:effective-pom expose full transitive build resolution.

Caveats & Pitfalls

  • ! No native --json output or universal --dry-run flag.
  • ! Verbose lifecycle logs can flood agent context windows unless -q or log filtering is used.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI