My solution below is for cases when default maven repositories are not accessible (e.g. due to firewalls).
In case the default repository is not accessible appropriate local <pluginRepository>
has to be specified in the settings.xml. If it's the same as your local artifact repository it still needs to be added to the <pluginRepositories>
section for plugin jars to be found. Regular <repositories>
section is not used to fetch plugin jars.
In my case, however, the issue was caused by the fact that there were multiple plugin repositories defined in that section.
The first repository in the list did not contain the required maven-filtering jar.
I had to change the order of <pluginRepository>
definitions to ensure the first one contains maven-filtering.
Changing of repository definitions typically requires to clean ~/.m2/repository and start fresh.