boolean isIncludedInApplicationXml = isIncludeLibInApplicationXml();
// Artifact is not yet registered and it has neither test, nor a
// provided scope, nor is it optional
if(!isArtifactRegistered(artifact, earModules) && filter.include(artifact) && !artifact.isOptional()) {
EarModule module = earModuleFactory.newEarModule(artifact, defaultBundleDir, javaEEVersion, isIncludedInApplicationXml);
if(module != null) {
earModules.add(module);
}
}
}