I frequently have the problem, that I need customized snapshot releases of some open source artifacts contained in the Apache Snapshot or Sonatype Snapshot repositories. A nice way would be to deploy those customized artifact in my private Nexus repository.
How can I ensure that always my customized artifact gets fetched by Maven regardless, whether there is a newer snapshot in the public repositories? This means: Always take the artifact from the hosted snapshot repository when a match is present and use the public ones otherwise.
Avoid to reuse Maven coordinates (group, artifact, version) if you have "patched" the artifact.
Either use a different artifact name (something like commons-io-patched) or add something like this to the version number. Then it is easy to distinguish your artifact from the official one.
Note that changing the version number (e.g. from 1.0.0-SNAPSHOT to 1.0.0-patched-SNAPSHOT) allows Maven dependency mediation to step in, i.e. if you use the patched and the official artifact simultaneously (maybe transitively) only one of them will be included into the build (which is probably what you want).