Red Hat Bugzilla – Bug 1255035
Individual modules do not work with uberjars
Last modified: 2016-09-29 03:35:38 EDT
Please see the linked JIRA.
can you describe the goal here? The uber jars should not be combined with individual jars. They're supposed to replace them. For CLI we have a separate uber jar.
This looks to me like a wrong use case and not a real bug. But I'd like to get more details.
If you need to combine them for some reason and you use Maven, make sure the transitive dependencies don't pull in additional jar files that are already included in the uber jar.
they need to be combined for the remote cache store invm test - one node needs to start the hotrod server, which is only available as an individual jar and is not in either uberjar. Also the other node needs to use the hotrod client, but neither the individual jar (because of this bug) or the remote uberjar (https://bugzilla.redhat.com/show_bug.cgi?id=1175272) works.
The spring integration is also available only as an individual jar, but it doesn't have its own log implementation, so the spring tests pass.
This issue requires changing uberjar contents (which is not backwards compatible) and needs to be postponed till JBoss Data Grid 7 release.
Uber jars should be self-contained and should not require any other dependencies (apart from specification jars e.g. JCache). However this might lead to a problem where duplicate classes might be found on classpath  (e.g. embedded and remote Uber Jars might contain infinispan-core). This in turn violates CDI specification which forbids exposing the same bean in more than one archive .
 http://docs.jboss.org/cdi/spec/1.0/html_single/#beanarchive ("If a bean class is deployed in two different bean archives, non-portable behavior results. Portable applications must deploy each bean class in no more than one bean archive.")
Sebastian Łaskawiec <firstname.lastname@example.org> updated the status of jira ISPN-5193 to Resolved
As I mentioned in , uber jars cover most of the cases but in some rare occasions they will fail. In such cases one should use Small Jars.
Marking this issue as ON_QA.
Unfortunately there are no proper version nor milestone. Leaving it in NEW state.