It's hard to tell without examining your entire codebase, but I do have a guess: Do you have a /META-INF/beans.xml
file in the compiled jar? Depending on the CDI specification level you are using, that is probably required.
If you're building using maven, you should put this file in src/main/resources/META-INF/beans.xml
relative to the project root.
Here is an example of a beans.xml JEE v8:
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
bean-discovery-mode="annotated"
version="2.0">
</beans>
And here is a reference for all current CDI versions: https://www.mastertheboss.com/jboss-frameworks/cdi/configuring-beans-xml-file
The other guess I have is that since this is a filter class, you probably also need a web fragment file in the same folder.
Here is an example web-fragment.xml for the same JEE v8 specification level:
<?xml version="1.0" encoding="UTF-8"?>
<web-fragment
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee https://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/web-fragment_4_0.xsd"
version="4.0">
</web-fragment>
And here is a guide to other versions: https://jakarta.ee/xml/ns/jakartaee/