This uses the maven properties http.url and http.attachmentFile that you can specify on the command line using the -D syntax or in a pom.xml file in a block. Obviously, you'd need to extend the functionality to what else your shell script is doing, but this should get you started.