Package org.apache.ivy.plugins.resolver.packager

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


            // 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

            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

                    mrid, false), data);

            // Download artifact
            Artifact artifact = new DefaultArtifact(mrid, rmr.getPublicationDate(), "A", "jar",
                    "jar");
            resolver.download(new Artifact[] {artifact}, downloadOptions());

            // assert that the file A.jar is extracted from the archive
            File jar = new File(builddir, "org/A/1.0/artifacts/jars/A.jar");
            assertTrue(jar.exists());
View Full Code Here

                    mrid, false), data);

            // Download artifact
            Artifact artifact = new DefaultArtifact(mrid, rmr.getPublicationDate(), "B", "jar",
                    "jar");
            resolver.download(new Artifact[] {artifact}, downloadOptions());

            // assert that the file B.jar is extracted from the archive
            File jar = new File(builddir, "org/B/1.0/artifacts/jars/B.jar");
            assertTrue(jar.exists());
View Full Code Here

            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

   
            // 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

            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

            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

   
            // 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

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.