Nobody here suggested that unique promotions would replace XP bonuses. They would be there just for some extra flavour. And a cover promotion for example would be useful all around.
And again, I'd rather have the extra xp to get me faster to where I can chose a promotion than be given one I don't necessarily want on ALL my units. Cover will be useless f.e. on the archers sitting in a city. Free xp also helps ships, cover... not so much. One could argue to make it only for melee unit to boost them once more, I'd be more okay with that, but again, rather more xp...
Hammers act as an opportunity cost. Why are you going to waste hammers on a thing which will provide no benefit to most of your cities. Coupled with this barracks add an additional financial load on the early warmonger without enough payback. Many times I just build another unit instead of barracks so that I can rush better.
Either remove maintenance from barracks or give them a unique promotion to make XP buildings more worthwhile.
For the policy effect obviously. That was where my statement was headed. And I agree about the rest.
Going onto the other posts, the problem analysis:
a) Barracks cost too much (time, production, upkeep) for what they offer.
b) They are often better for a peaceful player who'll build his units later on / generally for the late game cumulative effect with armouries et al.
c) The Heroic Epic comes to late unless you rush it? (meh...)
A effect helping the peaceful player would be to provide experience-per-turn which is realistic (units stationed in the city are training), but it's not necessarily good for gameplay.
Decreasing the production cost seems straightforward and worth a try and is probably already enough. It also helps getting the Heroic Epic... Lowering the upkeep cost on the other hand does seem rather bland.
For a bigger change, what about making the

effect more active. Decreasing the number of free upkeep units you get, but barracks give 1 unit free of upkeep cost (="the troops stationed in the city"). That makes them okay in the early eras, but much better later on. Might not scale well, but it's certainly more active than a directly applied "no upkeep cost". It's also a long-term effect in comparison.
This is the way I would go rather than just adding more "oomph" in the form of free promotions. But yes, it's not something I would change right now, just lowering the production cost and maybe putting them one tech tier earlier is enough