Examples of download()


Examples of org.apache.ivy.plugins.resolver.DependencyResolver.download()

     * @see #locate(Artifact)
     */
    public ArtifactDownloadReport download(ArtifactOrigin origin, DownloadOptions options) {
        DependencyResolver resolver = settings.getResolver(origin.getArtifact()
                .getModuleRevisionId());
        return resolver.download(origin, options);
    }

    /**
     * Resolve the dependencies of a module without downloading corresponding artifacts. The module
     * to resolve is given by its ivy file URL. This method requires appropriate configuration of
View Full Code Here

Examples of org.apache.ivy.plugins.resolver.packager.PackagerResolver.download()

            Date pubdate = new GregorianCalendar(2004, 10, 1, 11, 0, 0).getTime();
            assertEquals(pubdate, rmr.getPublicationDate());

            // Download artifact
            Artifact artifact = new DefaultArtifact(mrid, pubdate, "mod", "jar", "jar");
            DownloadReport report = resolver.download(new Artifact[] {artifact}, downloadOptions());
            assertNotNull(report);

            assertEquals(1, report.getArtifactsReports().length);

            ArtifactDownloadReport ar = report.getArtifactReport(artifact);
View Full Code Here

Examples of org.apache.ivy.plugins.resolver.packager.PackagerResolver.download()

            // Verify resource cache now contains the distribution archive
            assertTrue(new File(cachedir, "mod-1.0.tar.gz").exists());

            // Download again, should use Ivy cache this time
            report = resolver.download(new Artifact[] {artifact}, downloadOptions());
            assertNotNull(report);

            assertEquals(1, report.getArtifactsReports().length);

            ar = report.getArtifactReport(artifact);
View Full Code Here

Examples of org.apache.ivy.plugins.resolver.packager.PackagerResolver.download()

            assertEquals(artifact, ar.getArtifact());
            assertEquals(DownloadStatus.NO, ar.getDownloadStatus());

            // Now download the maven2 artifact
            artifact = DefaultArtifact.cloneWithAnotherName(artifact, "foobar-janfu");
            report = resolver.download(new Artifact[] {artifact}, downloadOptions());
            assertNotNull(report);

            assertEquals(1, report.getArtifactsReports().length);

            ar = report.getArtifactReport(artifact);
View Full Code Here

Examples of org.apache.karaf.features.internal.download.Downloader.download()

            }
        }
        for (Map.Entry<BundleInfo, Conditional> entry : infos.entrySet()) {
            final BundleInfo bi = entry.getKey();
            final String loc = bi.getLocation();
            downloader.download(loc, new DownloadCallback() {
                @Override
                public void downloaded(StreamProvider provider) throws Exception {
                    ResourceImpl res = createResource(loc, provider.getMetadata());
                    bundles.put(loc, res);
                }
View Full Code Here

Examples of org.apache.sshd.client.ScpClient.download()

        }
        new File(root, "remote").mkdirs();
        scp.upload("target/scp/local/out.txt", "target/scp/remote/out.txt");
        assertFileLength(new File("target/scp/remote/out.txt"), data.length(), 5000);

        scp.download("target/scp/remote/out.txt", "target/scp/local/out2.txt");
        assertFileLength(new File("target/scp/local/out2.txt"), data.length(), 5000);

        session.close(false).await();
        client.stop();
    }
View Full Code Here

Examples of org.apache.sshd.client.ScpClient.download()

        scp.upload(new String[] { "target/scp/local/out1.txt", "target/scp/local/out2.txt" }, "target/scp/remote/dir");
        assertFileLength(new File("target/scp/remote/dir/out1.txt"), data.length(), 5000);
        assertFileLength(new File("target/scp/remote/dir/out2.txt"), data.length(), 5000);

        try {
            scp.download(new String[] { "target/scp/remote/dir/out1.txt", "target/scp/remote/dir/out2.txt" }, "target/scp/local/out1.txt");
            fail("Expected IOException");
        } catch (IOException e) {
            // Ok
        }
        try {
View Full Code Here

Examples of org.apache.sshd.client.ScpClient.download()

            fail("Expected IOException");
        } catch (IOException e) {
            // Ok
        }
        try {
            scp.download(new String[] { "target/scp/remote/dir/out1.txt", "target/scp/remote/dir/out2.txt" }, "target/scp/local/dir");
            fail("Expected IOException");
        } catch (IOException e) {
            // Ok
        }
        new File(root, "local/dir").mkdirs();
View Full Code Here

Examples of org.apache.sshd.client.ScpClient.download()

            fail("Expected IOException");
        } catch (IOException e) {
            // Ok
        }
        new File(root, "local/dir").mkdirs();
        scp.download(new String[] { "target/scp/remote/dir/out1.txt", "target/scp/remote/dir/out2.txt" }, "target/scp/local/dir");
        assertFileLength(new File("target/scp/local/dir/out1.txt"), data.length(), 5000);
        assertFileLength(new File("target/scp/local/dir/out2.txt"), data.length(), 5000);

        session.close(false).await();
        client.stop();
View Full Code Here

Examples of org.apache.sshd.client.ScpClient.download()

        scp.upload("target/scp/local/dir", "target/scp/remote/", ScpClient.Option.Recursive);
        assertFileLength(new File("target/scp/remote/dir/out1.txt"), data.length(), 5000);
        assertFileLength(new File("target/scp/remote/dir/out2.txt"), data.length(), 5000);

        Utils.deleteRecursive(new File("target/scp/local/dir"));
        scp.download("target/scp/remote/dir", "target/scp/local", ScpClient.Option.Recursive);
        assertFileLength(new File("target/scp/local/dir/out1.txt"), data.length(), 5000);
        assertFileLength(new File("target/scp/local/dir/out2.txt"), data.length(), 5000);

        session.close(false).await();
        client.stop();
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.