Used to work in a company where every salary was disclosed for all employees. There was a constant stream of people going to their boss "why aren't I getting what [$EMPLOYEE] is getting?". Most of them didn't like the answer, and the answer was not "[$EMPLOYEE] negotiated better". There were in fact clear milestones, competencies, responsibilities, and most significantly... for want of a better word... "campaign ribbons" that [$EMPLOYEE] had earned, that the eager junior would need to earn in order to get to that salary. Many of these decided they didn't want to acquire them.
Publishing individual salaries is a stupid way to do it. Instead publish salaries for the title/level. It's far easier to justify why one employee is "senior" and another is "associate". Even more so when there's a well defined career ladder with expectations at each level.