protected MutableMavenModuleResolveMetadata parseMetaDataFromResource(ModuleComponentIdentifier moduleComponentIdentifier, LocallyAvailableExternalResource cachedResource, DescriptorParseContext context) { MutableMavenModuleResolveMetadata metaData = metaDataParser.parseMetaData(context, cachedResource); if (moduleComponentIdentifier instanceof MavenUniqueSnapshotComponentIdentifier) { // Snapshot POMs use -SNAPSHOT instead of the timestamp as version, so validate against the expected id MavenUniqueSnapshotComponentIdentifier snapshotComponentIdentifier = (MavenUniqueSnapshotComponentIdentifier) moduleComponentIdentifier; checkMetadataConsistency(snapshotComponentIdentifier.getSnapshotComponent(), metaData); // Use the requested id. Currently we're discarding the MavenUniqueSnapshotComponentIdentifier and replacing with DefaultModuleComponentIdentifier as pretty // much every consumer of the meta-data is expecting a DefaultModuleComponentIdentifier. ModuleComponentIdentifier lossyId = DefaultModuleComponentIdentifier.newId(moduleComponentIdentifier.getGroup(), moduleComponentIdentifier.getModule(), moduleComponentIdentifier.getVersion()); metaData.setComponentId(lossyId); metaData.setSnapshotTimestamp(snapshotComponentIdentifier.getTimestamp()); } else { checkMetadataConsistency(moduleComponentIdentifier, metaData); } return processMetaData(metaData); }
@Override public T parseMetaData(final DescriptorParseContext context, final LocallyAvailableExternalResource resource) throws MetaDataParseException { return ivyContextManager.withIvy(new Transformer<T, Ivy>() { @Override public T transform(Ivy ivy) { return delegate.parseMetaData(context, resource); } }); }
@Override public T parseMetaData(final DescriptorParseContext ivySettings, final File descriptorFile) throws MetaDataParseException { return ivyContextManager.withIvy(new Transformer<T, Ivy>() { @Override public T transform(Ivy ivy) { return delegate.parseMetaData(ivySettings, descriptorFile); } }); }
@Override public T parseMetaData(final DescriptorParseContext ivySettings, final File descriptorFile, final boolean validate) throws MetaDataParseException { return ivyContextManager.withIvy(new Transformer<T, Ivy>() { @Override public T transform(Ivy ivy) { return delegate.parseMetaData(ivySettings, descriptorFile, validate); } }); }
protected MutableIvyModuleResolveMetadata parseMetaDataFromResource(ModuleComponentIdentifier moduleComponentIdentifier, LocallyAvailableExternalResource cachedResource, DescriptorParseContext context) { MutableIvyModuleResolveMetadata metaData = metaDataParser.parseMetaData(context, cachedResource); checkMetadataConsistency(moduleComponentIdentifier, metaData); return metaData; }
private ModuleDescriptor parseModuleDescriptorFile(File moduleDescriptorFile) { DescriptorParseContext parserSettings = new CachedModuleDescriptorParseContext(); return descriptorParser.parseMetaData(parserSettings, moduleDescriptorFile, false).getDescriptor(); }
protected MutableModuleComponentResolveMetaData parseMetaDataFromResource(LocallyAvailableExternalResource cachedResource, DescriptorParseContext context) { return metaDataParser.parseMetaData(context, cachedResource); }
protected abstract S parseMetaDataFromResource(ModuleComponentIdentifier moduleComponentIdentifier, LocallyAvailableExternalResource cachedResource, DescriptorParseContext context);
protected abstract MutableModuleComponentResolveMetaData parseMetaDataFromResource(LocallyAvailableExternalResource cachedResource, DescriptorParseContext context);