Package org.rioproject.resolver

Examples of org.rioproject.resolver.Artifact


        new Artifact("org/foo.foo:bar:2.0");
    }

    @Test(expected = IllegalArgumentException.class)
    public void createBadArtifact3() throws Exception {
        new Artifact("E:\\workspaceBranch\\iGrid\\rio\\lib\\rio-lib-5.0-M4.jar;E:\\workspaceBranch\\iGrid\\rio\\lib-dl\\rio-proxy-5.0-M4.jar;E:\\workspaceBranch\\iGrid\\rio\\lib-dl\\rio-api-5.0-M4.jar;E:\\workspaceBranch\\iGrid\\rio\\lib-dl\\serviceui-2.2.2.jar");
    }
View Full Code Here


        new Artifact("E:\\workspaceBranch\\iGrid\\rio\\lib\\rio-lib-5.0-M4.jar;E:\\workspaceBranch\\iGrid\\rio\\lib-dl\\rio-proxy-5.0-M4.jar;E:\\workspaceBranch\\iGrid\\rio\\lib-dl\\rio-api-5.0-M4.jar;E:\\workspaceBranch\\iGrid\\rio\\lib-dl\\serviceui-2.2.2.jar");
    }

    @Test
    public void createGoodArtifact() {
        Artifact a = new Artifact("org.foo:bar:2.0");
        Assert.assertTrue(a.getGroupId().equals("org.foo"));
        Assert.assertTrue(a.getArtifactId().equals("bar"));
        Assert.assertTrue(a.getVersion().equals("2.0"));
    }
View Full Code Here

         * @return A String for the completed command
         */
        String deploy(final ServiceItem item, final String deployName, final DeployOptions deployOptions, final PrintStream out) {
            boolean isArtifact = false;
            try {
                new Artifact(deployName);
                isArtifact = true;
            } catch(Exception e) {
                /**/
            }
            OperationalString toDeploy = null;
View Full Code Here

                return ("");
            }
            //OperationalString toUndeploy = null;
            String undeployName = null;
            try {
                new Artifact(deployment);
                undeployName = deployment;
            } catch(Exception e) {
                /* */
            }
            if (deployment.endsWith("oar")) {
View Full Code Here

            } finally {
                Thread.currentThread().setContextClassLoader(cCL);
            }
            /* Install Rio main (parent) pom */
            File pomDir = new File(rioHome + File.separator + "config" + File.separator + "poms");
            Artifact rioParent = new Artifact("org.rioproject:main:" + RioVersion.VERSION);
            install(rioParent, FileHelper.find(pomDir, "rio-main"), null, aetherServiceInstance);

            File libDir = new File(rioHome + File.separator + "lib");

            /* Install rio-platform */
            Artifact rioPlatform = new Artifact("org.rioproject:rio-platform:" + RioVersion.VERSION);
            install(rioPlatform, null, FileHelper.find(libDir, "rio-platform"), aetherServiceInstance);

            /* Install Rio Resolver API */
            Artifact resolverAPI = new Artifact("org.rioproject.resolver:resolver-api:" + RioVersion.VERSION);
            install(resolverAPI, null, FileHelper.find(libDir, "resolver-api"), aetherServiceInstance);

            /* Install client and proxy jars */
            formatAndAddToMap("org.rioproject.cybernode:cybernode-api", "cybernode-api", rioArtifactJars);
            formatAndAddToMap("org.rioproject.cybernode:cybernode-proxy", "cybernode-proxy", rioArtifactJars);
            formatAndAddToMap("org.rioproject.cybernode:cybernode-ui", "cybernode-ui", rioArtifactJars);
            formatAndAddToMap("org.rioproject.monitor:monitor-api", "monitor-api", rioArtifactJars);
            formatAndAddToMap("org.rioproject.gnostic:gnostic-api", "gnostic-api", rioArtifactJars);
            formatAndAddToMap("org.rioproject.monitor:monitor-proxy", "monitor-proxy", rioArtifactJars);
            formatAndAddToMap("org.rioproject:rio-api", "rio-api", rioArtifactJars);
            formatAndAddToMap("org.rioproject:rio-proxy", "rio-proxy", rioArtifactJars);
            formatAndAddToMap("org.rioproject:watch-ui", "watch-ui", rioArtifactJars);

            formatAndAddToMap("org.rioproject.event-collector:event-collector-api", "event-collector-api", rioArtifactJars);
            formatAndAddToMap("org.rioproject.event-collector:event-collector-proxy", "event-collector-proxy", rioArtifactJars);

            File libDlDir = new File(rioHome + File.separator + "lib-dl");
            for (Map.Entry<Artifact, String> entry : rioArtifactJars.entrySet()) {
                Artifact a = entry.getKey();
                install(a, null, new File(libDlDir, entry.getValue()), aetherServiceInstance);
            }

            /* Install the Gnostic service and the Gnostic pom */
            Artifact gnosticParent = new Artifact("org.rioproject:gnostic:" + RioVersion.VERSION);
            install(gnosticParent, FileHelper.find(pomDir, "rio-gnostic"), null, aetherServiceInstance);
            Artifact gnosticService = new Artifact("org.rioproject.gnostic:gnostic-service:" + RioVersion.VERSION);
            install(gnosticService, null, FileHelper.find(libDir, "gnostic-service"), aetherServiceInstance);

            File jskResourcesJar = FileHelper.find(libDir, "jsk-resources");
            File jskPlatformJar = FileHelper.find(libDir, "jsk-platform");
            File jskDLJar = FileHelper.find(libDlDir, "jsk-dl");
            File reggieDLJar = FileHelper.find(libDlDir, "reggie-dl");
            File serviceUIJar = FileHelper.find(libDlDir, "serviceui");

            /* Install third party jars */
            Artifact jskResources = createArtifact("net.jini:jsk-resources", jskResourcesJar);
            Artifact jskPlatform = createArtifact("net.jini:jsk-platform", jskPlatformJar);
            Artifact jskDL = createArtifact("net.jini:jsk-dl", jskDLJar);
            Artifact reggieDL = createArtifact("org.apache.river:reggie-dl", reggieDLJar);
            Artifact serviceUI = createArtifact("net.jini.lookup:serviceui", serviceUIJar);

            install(jskResources, FileHelper.find(pomDir, "jsk-resources"), jskResourcesJar, aetherServiceInstance);
            install(jskPlatform, FileHelper.find(pomDir, "jsk-platform"), jskPlatformJar, aetherServiceInstance);
            install(jskDL, FileHelper.find(pomDir, "jsk-dl"), jskDLJar, aetherServiceInstance);
            install(reggieDL, FileHelper.find(pomDir, "reggie-dl"), reggieDLJar, aetherServiceInstance);
View Full Code Here

            Thread.currentThread().setContextClassLoader(cCL);
        }
    }

    private static Artifact createArtifact(String ga, File jar) {
        return new Artifact(String.format("%s:%s", ga, FileHelper.getJarVersion(jar.getName())));
    }
View Full Code Here

    private static Artifact createArtifact(String ga, File jar) {
        return new Artifact(String.format("%s:%s", ga, FileHelper.getJarVersion(jar.getName())));
    }

    private static void formatAndAddToMap(String a, String j, Map<Artifact, String> map) {
        Artifact artifact = new Artifact(String.format("%s:%s", a, RioVersion.VERSION));
        String jarName = String.format("%s-%s.jar", j, RioVersion.VERSION);
        map.put(artifact, jarName);
    }
View Full Code Here

TOP

Related Classes of org.rioproject.resolver.Artifact

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.