Star formation and activity in the nuclei of barred galaxies