diff --git a/completions/mvn.fish b/completions/mvn.fish new file mode 100644 index 0000000..8b32f6d --- /dev/null +++ b/completions/mvn.fish @@ -0,0 +1,86 @@ +# Maven (mvn) fish completion + +# Build phases: +complete -c mvn -n '__fish_use_subcommand' -a validate --description 'validate the project is correct and all necessary information is available.' -f +complete -c mvn -n '__fish_use_subcommand' -a initialize --description 'initialize build state, e.g. set properties or create directories.' -f +complete -c mvn -n '__fish_use_subcommand' -a generate-sources --description 'generate any source code for inclusion in compilation.' -f +complete -c mvn -n '__fish_use_subcommand' -a process-sources --description 'process the source code, for example to filter any values.' -f +complete -c mvn -n '__fish_use_subcommand' -a generate-resources --description 'generate resources for inclusion in the package.' -f +complete -c mvn -n '__fish_use_subcommand' -a process-resources --description 'copy and process the resources into the destination directory, ready for packaging.' -f +complete -c mvn -n '__fish_use_subcommand' -a compile --description 'compile the source code of the project.' -f +complete -c mvn -n '__fish_use_subcommand' -a process-classes --description 'post-process the generated files from compilation, for example to do bytecode enhancement on Java classes.' -f +complete -c mvn -n '__fish_use_subcommand' -a generate-test-sources --description 'generate any test source code for inclusion in compilation.' -f +complete -c mvn -n '__fish_use_subcommand' -a process-test-sources --description 'process the test source code, for example to filter any values.' -f +complete -c mvn -n '__fish_use_subcommand' -a generate-test-resources --description 'create resources for testing.' -f +complete -c mvn -n '__fish_use_subcommand' -a process-test-resources --description 'copy and process the resources into the test destination directory.' -f +complete -c mvn -n '__fish_use_subcommand' -a test-compile --description 'compile the test source code into the test destination directory.' -f +complete -c mvn -n '__fish_use_subcommand' -a process-test-classes --description 'post-process the generated files from test compilation, for example to do bytecode enhancement on Java classes. For Maven 2.0.5 and above.' -f +complete -c mvn -n '__fish_use_subcommand' -a test --description 'run tests using a suitable unit testing framework. These tests should not require the code be packaged or deployed.' -f +complete -c mvn -n '__fish_use_subcommand' -a prepare-package --description 'perform any operations necessary to prepare a package before the actual packaging. This often results in an unpacked, processed version of the package. (Maven 2.1 and above)' -f +complete -c mvn -n '__fish_use_subcommand' -a package --description 'take the compiled code and package it in its distributable format, such as a JAR.' -f +complete -c mvn -n '__fish_use_subcommand' -a pre-integration-test --description 'perform actions required before integration tests are executed. This may involve things such as setting up the required environment.' -f +complete -c mvn -n '__fish_use_subcommand' -a integration-test --description 'process and deploy the package if necessary into an environment where integration tests can be run.' -f +complete -c mvn -n '__fish_use_subcommand' -a post-integration-test --description 'perform actions required after integration tests have been executed. This may including cleaning up the environment.' -f +complete -c mvn -n '__fish_use_subcommand' -a verify --description 'run any checks to verify the package is valid and meets quality criteria.' -f +complete -c mvn -n '__fish_use_subcommand' -a install --description 'install the package into the local repository, for use as a dependency in other projects locally.' -f +complete -c mvn -n '__fish_use_subcommand' -a deploy --description 'done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.' -f +complete -c mvn -n '__fish_use_subcommand' -a pre-clean --description 'executes processes needed prior to the actual project cleaning.' -f +complete -c mvn -n '__fish_use_subcommand' -a clean --description 'remove all files generated by the previous build.' -f +complete -c mvn -n '__fish_use_subcommand' -a post-clean --description 'executes processes needed to finalize the project cleaning.' -f +complete -c mvn -n '__fish_use_subcommand' -a pre-site --description 'executes processes needed prior to the actual project site generation.' -f +complete -c mvn -n '__fish_use_subcommand' -a site --description "generates the project's site documentation." -f +complete -c mvn -n '__fish_use_subcommand' -a post-site --description 'executes processes needed to finalize the site generation, and to prepare for site deployment.' -f +complete -c mvn -n '__fish_use_subcommand' -a site-deploy --description 'deploys the generated site documentation to the specified web server.' -f + +# Options: +complete -c mvn -x -o am -l also-make -d 'If project list is specified, also build projects required by the list' +complete -c mvn -x -o amd -l also-make-dependents -d 'If project list is specified, also build projects that depend on projects on the list' +complete -c mvn -x -s B -l batch-mode -d 'Run in non-interactive (batch) mode' +complete -c mvn -x -s C -l strict-checksums -d "Fail the build if checksums don't match" +complete -c mvn -x -s c -l lax-checksums -d "Warn if checksums don't match" +complete -c mvn -x -o cpu -l check-plugin-updates -d 'Ineffective, only kept for backward compatibility' +complete -c mvn -x -r -s D -l define -d 'Define a system property' +complete -c mvn -x -s e -l errors -d 'Produce execution error messages' +complete -c mvn -x -r -o emp -l encrypt-master-password -d 'Encrypt master security password' +complete -c mvn -x -r -o ep -l encrypt-password -d 'Encrypt server password' +complete -c mvn -x -r -s f -l file -d 'Force the use of an alternate POM file.' +complete -c mvn -x -o fae -l fail-at-end -d 'Only fail the build afterwards; allow all non-impacted builds to continue' +complete -c mvn -x -o ff -l fail-fast -d 'Stop at first failure in reactorized builds' +complete -c mvn -x -o fn -l fail-never -d 'NEVER fail the build, regardless of project result' +complete -c mvn -x -r -o gs -l global-settings -d 'Alternate path for the global settings file' +complete -c mvn -x -s h -l help -d 'Display help information' +complete -c mvn -x -s l -l log-file -d 'Log file to where all build output will go.' +complete -c mvn -x -r -s N -l non-recursive -d 'Do not recurse into sub-projects' +complete -c mvn -x -o npr -l no-plugin-registry -d 'Ineffective, only kept for backward compatibility' +complete -c mvn -x -o npu -l no-plugin-updates -d 'Ineffective, only kept for backward compatibility' +complete -c mvn -x -o nsu -l no-snapshot-updates -d 'Suppress SNAPSHOT updates' +complete -c mvn -x -s o -l offline -d 'Work offline' +complete -c mvn -x -r -s P -l activate-profiles -d 'Comma-delimited list of profiles to activate' +complete -c mvn -x -r -o pl -l projects -d 'Comma-delimited list of specified reactor projects instead of all projects. A project can be specified by [groupId]:artifactId or by its relative path.' +complete -c mvn -x -s q -l quiet -d 'Quiet output - only show error' +complete -c mvn -x -r -o rf -l resume-from -d 'Resume reactor from specified project' +complete -c mvn -x -r -s s -l settings -d 'Alternate path for the user settings file' +complete -c mvn -x -r -s T -l threads -d 'Thread count, for instead 2.0C where C is core multiplied' +complete -c mvn -x -r -s t -l toolchains -d 'Alternate path for the user toolchains file' +complete -c mvn -x -s U -l update-snapshots -d 'Forces a check for updated releases and snapshots on remote repositories' +complete -c mvn -x -o up -l update-plugins -d 'Ineffective, only kept for backward compatibility' +complete -c mvn -x -s V -l show-version -d 'Display version information WITHOUT stopping build' +complete -c mvn -x -s v -l version -d 'Display version information' +complete -c mvn -x -s X -l debug -d 'Produce execution debug output' + +# Exec Plugin: +# Build phases: +complete -c mvn -n '__fish_use_subcommand' -a exec:java --description 'execute programs and Java programs in a separate process.' +complete -c mvn -n '__fish_use_subcommand' -a exec:exec --description 'execute Java programs in the same VM.' + +# Options: +# TODO: Check whether -D was specified before adding these completions? +# complete -c mvn -x -o Dexec.classpathScope -d 'Defines the scope of the classpath passed to the plugin.' +# complete -c mvn -x -o Dexec.executable -d 'The executable.' +# complete -c mvn -x -o Dexec.args -d 'Arguments for the executed program.' +# complete -c mvn -x -o Dexec.longClasspath -d 'Whether to write the classpath and main to a MANIFEST.MF file.' +# complete -c mvn -x -o Dexec.outputFile -d 'Where to redirect STDOUT/STDERR.' +# complete -c mvn -x -o Dskip -d 'Skip the execution.' +# complete -c mvn -x -o DsourceRoot -d 'This folder is added to the list of those folders containing source to be compiled.' +# complete -c mvn -x -o DtestSourceRoot -d 'This folder is added to the list of those folders containing source to be compiled for testing.' +# complete -c mvn -x -o Dexec.workingdir -d 'The current working directory.'