In a stock configuration of Nexus, retreive https://localhost:8081/repository/maven-central/ant/ant/maven-metadata.xml.
Set up Charles Proxy as the http proxy for outbound requests. Using a rewrite rule, make it so that requests to repo1.maven.org return invalid content with a 200 response.
Invalidate cache on the maven-central repository.
Observe in the logs:
But also observe... the content has been lost in Nexus Repo! See screenshot below.
Expected: Invalid content should be served when valid content is available. The whole point of the file content validation feature is to prevent this from happening.
Workaround: Check "Block outbound connections on the repository" in the proxy repository. This will allow previously cached content to be served.