De-duplicate logic in maven deployment.