Superconductivity in the high-pressure phases of barium