Dear All:
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-password would ideally be specified on the command line, similar to command line parameters to maven archetype:create http://maven.apache.org/guides/mini/guide-creating-archetypes.html#Alternative_way_to_start_creating_your_Archetype
(the hostname should ideally be specified on the command line too).
Thank you
Yours Misha