{
  "id": "maven",
  "name": "Apache Maven",
  "homepage": "https://maven.apache.org",
  "description": "Apache Maven is a software project management and comprehension tool.",
  "icon": "SimpleIcons:apachemaven",
  "executables": [
    "mvn"
  ],
  "dotfiles": {
    "paths": [
      "~/.m2/settings.xml",
      "~/.m2/toolchains.xml"
    ],
    "exclude": [
      "~/.m2/repository/",
      "~/.m2/wrapper/"
    ],
    "secret": [
      "~/.m2/settings-security.xml"
    ],
    "secret_paths": [
      {
        "file": "~/.m2/settings.xml",
        "match": {
          "prefix": [
            "<password>",
            "<passphrase>"
          ]
        }
      }
    ],
    "machine_lines": [
      {
        "file": "~/.m2/settings.xml",
        "match": {
          "prefix": [
            "<localRepository>"
          ]
        },
        "scope": "backup"
      },
      {
        "file": "~/.m2/toolchains.xml",
        "match": {
          "prefix": [
            "<jdkHome>"
          ]
        },
        "scope": "platform"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Run Maven build",
    "description": "Run lifecycle phases or goals. Settings, toolchains, checksum and password-encryption options are left out.",
    "quality": "ai-draft",
    "base": "fig:mvn",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/mvn.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "goals",
        "label": "Phases or goals",
        "type": "string",
        "position": 0,
        "multiple": true,
        "suggestions": [
          {
            "value": "clean",
            "label": "clean"
          },
          {
            "value": "validate",
            "label": "validate"
          },
          {
            "value": "compile",
            "label": "compile"
          },
          {
            "value": "process-resources",
            "label": "process-resources"
          }
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "define",
        "label": "System properties",
        "description": "name=value, for example skipTests=true.",
        "type": "string",
        "option": [
          "--define",
          "-D"
        ],
        "multiple": true,
        "sources": [
          "fig"
        ]
      },
      {
        "id": "profiles",
        "label": "Profiles (comma separated)",
        "type": "string",
        "option": [
          "--activate-profiles",
          "-P"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "projects",
        "label": "Projects to build",
        "type": "string",
        "option": [
          "--projects",
          "-pl"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "also_make",
        "label": "Also build required projects",
        "type": "boolean",
        "option": [
          "--also-make",
          "-am"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "file",
        "label": "Alternate POM",
        "type": "path",
        "option": [
          "--file",
          "-f"
        ],
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "threads",
        "label": "Threads",
        "description": "For example 4 or 1C.",
        "type": "string",
        "option": [
          "--threads",
          "-T"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "offline",
        "label": "Work offline",
        "type": "boolean",
        "option": [
          "--offline",
          "-o"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "batch_mode",
        "label": "Batch mode (non-interactive)",
        "type": "boolean",
        "option": [
          "--batch-mode",
          "-B"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "update_snapshots",
        "label": "Force snapshot update",
        "type": "boolean",
        "option": [
          "--update-snapshots",
          "-U"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "errors",
        "label": "Show error messages",
        "type": "boolean",
        "option": [
          "--errors",
          "-e"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "debug",
        "label": "Debug output",
        "type": "boolean",
        "option": [
          "--debug",
          "-X"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "clean_install",
        "label": "Clean install, skip tests",
        "fields": [
          "goals",
          "define"
        ],
        "required": [
          "goals"
        ],
        "set": {
          "goals": [
            "clean",
            "install"
          ],
          "define": [
            "skipTests=true"
          ]
        }
      },
      {
        "id": "test",
        "label": "Run tests",
        "fields": [
          "goals",
          "profiles"
        ],
        "required": [
          "goals"
        ],
        "set": {
          "goals": [
            "test"
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "goals",
          "define",
          "profiles",
          "offline"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "projects",
          "also_make",
          "file",
          "threads",
          "batch_mode",
          "update_snapshots",
          "errors",
          "debug"
        ]
      }
    ]
  }
}
