The S3 bucket name space is global, therefore collisions between bucket names are likely. To prevent this, generate unique bucket names. This is done as follows:
- Introduce a new property 'prefix'
- If null, we use the bucket name as defined by 'location'
- If not, we list all buckets and pick the first bucket starting with "<prefix>-". This will be the new location
- If not found, we set location = "<prefix>-<UUID>"
Prefix could be for example set to "jboss-6-m4" for JBoss6 and to "jboss-7-ga" for JBoss7, then there would not be any collisions between different JBoss versions. The UUID generation makes sure that there are no collisions between bucket names