There are some SWARM detectors, some of them are inherited from type "org.wildfly.swarm.spi.meta.FileDetector".
These detectors are just considering the file name, but not the whole path of the file on which resides. This can lead to a wrong detection or misleading behavior.
For example: JPA spec (JSR-317..) requires persistence.xml to be in META-INF/persistence.xml, but Swarm PersistenceXMLDetector just considers any persistence.xml file, regardless of its location. If we move persistence.xml to another path, Swarm will still consider it as detected, BUT that application will fail when deployed, as JPA implementation can't find the file in the right place.