org.apache.ivy.plugins.parser.m2
Class PomModuleDescriptorParser
java.lang.Object
org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser
org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser
- All Implemented Interfaces:
- ModuleDescriptorParser
public final class PomModuleDescriptorParser
- extends AbstractModuleDescriptorParser
A parser for Maven 2 POM.
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MAVEN2_CONFIGURATIONS
public static final Configuration[] MAVEN2_CONFIGURATIONS
getInstance
public static PomModuleDescriptorParser getInstance()
parseDescriptor
public ModuleDescriptor parseDescriptor(ParserSettings settings,
java.net.URL descriptorURL,
Resource res,
boolean validate)
throws java.text.ParseException,
java.io.IOException
- Throws:
java.text.ParseException
java.io.IOException
toIvyFile
public void toIvyFile(java.io.InputStream is,
Resource res,
java.io.File destFile,
ModuleDescriptor md)
throws java.text.ParseException,
java.io.IOException
- Description copied from interface:
ModuleDescriptorParser
- Convert a module descriptor to an ivy file. This method MUST close the given input stream
when job is finished
- Parameters:
is
- input stream with opened on original module descriptor resource
- Throws:
java.text.ParseException
java.io.IOException
accept
public boolean accept(Resource res)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getMetadataArtifact
public Artifact getMetadataArtifact(ModuleRevisionId mrid,
Resource res)
- Description copied from interface:
ModuleDescriptorParser
- Returns the module metadata artifact corresponding to the given module revision id that this
parser parses
- Specified by:
getMetadataArtifact
in interface ModuleDescriptorParser
- Overrides:
getMetadataArtifact
in class AbstractModuleDescriptorParser
- Parameters:
mrid
- the module revision id for which the module artifact should be returnedres
- the resource for which the module artifact should be returned
- Returns:
- the module artifact corresponding to the given mrid and resource
getType
public java.lang.String getType()
- Description copied from interface:
ModuleDescriptorParser
- Return the 'type' of module artifacts this parser is parsing
- Specified by:
getType
in interface ModuleDescriptorParser
- Overrides:
getType
in class AbstractModuleDescriptorParser
- Returns:
- the 'type' of module artifacts this parser is parsing