Package org.apache.ivy.core.resolve

Examples of org.apache.ivy.core.resolve.DownloadOptions


        assertEquals(pubdate, rmr.getPublicationDate());
       
       
        // test to ask to download
        DefaultArtifact artifact = new DefaultArtifact(mrid, pubdate, "mod1.1", "jar", "jar");
        DownloadReport report = resolver.download(new Artifact[] {artifact}, new DownloadOptions(_settings, new CacheManager(_settings, _cache), null, true));
        assertNotNull(report);
       
        assertEquals(1, report.getArtifactsReports().length);
       
        ArtifactDownloadReport ar = report.getArtifactReport(artifact);
View Full Code Here


    /**
     * Default implementation actually download the artifact
     * Subclasses should overwrite this to avoid the download
     */
    public boolean exists(Artifact artifact) {
        DownloadReport dr = download(new Artifact[] {artifact}, new DownloadOptions(getSettings(), new CacheManager(getSettings(), getSettings().getDefaultCache()), null, true));
        ArtifactDownloadReport adr = dr.getArtifactReport(artifact);
        return adr.getDownloadStatus() != DownloadStatus.FAILED;
    }
View Full Code Here

        assertEquals(new File("test/repositories/multi-ivypattern/ivy1/ivy-1.0.xml").getCanonicalPath(),
            new File(ivyRef.getResource().getName()).getCanonicalPath());
    }

    private DownloadOptions getDownloadOptions() {
        return new DownloadOptions();
    }
View Full Code Here

    /**
     * Default implementation actually download the artifact Subclasses should overwrite this to
     * avoid the download
     */
    public ArtifactOrigin locate(Artifact artifact) {
        DownloadReport dr = download(new Artifact[] {artifact}, new DownloadOptions());
        if (dr == null) {
            /*
             * according to IVY-831, it seems that this actually happen sometime, while the contract
             * of DependencyResolver says that it should never return null
             */
 
View Full Code Here

    protected CacheDownloadOptions getCacheDownloadOptions(DownloadOptions options) {
        return new CacheDownloadOptions().setListener(getDownloadListener(options));
    }

    protected DownloadOptions getDownloadOptions(ResolveOptions options) {
        return (DownloadOptions) new DownloadOptions().setLog(options.getLog());
    }
View Full Code Here

                Artifact metaArtifact = artifacts[i];
                if (isSourceArtifactName(artifact.getName(), metaArtifact.getName())
                        && isSources(metaArtifact)) {
                    // we've found the source artifact, let's provision it
                    ArtifactDownloadReport metaAdr = ivy.getResolveEngine().download(metaArtifact,
                        new DownloadOptions());
                    if (metaAdr.getLocalFile() != null && metaAdr.getLocalFile().exists()) {
                        return new Path(metaAdr.getLocalFile().getAbsolutePath());
                    }
                }
            }
View Full Code Here

                Artifact metaArtifact = artifacts[i];
                if (isJavadocArtifactName(artifact.getName(), metaArtifact.getName())
                        && isJavadoc(metaArtifact)) {
                    // we've found the javadoc artifact, let's provision it
                    ArtifactDownloadReport metaAdr = ivy.getResolveEngine().download(metaArtifact,
                        new DownloadOptions());
                    if (metaAdr.getLocalFile() != null && metaAdr.getLocalFile().exists()) {
                        return new Path(metaAdr.getLocalFile().getAbsolutePath());
                    }
                }
            }
View Full Code Here

                                if (resolveReport.getArtifacts().contains(artifact)) {
                                    continue; // already resolved, ignore.
                                }

                                // try to download
                                ArtifactDownloadReport adr = ivy.getResolveEngine().download(artifact, new DownloadOptions());
                                addExternalDependency(artifact, adr.getLocalFile(), resolvedConfiguration, project);
                            }
                        }
                    }
                }
View Full Code Here

        assertEquals(new File("test/repositories/multi-ivypattern/ivy1/ivy-1.0.xml").getCanonicalPath(),
            new File(ivyRef.getResource().getName()).getCanonicalPath());
    }

    private DownloadOptions getDownloadOptions() {
        return new DownloadOptions();
    }
View Full Code Here

        assertEquals(pubdate, rmr.getPublicationDate());

        // test to ask to download
        DefaultArtifact artifact = new DefaultArtifact(mrid, pubdate, "mod1.1", "jar", "jar");
        DownloadReport report = resolver.download(new Artifact[] {artifact},
            new DownloadOptions());
        assertNotNull(report);

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

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

TOP

Related Classes of org.apache.ivy.core.resolve.DownloadOptions

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.