public final class PomModuleDescriptorParser extends java.lang.Object implements ModuleDescriptorParser
The configurations used in the generated module descriptor mimics the behavior defined by Maven 2 scopes, as documented here. The PomModuleDescriptorParser use a PomDomReader to read the pom, and the PomModuleDescriptorBuilder to write the ivy module descriptor using the info read by the PomDomReader.
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Resource res) |
static PomModuleDescriptorParser |
getInstance() |
Artifact |
getMetadataArtifact(ModuleRevisionId mrid,
Resource res)
Returns the module metadata artifact corresponding to the given module revision id that this
parser parses
|
java.lang.String |
getType()
Return the 'type' of module artifacts this parser is parsing
|
ModuleDescriptor |
parseDescriptor(ParserSettings ivySettings,
java.net.URL descriptorURL,
boolean validate) |
ModuleDescriptor |
parseDescriptor(ParserSettings ivySettings,
java.net.URL descriptorURL,
Resource res,
boolean validate) |
void |
toIvyFile(java.io.InputStream is,
Resource res,
java.io.File destFile,
ModuleDescriptor md)
Convert a module descriptor to an ivy file.
|
java.lang.String |
toString() |
public static PomModuleDescriptorParser getInstance()
public void toIvyFile(java.io.InputStream is,
Resource res,
java.io.File destFile,
ModuleDescriptor md)
throws java.text.ParseException,
java.io.IOException
ModuleDescriptorParsertoIvyFile in interface ModuleDescriptorParseris - input stream with opened on original module descriptor resourceres - ResourcedestFile - Filemd - ModuleDescriptorjava.text.ParseException - if something goes wrongjava.io.IOException - if something goes wrongpublic boolean accept(Resource res)
accept in interface ModuleDescriptorParserpublic java.lang.String toString()
toString in class java.lang.Objectpublic Artifact getMetadataArtifact(ModuleRevisionId mrid, Resource res)
ModuleDescriptorParsergetMetadataArtifact in interface ModuleDescriptorParsermrid - the module revision id for which the module artifact should be returnedres - the resource for which the module artifact should be returnedpublic java.lang.String getType()
ModuleDescriptorParsergetType in interface ModuleDescriptorParserpublic ModuleDescriptor parseDescriptor(ParserSettings ivySettings, java.net.URL descriptorURL, boolean validate) throws java.text.ParseException, java.io.IOException
parseDescriptor in interface ModuleDescriptorParserjava.text.ParseExceptionjava.io.IOExceptionpublic ModuleDescriptor parseDescriptor(ParserSettings ivySettings, java.net.URL descriptorURL, Resource res, boolean validate) throws java.text.ParseException, java.io.IOException
parseDescriptor in interface ModuleDescriptorParserjava.text.ParseExceptionjava.io.IOExceptionCopyright ©2007-2022 The Apache Software Foundation, Licensed under Apache License, Version 2.0.