Hmm, looking at EARStructure
| if (archive.getChild("META-INF/persistence.xml").exists()) |
| { |
| log.trace(archive.getName() + " in ear lib directory has persistence units"); |
| if (structureContext.determineChildStructure(archive) == false) |
it means that .ear lib is considered a sub-deployment if it has persistence.xml.
This means you need to add META-INF/jboss-ignore.txt to the actual lib.
Which sort of defeats the purpose of ignore file ...