Examples of EarModuleFactory


Examples of org.eclipse.m2e.wtp.earmodules.EarModuleFactory

    }

    Set<EarModule> earModules = new LinkedHashSet<EarModule>(artifacts.size());
    String defaultBundleDir = getDefaultBundleDirectory();
    IProjectFacetVersion javaEEVersion = getEarFacetVersion();
    EarModuleFactory earModuleFactory = EarModuleFactory.createEarModuleFactory(getArtifactTypeMappingService(),
        getFileNameMapping(), getMainArtifactId(), artifacts);

    //Resolve Ear modules from plugin config
    earModules.addAll(getEarModulesFromConfig(earModuleFactory, defaultBundleDir, javaEEVersion));

    ScopeArtifactFilter filter = new ScopeArtifactFilter(Artifact.SCOPE_RUNTIME);

    //next, add remaining modules from maven project dependencies
    for(Artifact artifact : artifacts) {

      // If the artifact's type is POM, ignore and continue
      // since it's used for transitive deps only.
      if("pom".equals(artifact.getType())) { //$NON-NLS-1$
        continue;
      }

      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);
        }
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.