manage-maven-profiles
Maven build profile classification and user workflow for unmatched profiles
Files3
View on GitHubSKILL.mdmarketplace/bundles/pm-dev-java/skills/manage-maven-profiles/SKILL.md
GitHubMaven Profile Management
Classify Maven build profiles that weren't auto-matched during discovery.
Enforcement
Execution mode: Invoked conditionally from architecture analysis workflow when unmatched profiles are found. Execute workflow steps sequentially.
Prohibited actions:
- Do not invoke this skill directly -- it is called by
manage-architectureonly - Do not invent script notations -- use only documented notations from this skill and referenced skills
Constraints:
- Every workflow step that performs a script operation has an explicit bash code block with the full
python3 .plan/execute-script.pycommand (Rule 9) - Use
pm-dev-java:manage-maven-profiles:profilesnotation for this skill's own script operations - Use
plan-marshall:manage-architecture:architecturenotation for architecture queries - Use
plan-marshall:manage-config:manage-confignotation for config operations
When to Use
This skill is invoked by manage-architecture when:
- Project contains Maven modules (
build_systemsincludesmaven) - Discovery found NO-MATCH-FOUND profiles
Do not use directly - invoked conditionally from architecture analysis workflow.
Profile Classification
Maven profiles enable optional build features. Extension API classifies profiles during discovery:
| Classification | Meaning |
|---|---|
Canonical (e.g., coverage) |
Generates build command |
NO-MATCH-FOUND |
No command generated |
For canonical classification types, storage format, and common NO-MATCH-FOUND examples, see standards/profile-classification.md.
Workflow
Step 1: Collect Unmatched Profiles Across All Modules
Step 1a: Get Module List
python3 .plan/execute-script.py plan-marshall:manage-architecture:architecture modules
Output (TOON):
modules[N]:
- module-a
- module-b
- module-c
Step 1b: Query Each Module for Profiles
For each module in the list:
python3 .plan/execute-script.py plan-marshall:manage-architecture:architecture \
derived-module --module {module-name}
Parse the TOON output:
- Check
build_systemscontainsmaven - If Maven, check
metadata.profilesfor entries withcanonical: NO-MATCH-FOUND
Step 1c: Build Unmatched Profile Set
Collect all NO-MATCH-FOUND profiles into a deduplicated set:
unmatched_profiles = {profile-id-1, profile-id-2, ...}
Note: Same profile ID may appear in multiple modules. Only ask once per unique profile ID.
If set is empty → Exit, nothing to do.
Step 2: Ask User About Each Unmatched Profile
For each NO-MATCH-FOUND profile, escalate to the operator via AskUserQuestion with this question and option set (single-select):
- Question: "Maven profile '{profile-id}' is unmatched. What should it do?"
- Ignore — Leave as NO-MATCH-FOUND, no command generated
- Skip — Add to skip list, exclude from all processing
- Map to canonical — Map to integration-tests, coverage, benchmark, or quality-gate
Step 3: Apply User Decision
| Choice | Action | Command |
|---|---|---|
| Ignore | Leave as-is | None |
| Skip | Add to skip list | See below |
| Map | Add mapping | See below |
Skip - Add to skip list:
# Get current value first
python3 .plan/execute-script.py plan-marshall:manage-config:manage-config ext-defaults get \
--key build.maven.profiles.skip
# Append new profile (comma-separated)
python3 .plan/execute-script.py plan-marshall:manage-config:manage-config ext-defaults set \
--key build.maven.profiles.skip --value "{existing},{profile-id}"
Map - Add canonical mapping:
# Get current mappings first
python3 .plan/execute-script.py plan-marshall:manage-config:manage-config ext-defaults get \
--key build.maven.profiles.map.canonical
# Append new mapping (comma-separated profile:canonical pairs)
python3 .plan/execute-script.py plan-marshall:manage-config:manage-config ext-defaults set \
--key build.maven.profiles.map.canonical --value "{existing},{profile-id}:{canonical}"
Step 4: Re-run Discovery
After any configuration change:
python3 .plan/execute-script.py plan-marshall:manage-architecture:architecture discover --force
Standards
standards/profile-classification.md— Canonical classifications, multi-profile handling, storage format
External Resources
Scripts (scripts/)
| Script | Subcommand | Purpose |
|---|---|---|
profiles.py |
list |
List Maven profiles from all modules |
profiles.py |
unmatched |
List unmatched profiles (NO-MATCH-FOUND), excluding configured skip/mapped profiles |
profiles.py |
classify |
Classify a single profile by pattern matching |
profiles.py |
suggest |
Suggest classifications for all unmatched profiles |
Notation: pm-dev-java:manage-maven-profiles:profiles {subcommand}
List profiles:
python3 .plan/execute-script.py pm-dev-java:manage-maven-profiles:profiles list
python3 .plan/execute-script.py pm-dev-java:manage-maven-profiles:profiles list --module {module-name}
List unmatched profiles:
python3 .plan/execute-script.py pm-dev-java:manage-maven-profiles:profiles unmatched
Classify a single profile:
python3 .plan/execute-script.py pm-dev-java:manage-maven-profiles:profiles classify --profile-id {profile-id}
Suggest classifications for unmatched profiles:
python3 .plan/execute-script.py pm-dev-java:manage-maven-profiles:profiles suggest
All subcommands accept either --plan-id {plan_id} (preferred — auto-resolves the worktree path via manage-status get-worktree-path) or --project-dir {path} (escape hatch / explicit override; default: current directory). The two flags are mutually exclusive — supplying both raises mutually_exclusive_args. See plan-marshall:tools-script-executor/standards/cwd-policy.md § "Bucket B" for the canonical two-state contract.
Related Documents
| Document | Purpose |
|---|---|
plan-marshall:build-maven → standards/maven-impl.md |
Maven profile pipeline implementation |
plan-marshall:extension-api → standards/canonical-commands.md |
Command vocabulary |
Canonical invocations
The canonical argparse surface for profiles.py. The plugin-doctor missing-canonical-block rule checks that this section is PRESENT, matching its heading only — the body is never read; manage-invocation-invalid derives its accept-set from a live --help walk rather than from this section. Consuming docs xref this section by name instead of restating the command inline. See pm-plugin-development:plugin-script-architecture cross-skill-integration.md § "Script invocation in documentation". --project-dir and --plan-id are top-level flags (placed before the subcommand) and are mutually exclusive.
list
python3 .plan/execute-script.py pm-dev-java:manage-maven-profiles:profiles \
[--project-dir PROJECT_DIR | --plan-id PLAN_ID] list [--module MODULE]
unmatched
python3 .plan/execute-script.py pm-dev-java:manage-maven-profiles:profiles \
[--project-dir PROJECT_DIR | --plan-id PLAN_ID] unmatched
classify
python3 .plan/execute-script.py pm-dev-java:manage-maven-profiles:profiles \
[--project-dir PROJECT_DIR | --plan-id PLAN_ID] classify --profile-id PROFILE_ID
suggest
python3 .plan/execute-script.py pm-dev-java:manage-maven-profiles:profiles \
[--project-dir PROJECT_DIR | --plan-id PLAN_ID] suggest