This may work well when things are going well, but as soon as there are internal "issues", it is a recipe for disaster.
"Joe earns 25% more than me, but doesn't show up until 10:00, so why should I bust my ass coming in earlier."
"For what she earns, Shirley should be providing way better specs than this."
"Cut me a break. I spent 3 weeks overtime getting that thing done, and Fred gets all the credit (and money!)"
"I'm way better than Jim. Pay me as much or I quit."
"Jerry must have something on the boss to be paid that much for doing so little."
I could go on and on, but you get the idea...
Team building is tough enough. Making compensation public adds another layer of complexity. Now every internal concern is made more difficult because the dollars come into play. There is no argument or discussion where salary is off limits. Before long, that's what everyone will be thinking about when you really want them thinking about anything else.