made improvements to build

split up the bash scripts into more reusable parts.  BuildConfig
works properly when plugins are accessed from a local maven repo in
snapshot mode.