You see that there's a 42.0.0 version and a 42.0.0-1 version of the archetype. The former one was problematic (as you've noticed) and a fixed 42.0.0-1 version has been published.
You should use the 42.0.0-1 version. See: https://docs.rws.com/1099777/830905/tridion-sites-10-connectors/creating-a-connector-using-the-template-for-java
BTW: TIF 42.0.0 is compatible with Tridion Sites 9.6 and higher. If you want to create a Connector which can be used with an older version of Tridion Sites, you should use an older version of the archetype.