I have a bunch of developers in my org that are constrained under time and political pressure to push projects out at any cost. As a result, their code quality is suffering and they're already experiencing a plethora of problems when trying to deploy to QA and integration test environments.
The biggest problem this team faces is that they are adding all sorts of extra dependencies to their Maven poms. Someone, somewhere did a copy/paste job of another pom and now it's there, and everyone is afraid to touch it because it "might break something." I HATE black boxes and I've told them they must cleanup. However, because I'm only indirectly involved in the project, I cannot keep direct oversight if they're obeying the order. Furthermore, the project managers are extremely non-technical and are unable to enforce the policy.
We used to have a "gentlemen's agreement" build process, where we would peer review code, clean everything up, and generally everyone understood that cleanliness was the enemy of production problems.
The problem team however, is taking many shortcuts which are sabotaging their own efforts. I'm in a position now to formalize a build process for the entire organization, but remembering years back as a peon developer how much I despised "standards" and how pointless and time consuming they were.
I know "HR" problems shouldn't be solved with technology, but as I work "code cleanliness" into year end reviews, tying it to compensation, I need a way to measure it. Since unused artifacts are a huge problem, I'd like to start here. Are there static analysis tools for maven that can tell me if a dependency is obviously unneeded? I'm hoping to just create a flag for someone to go look at something.
Any other "non evil" ways to getting developers to write clean code?