1. For transitive dependencies it's hard to tell whether a jar is the dependency of 2 modules and hence gets added more than once. Why is that a problem?
Having a bean class deployed in multiple bean archives is non-portable. For many reasons. In your case I think the deployment would fail because of ambiguous dependency. Anyway, transitive dependencies are not a problem - these will be resolved by Maven resolver. You should either extend the filters used or avoid recursive scanning - so that user domain classes are not added to /WEB-INF/classes.
2. What do you mean by "cannot use normal scope" for ObjectMapper? Do you mean I should use dependent scope instead of ApplicationScoped?
Yes, you can't use any normal scope because Weld wouldn't be able to create a proxy for an unproxyable bean type. See also 5.4. Client proxies
|