add common functions - we will need this for java deployment etc
make the deployment more robust against different package formats