Package org.apache.geronimo.jee.deployment

Examples of org.apache.geronimo.jee.deployment.Dependencies


        Environment type = getEnvironment(false);
        return type != null && type.getSuppressDefaultEnvironment() != null;
    }
   
    protected boolean isSharedLibDependency() {
        Dependencies depType = getDependencies(false);
        if(depType != null) {
            return getSharedLibDependency(depType) != null;
        }
        return false;
    }
View Full Code Here


        }
    }
   
    protected void setSharedLibDependency(boolean enable) {
        if (enable) {
            Dependencies deptype = getDependencies(true);
            Dependency sharedLib = getDeploymentObjectFactory().createDependency();
            sharedLib.setGroupId("org.apache.geronimo.configs");
            sharedLib.setArtifactId("sharedlib");
            sharedLib.setType("car");
            deptype.getDependency().add(sharedLib);
        } else {
            Dependencies deptype = getDependencies(false);
            if (deptype != null) {
                Artifact artifact = getSharedLibDependency(deptype);
                if(artifact != null) {
                    deptype.getDependency().remove(artifact);
                }
            }
        }
    }
View Full Code Here

            }
        }
    }
   
    private Artifact getSharedLibDependency(Dependencies dependencies) {
        Dependencies depType = getDependencies(false);
        List dependenciesList = depType.getDependency();
        Iterator i = dependenciesList.iterator();
        while(i.hasNext()) {
            Artifact artifact = (Artifact) i.next();
            if("org.apache.geronimo.configs".equals(artifact.getGroupId()) && "sharedlib".equals(artifact.getArtifactId()) && "car".equals(artifact.getType())) {
                return artifact;
View Full Code Here

    }
   
    private Dependencies getDependencies(boolean create) {
        Environment env = getEnvironment(create);
        if(env != null) {
            Dependencies dep = env.getDependencies();
            if (dep == null && create) {
                dep = getDeploymentObjectFactory().createDependencies();
                env.setDependencies(dep);
            }
            return dep;
View Full Code Here

  return true;
    }

    private void setDependency(Environment env) {
  Dependencies dependencies = env.getDependencies();
  if (dependencies == null) {
      dependencies = new Dependencies();
      env.setDependencies(dependencies);
  }
  Dependency securityDependency = new Dependency();
  securityDependency.setGroupId("org.apache.geronimo.framework");
  securityDependency.setArtifactId("j2ee-security");
  securityDependency.setType("car");
  if (!dependencies.getDependency().contains(securityDependency)) {
      dependencies.getDependency().add(securityDependency);
  }
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.jee.deployment.Dependencies

Copyright © 2018 www.massapicom. 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.