What WildFly does is the correct way as mandated by the Servlet 3 spec which states:
11.3.1 Provision of Listener Classes
The Developer of the Web application provides listener classes implementing one or
more of the listener interfaces in the javax.servlet API. Each listener class must
have a public constructor taking no arguments. The listener classes are packaged
into the WAR, either under the WEB-INF/classes archive entry, or inside a JAR in
the WEB-INF/lib directory.
1 of 1 people found this helpful
I would like to keep skinny wars to avoid dependency duplication across my project
You can still avoid the duplication. Just move the webapp specific components like the listener class to a jar within the .war/lib folder (or even .war/WEB-INF/classes) and you have the really shared classes across the application modules within the .ear/lib jars.