org.codehaus.groovy.grails.resolve.maven
Class PomModuleDescriptorParser
java.lang.Object
org.codehaus.groovy.grails.resolve.maven.PomModuleDescriptorParser
- All Implemented Interfaces:
- org.apache.ivy.plugins.parser.ModuleDescriptorParser
public final class PomModuleDescriptorParser
- extends java.lang.Object
- implements org.apache.ivy.plugins.parser.ModuleDescriptorParser
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
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.
|
Method Summary |
boolean |
accept(org.apache.ivy.plugins.repository.Resource res)
|
protected org.apache.ivy.plugins.parser.m2.PomModuleDescriptorBuilder |
createPomModuleDescriptorBuilder(org.apache.ivy.plugins.parser.ParserSettings ivySettings,
org.apache.ivy.plugins.repository.Resource res)
|
static PomModuleDescriptorParser |
getInstance()
|
org.apache.ivy.core.module.descriptor.Artifact |
getMetadataArtifact(org.apache.ivy.core.module.id.ModuleRevisionId mrid,
org.apache.ivy.plugins.repository.Resource res)
|
java.lang.String |
getType()
|
org.apache.ivy.core.module.descriptor.ModuleDescriptor |
parseDescriptor(org.apache.ivy.plugins.parser.ParserSettings ivySettings,
java.net.URL descriptorURL,
boolean validate)
|
org.apache.ivy.core.module.descriptor.ModuleDescriptor |
parseDescriptor(org.apache.ivy.plugins.parser.ParserSettings ivySettings,
java.net.URL descriptorURL,
org.apache.ivy.plugins.repository.Resource res,
boolean validate)
|
void |
toIvyFile(java.io.InputStream is,
org.apache.ivy.plugins.repository.Resource res,
java.io.File destFile,
org.apache.ivy.core.module.descriptor.ModuleDescriptor md)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
getInstance
public static PomModuleDescriptorParser getInstance()
toIvyFile
public void toIvyFile(java.io.InputStream is,
org.apache.ivy.plugins.repository.Resource res,
java.io.File destFile,
org.apache.ivy.core.module.descriptor.ModuleDescriptor md)
throws java.text.ParseException,
java.io.IOException
- Specified by:
toIvyFile in interface org.apache.ivy.plugins.parser.ModuleDescriptorParser
- Throws:
java.text.ParseException
java.io.IOException
accept
public boolean accept(org.apache.ivy.plugins.repository.Resource res)
- Specified by:
accept in interface org.apache.ivy.plugins.parser.ModuleDescriptorParser
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getMetadataArtifact
public org.apache.ivy.core.module.descriptor.Artifact getMetadataArtifact(org.apache.ivy.core.module.id.ModuleRevisionId mrid,
org.apache.ivy.plugins.repository.Resource res)
- Specified by:
getMetadataArtifact in interface org.apache.ivy.plugins.parser.ModuleDescriptorParser
getType
public java.lang.String getType()
- Specified by:
getType in interface org.apache.ivy.plugins.parser.ModuleDescriptorParser
parseDescriptor
public org.apache.ivy.core.module.descriptor.ModuleDescriptor parseDescriptor(org.apache.ivy.plugins.parser.ParserSettings ivySettings,
java.net.URL descriptorURL,
boolean validate)
throws java.text.ParseException,
java.io.IOException
- Specified by:
parseDescriptor in interface org.apache.ivy.plugins.parser.ModuleDescriptorParser
- Throws:
java.text.ParseException
java.io.IOException
parseDescriptor
public org.apache.ivy.core.module.descriptor.ModuleDescriptor parseDescriptor(org.apache.ivy.plugins.parser.ParserSettings ivySettings,
java.net.URL descriptorURL,
org.apache.ivy.plugins.repository.Resource res,
boolean validate)
throws java.text.ParseException,
java.io.IOException
- Specified by:
parseDescriptor in interface org.apache.ivy.plugins.parser.ModuleDescriptorParser
- Throws:
java.text.ParseException
java.io.IOException
createPomModuleDescriptorBuilder
protected org.apache.ivy.plugins.parser.m2.PomModuleDescriptorBuilder createPomModuleDescriptorBuilder(org.apache.ivy.plugins.parser.ParserSettings ivySettings,
org.apache.ivy.plugins.repository.Resource res)