Custom module copy dist images to seperate images folderr for correct handling

Yes, it was the module template.

But then I am running into the same problem as in this:
java.lang.ClassCastException: class sun.net.www.protocol.file.FileURLConnection cannot be cast to class java.net.JarURLConnection - Development - Vassal (vassalengine.org)

And that is when the images is in the dist folder. Which is also created properly in the jar file and the target/classes/images folder.

And this is default code, nothing weird. And yet, it is crashing. Do you know any reason why? As far as I can see it it trying to create a complete folder as one connection, which could work I think, but why is the casting failing in this case?