Search in sources :

Example 1 with ResourceMDParser

use of org.apache.ivy.plugins.resolver.util.ResourceMDParser in project ant-ivy by apache.

the class BasicResolver method getDefaultRMDParser.

protected ResourceMDParser getDefaultRMDParser(final ModuleId mid) {
    return new ResourceMDParser() {

        public MDResolvedResource parse(Resource resource, String rev) {
            DefaultModuleDescriptor md = DefaultModuleDescriptor.newDefaultInstance(new ModuleRevisionId(mid, rev));
            MetadataArtifactDownloadReport madr = new MetadataArtifactDownloadReport(md.getMetadataArtifact());
            madr.setDownloadStatus(DownloadStatus.NO);
            madr.setSearched(true);
            return new MDResolvedResource(resource, rev, new ResolvedModuleRevision(BasicResolver.this, BasicResolver.this, md, madr, isForce()));
        }
    };
}
Also used : MetadataArtifactDownloadReport(org.apache.ivy.core.report.MetadataArtifactDownloadReport) ResourceMDParser(org.apache.ivy.plugins.resolver.util.ResourceMDParser) ResolvedResource(org.apache.ivy.plugins.resolver.util.ResolvedResource) MDResolvedResource(org.apache.ivy.plugins.resolver.util.MDResolvedResource) Resource(org.apache.ivy.plugins.repository.Resource) FileResource(org.apache.ivy.plugins.repository.file.FileResource) URLResource(org.apache.ivy.plugins.repository.url.URLResource) ModuleRevisionId(org.apache.ivy.core.module.id.ModuleRevisionId) ResolvedModuleRevision(org.apache.ivy.core.resolve.ResolvedModuleRevision) DefaultModuleDescriptor(org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor) MDResolvedResource(org.apache.ivy.plugins.resolver.util.MDResolvedResource)

Aggregations

DefaultModuleDescriptor (org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor)1 ModuleRevisionId (org.apache.ivy.core.module.id.ModuleRevisionId)1 MetadataArtifactDownloadReport (org.apache.ivy.core.report.MetadataArtifactDownloadReport)1 ResolvedModuleRevision (org.apache.ivy.core.resolve.ResolvedModuleRevision)1 Resource (org.apache.ivy.plugins.repository.Resource)1 FileResource (org.apache.ivy.plugins.repository.file.FileResource)1 URLResource (org.apache.ivy.plugins.repository.url.URLResource)1 MDResolvedResource (org.apache.ivy.plugins.resolver.util.MDResolvedResource)1 ResolvedResource (org.apache.ivy.plugins.resolver.util.ResolvedResource)1 ResourceMDParser (org.apache.ivy.plugins.resolver.util.ResourceMDParser)1