Package org.apache.geronimo.deployment.xbeans

Examples of org.apache.geronimo.deployment.xbeans.ServiceType


        }
        if (targetDir == null) {
            throw new RuntimeException("No target directory supplied");
        }
        ServiceDocument serviceDocument = ServiceDocument.Factory.newInstance();
        ServiceType serviceType = serviceDocument.addNewService();
        for (Iterator iterator = artifacts.iterator(); iterator.hasNext();) {
            Artifact artifact = (Artifact) iterator.next();
            Dependency dependency = artifact.getDependency();
            if ("true".equals(dependency.getProperty(DEPENDENCY_PROPERTY))) {
                String groupId = dependency.getGroupId();
                String artifactId = dependency.getArtifactId();
                String type = dependency.getType();
                org.apache.geronimo.deployment.xbeans.ArtifactType dependencyType = serviceType.addNewDependency();
                dependencyType.setGroupId(groupId);
                dependencyType.setArtifactId(artifactId);
                if ("true".equals(dependency.getProperty(KEEP_VERSION_PROPERTY))) {
                    String version = dependency.getVersion();
                    dependencyType.setVersion(version);
                }
                if (type != null && !"jar".equals(type)) {
                    dependencyType.setType(type);
                }
            }
        }

        if (serviceType.getDependencyArray().length > 0) {
            File targetDir = new File(this.targetDir);
            if (targetDir.exists()) {
                if (!targetDir.isDirectory()) {
                    throw new RuntimeException("TargetDir: " + this.targetDir + " exists and is not a directory");
                }
View Full Code Here


        }
        if (targetDir == null) {
            throw new RuntimeException("No target directory supplied");
        }
        ServiceDocument serviceDocument = ServiceDocument.Factory.newInstance();
        ServiceType serviceType = serviceDocument.addNewService();
        for (Iterator iterator = artifacts.iterator(); iterator.hasNext();) {
            Artifact artifact = (Artifact) iterator.next();
            Dependency dependency = artifact.getDependency();
            if ("true".equals(dependency.getProperty(DEPENDENCY_PROPERTY))) {
                String groupId = dependency.getGroupId();
                String artifactId = dependency.getArtifactId();
                String type = dependency.getType();
                org.apache.geronimo.deployment.xbeans.ArtifactType dependencyType = serviceType.addNewDependency();
                dependencyType.setGroupId(groupId);
                dependencyType.setArtifactId(artifactId);
                if ("true".equals(dependency.getProperty(KEEP_VERSION_PROPERTY))) {
                    String version = dependency.getVersion();
                    dependencyType.setVersion(version);
                }
                if (type != null && !"jar".equals(type)) {
                    dependencyType.setType(type);
                }
            }
        }

        if (serviceType.getDependencyArray().length > 0) {
            File targetDir = new File(this.targetDir);
            if (targetDir.exists()) {
                if (!targetDir.isDirectory()) {
                    throw new RuntimeException("TargetDir: " + this.targetDir + " exists and is not a directory");
                }
View Full Code Here

        }
        if (targetDir == null) {
            throw new RuntimeException("No target directory supplied");
        }
        ServiceDocument serviceDocument = ServiceDocument.Factory.newInstance();
        ServiceType serviceType = serviceDocument.addNewService();
        for (Iterator iterator = artifacts.iterator(); iterator.hasNext();) {
            Artifact artifact = (Artifact) iterator.next();
            Dependency dependency = (Dependency) artifact.getDependency();
            if ("true".equals(dependency.getProperty(DEPENDENCY_PROPERTY))) {
                String groupId = dependency.getGroupId();
                String artifactId = dependency.getArtifactId();
                String version = dependency.getVersion();
                String type = dependency.getType();
                org.apache.geronimo.deployment.xbeans.DependencyType dependencyType = serviceType.addNewDependency();
                dependencyType.setGroupId(groupId);
                dependencyType.setArtifactId(artifactId);
                dependencyType.setVersion(version);
                if (type != null && !"jar".equals(type)) {
                    dependencyType.setType(type);
                }
            }
        }

        if (serviceType.getDependencyArray().length > 0) {
            File targetDir = new File(this.targetDir);
            if (targetDir.exists()) {
                if (!targetDir.isDirectory()) {
                    throw new RuntimeException("TargetDir: " + this.targetDir + " exists and is not a directory");
                }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.deployment.xbeans.ServiceType

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.