The attached ear file looks like this:
Servlet.class uses an injected EM, but it does not specify unitName.
entities are packaged in three ear scoped PUs:
par.jar, lib/par1.jar and lib/par2.jar.
All the three jar files are identical except their names.
They all define a single PU inside them called em1.
When I run verifier against it, it does not complain that the same named em
exist in ear scope thrice and hence unitName must be used to resolve it. In
fact, in this case, we have to use jar#unit syntax.
When I analysed the code, I found that the bug is in
AbstractPUMatchingEMRefTest.java#getPUs(Descriptor descriptor). In that method
we should consider adding puRoot.