help='Global settings file.')
@click.option('-s', '--settings', envvar='SETTINGS_FILE',
help='Settings file.')
+@click.option('-p', '--maven-params',
+ help='Pass Maven commandline options to the mvn command.')
# Maven Artifact GAV
@click.option('-a', '--artifact-id',
help='Maven Artifact ID.')
# Maven Config
ctx, nexus_url, repo_id, file_name,
maven_bin, global_settings, settings,
+ maven_params,
# Maven GAV
artifact_id, group_id, classifier, version,
pom_file):
params.extend(["-l", global_settings])
if settings:
params.extend(["-s", settings])
+ if maven_params:
+ params.extend(["-p", maven_params])
# Maven Artifact GAV
if artifact_id:
echo " -b /path/to/mvn"
echo " -l /path/to/global-settings.xml"
echo " -s /path/to/settings.xml"
+ echo " -p <maven_params>"
echo " -a <artifact_id>"
echo " -c <classifier>"
echo " -g <group_id>"
#
# If pom-file is passed in via the "-f" option then the Maven GAV parameters
# are not necessary. pom-file setting overrides the Maven GAV parameters.
- while getopts a:b:c:f:g:hl:m:s:v: o; do
- case "$o" in
+
+ while getopts a:b:c:f:g:hl:m:p:s:v: opts; do
+ case "$opts" in
h)
deploy_maven_file_usage
exit 0
s)
settings="$OPTARG"
;;
+ p)
+ local mvn_params="$OPTARG"
+ ;;
+
#########################
# Maven Artitfact (GAV) #
params+=("-s $SETTINGS_FILE")
fi
+ if [ ! -z "$mvn_params" ]; then
+ params+=("$mvn_params")
+ fi
+
local file_type
if [[ "$file" == *.tar.gz ]]; then
file_type="tar.gz"