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:
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html 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
ModuleDescriptorParser
toIvyFile
in interface ModuleDescriptorParser
is
- input stream with opened on original module descriptor resourcejava.text.ParseException
java.io.IOException
public boolean accept(Resource res)
accept
in interface ModuleDescriptorParser
public java.lang.String toString()
toString
in class java.lang.Object
public Artifact getMetadataArtifact(ModuleRevisionId mrid, Resource res)
ModuleDescriptorParser
getMetadataArtifact
in interface ModuleDescriptorParser
mrid
- 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()
ModuleDescriptorParser
getType
in interface ModuleDescriptorParser
public ModuleDescriptor parseDescriptor(ParserSettings ivySettings, java.net.URL descriptorURL, boolean validate) throws java.text.ParseException, java.io.IOException
parseDescriptor
in interface ModuleDescriptorParser
java.text.ParseException
java.io.IOException
public ModuleDescriptor parseDescriptor(ParserSettings ivySettings, java.net.URL descriptorURL, Resource res, boolean validate) throws java.text.ParseException, java.io.IOException
parseDescriptor
in interface ModuleDescriptorParser
java.text.ParseException
java.io.IOException