After some research, I felt it looked like some version incompatibility. and indeed, it is, between the maven version I am using to build the applications using the plugin, and the maven core version used in the plugin.
- in my plugin, I was using latest maven core version available as a dependency, ie 3.5.2
- I am building the plugin with Maven 3.3.1 and build is OK.
- but when I build a project using the plugin, with Maven 3.3.1, the problem happens.
I downgraded maven core to 3.3.9, then rebuilt my plugin, and it works now.
I guess there are some incompatibilities between maven core 3.5.x and previous maven runtime..
I see on https://jaxenter.com/apache-maven-3-5-0-nothing-see-3-4-0-move-along-133180.html that they switched … from Eclipse Aether to Maven Artifact Resolver
but what was very confusing is that my build was failing not at the time of my plugin being called, but after.