public static Archive archive(final Module module, final URL location, final boolean forceDescriptor) {
final ClassLoader loader = module.getClassLoader();
final String name = "META-INF/" + name();
try {
final URL scanXml = new URLClassLoader(new URL[]{location}, new EmptyResourcesClassLoader()).getResource(name);
if (scanXml == null && !forceDescriptor) {
return ClasspathArchive.archive(loader, location);
} else if (scanXml == null) {
return new ClassesArchive();
}