protected void prepareOptions()

in impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvn/CommonsCliMavenOptions.java [287:393]


        protected void prepareOptions(org.apache.commons.cli.Options options) {
            super.prepareOptions(options);
            options.addOption(Option.builder(ALTERNATE_POM_FILE)
                    .longOpt("file")
                    .hasArg()
                    .desc("Force the use of an alternate POM file (or directory with pom.xml)")
                    .build());
            options.addOption(Option.builder(NON_RECURSIVE)
                    .longOpt("non-recursive")
                    .desc(
                            "Do not recurse into sub-projects. When used together with -pl, do not recurse into sub-projects of selected aggregators")
                    .build());
            options.addOption(Option.builder(UPDATE_SNAPSHOTS)
                    .longOpt("update-snapshots")
                    .desc("Forces a check for missing releases and updated snapshots on remote repositories")
                    .build());
            options.addOption(Option.builder(ACTIVATE_PROFILES)
                    .longOpt("activate-profiles")
                    .desc(
                            "Comma-delimited list of profiles to activate. Prefixing a profile with ! excludes it, and ? marks it as optional")
                    .hasArg()
                    .build());
            options.addOption(Option.builder(SUPPRESS_SNAPSHOT_UPDATES)
                    .longOpt("no-snapshot-updates")
                    .desc("Suppress SNAPSHOT updates")
                    .build());
            options.addOption(Option.builder(CHECKSUM_FAILURE_POLICY)
                    .longOpt("strict-checksums")
                    .desc("Fail the build if checksums don't match")
                    .build());
            options.addOption(Option.builder(CHECKSUM_WARNING_POLICY)
                    .longOpt("lax-checksums")
                    .desc("Warn if checksums don't match")
                    .build());
            options.addOption(Option.builder(FAIL_FAST)
                    .longOpt("fail-fast")
                    .desc("Stop at first failure in reactorized builds")
                    .build());
            options.addOption(Option.builder(FAIL_AT_END)
                    .longOpt("fail-at-end")
                    .desc("Only fail the build afterwards; allow all non-impacted builds to continue")
                    .build());
            options.addOption(Option.builder(FAIL_NEVER)
                    .longOpt("fail-never")
                    .desc("NEVER fail the build, regardless of project result")
                    .build());
            options.addOption(Option.builder(RESUME)
                    .longOpt("resume")
                    .desc(
                            "Resume reactor from the last failed project, using the resume.properties file in the build directory")
                    .build());
            options.addOption(Option.builder(RESUME_FROM)
                    .longOpt("resume-from")
                    .hasArg()
                    .desc("Resume reactor from specified project")
                    .build());
            options.addOption(Option.builder(PROJECT_LIST)
                    .longOpt("projects")
                    .desc(
                            "Comma-delimited list of specified reactor projects to build instead of all projects. A project can be specified by [groupId]:artifactId or by its relative path. Prefixing a project with ! excludes it, and ? marks it as optional")
                    .hasArg()
                    .build());
            options.addOption(Option.builder(ALSO_MAKE)
                    .longOpt("also-make")
                    .desc("If project list is specified, also build projects required by the list")
                    .build());
            options.addOption(Option.builder(ALSO_MAKE_DEPENDENTS)
                    .longOpt("also-make-dependents")
                    .desc("If project list is specified, also build projects that depend on projects on the list")
                    .build());
            options.addOption(Option.builder(THREADS)
                    .longOpt("threads")
                    .hasArg()
                    .desc("Thread count, for instance 4 (int) or 2C/2.5C (int/float) where C is core multiplied")
                    .build());
            options.addOption(Option.builder(BUILDER)
                    .longOpt("builder")
                    .hasArg()
                    .desc("The id of the build strategy to use")
                    .build());
            options.addOption(Option.builder(NO_TRANSFER_PROGRESS)
                    .longOpt("no-transfer-progress")
                    .desc("Do not display transfer progress when downloading or uploading")
                    .build());
            options.addOption(Option.builder(CACHE_ARTIFACT_NOT_FOUND)
                    .longOpt("cache-artifact-not-found")
                    .hasArg()
                    .desc(
                            "Defines caching behaviour for 'not found' artifacts. Supported values are 'true' (default), 'false'.")
                    .build());
            options.addOption(Option.builder(STRICT_ARTIFACT_DESCRIPTOR_POLICY)
                    .longOpt("strict-artifact-descriptor-policy")
                    .hasArg()
                    .desc(
                            "Defines 'strict' artifact descriptor policy. Supported values are 'true', 'false' (default).")
                    .build());
            options.addOption(Option.builder(IGNORE_TRANSITIVE_REPOSITORIES)
                    .longOpt("ignore-transitive-repositories")
                    .desc("If set, Maven will ignore remote repositories introduced by transitive dependencies.")
                    .build());
            options.addOption(Option.builder(AT_FILE)
                    .longOpt("at-file")
                    .hasArg()
                    .desc(
                            "If set, Maven will load command line options from the specified file and merge with CLI specified ones.")
                    .build());
        }