631861
_m2_make_goals()
631861
{
631861
  plugin=$1
631861
  mojos=$2
631861
  for mojo in $mojos
631861
  do
631861
    export goals="$goals $plugin:$mojo"
631861
  done
631861
}
631861
631861
_m2_complete()
631861
{
631861
  local cur goals
631861
631861
  COMPREPLY=()
631861
  cur="${COMP_WORDS[COMP_CWORD]}"
631861
  prev="${COMP_WORDS[COMP_CWORD-1]}"
631861
631861
  case "${prev}" in
631861
       -f | --file|-l|--log-file)
631861
              COMPREPLY=( $(compgen -f ${cur}) )
631861
              return 0
631861
       ;;
631861
       *);;
631861
  esac
631861
631861
631861
  goals='clean compile test install package deploy site verify'
631861
  if [[ ${cur} == -* ]] ; then
631861
     goals="$goals -am --also-make
631861
                   -amd --also-make-dependents
631861
                   -B --batch-mode
631861
                   -C --strict-checksums
631861
                   -c --lax-checksums
631861
                   -cpu --check-plugin-updates
631861
                   -D --define
631861
                   -e --errors
631861
                   -emp --encrypt-master-password
631861
                   -ep --encrypt-password
631861
                   -f --file
631861
                   -fae --fail-at-end
631861
                   -ff --fail-fast
631861
                   -fn --fail-never
631861
                   -gs --global-settings
631861
                   -h --help
631861
                   -l --log-file
631861
                   -N --non-recursive
631861
                   -npr --no-plugin-registry
631861
                   -npu --no-plugin-updates
631861
                   -nsu --no-snapshot-updates
631861
                   -o --offline
631861
                   -P --activate-profiles
631861
                   -pl --projects
631861
                   -q --quiet
631861
                   -rf --resume-from
631861
                   -s --settings
631861
                   -T --threads
631861
                   -t --toolchains
631861
                   -U --update-snapshots
631861
                   -up --update-plugins
631861
                   -V --show-version
631861
                   -v --version
631861
                   -X --debug
631861
                   -Dmaven.test.skip=true
631861
                   -Dmaven.compiler.source=1.5
631861
                   -Dmaven.compiler.source=1.6
631861
                   -Dmaven.compiler.source=1.7
631861
                   -Dmaven.compiler.target=1.5
631861
                   -Dmaven.compiler.target=1.6
631861
                   -Dmaven.compiler.target=1.7
631861
                   -Dproject.build.sourceEncoding=UTF-8
631861
                   -Dmaven.repo.local=
631861
                   -Dmaven.local.depmap.file=
631861
                   -Dmaven.local.debug=true
631861
                   -Dmaven.local.mode=true"
631861
  fi
631861
631861
  goals=$goals _m2_make_goals "eclipse" "eclipse"
631861
  goals=$goals _m2_make_goals "idea" "idea"
631861
  goals=$goals _m2_make_goals "assembly" "assembly"
631861
  goals=$goals _m2_make_goals "plexus" "app bundle-application bundle-runtime descriptor runtime service"
631861
  goals=$goals _m2_make_goals "dependency" "analyze analyze-dep-mgt analyze-only analyze-report analyze-duplicate
631861
                                           build-classpath copy copy-dependencies get go-offline list properties
631861
                                           purge-local-repository resolve resolve-plugins sources tree unpack
631861
                                           unpack-dependencies"
631861
  cur=`echo $cur | sed 's/\\\\//g'`
631861
  COMPREPLY=($(compgen -W "${goals}" -- ${cur} | sed 's/\\\\//g') )
631861
}
631861
631861
complete -F _m2_complete -o filenames mvn