Making HTTP post request (with an input type=“file”) from within Maven, using command line parameters if possible
I would like to convert this bash script: #!/bin/bash if ! [ $# == 2 ]; then echo Usage: update-module admin-password module-file exit 1 fi if ! [ -f $2 ]; then echo Error: module file $2 does not exist exit 1 fi curl -c /tmp/cookie.txt -d uname=admin -d pw=${1} http://localhost:8080/openmrs/loginServlet curl -b /tmp/cookie.txt -F action=upload -F update=true -F moduleFile=\@$2 http://localhost:8080/openmrs/admin/modules/module.list rm -rf /tmp/cookie.txt > /dev/null 2>&1 into something that could be placed into a maven pom.xml file. Note that module-file is a jar file (renamed .omod), admin