Generate an identifier if we aren’t given one.
Change groupId so we don’t ever clash.