This error indicates a programming bug in Maven itself. To report this issue, please follow these steps:

Capture the debug output of the failing build, e.g. by adding the flag -X to the command line and redirecting the console output of Maven to a file:

mvn <your goals> -X > debug.log

Create a ticket in our issue tracking system and attach the previously captured log output to this ticket.

As the issue will likely only show up under certain circumstances, we need instructions how to reproduce it. For example, a minimal test project along with the command line that exhibits the issue would be highly appreciated.