Upgrade scala-maven-plugin 3.1.2, close #909
Minor clean up
Replace Java collections by Scala collections