Class ModelIO


  • @Named
    @Singleton
    public class ModelIO
    extends Object
    Class to resolve artifact descriptors (pom files) from a maven repository
    • Method Detail

      • resolveRawModel

        public Model resolveRawModel​(ProjectVersionRef ref)
                              throws org.commonjava.maven.ext.common.ManipulationException
        Read the raw model (equivalent to the pom file on disk) from a given GAV.
        Parameters:
        ref - the ProjectVersion to read.
        Returns:
        the Maven Model for the GAV
        Throws:
        org.commonjava.maven.ext.common.ManipulationException - if an error occurs.
      • resolveRawFile

        public File resolveRawFile​(ArtifactRef ref)
                            throws org.commonjava.maven.ext.common.ManipulationException
        Read the raw file from a given GAVTC (GAV + Type and Classifier). Useful if we need to read a remote file.
        Parameters:
        ref - the ArtifactRef to read.
        Returns:
        the file for the GAVTC
        Throws:
        org.commonjava.maven.ext.common.ManipulationException - if an error occurs.
      • getRemoteDependencyVersionOverrides

        public Map<ArtifactRef,​String> getRemoteDependencyVersionOverrides​(ProjectVersionRef ref)
                                                                          throws org.commonjava.maven.ext.common.ManipulationException
        Throws:
        org.commonjava.maven.ext.common.ManipulationException
      • getRemoteDependencyVersionOverridesByProject

        public Map<ProjectRef,​String> getRemoteDependencyVersionOverridesByProject​(ProjectVersionRef ref)
                                                                                  throws org.commonjava.maven.ext.common.ManipulationException
        Throws:
        org.commonjava.maven.ext.common.ManipulationException
      • getRemotePropertyMappingOverrides

        public Properties getRemotePropertyMappingOverrides​(ProjectVersionRef ref)
                                                     throws org.commonjava.maven.ext.common.ManipulationException
        Throws:
        org.commonjava.maven.ext.common.ManipulationException
      • getRemotePluginManagementVersionOverrides

        public Set<Plugin> getRemotePluginManagementVersionOverrides​(ProjectVersionRef ref,
                                                                     Properties userProperties)
                                                              throws org.commonjava.maven.ext.common.ManipulationException
        Return remote pluginManagements to override
        Parameters:
        ref - the remote reference to resolve.
        userProperties - a collection of properties to ignore when resolving the remote plugin property expressions.
        Returns:
        a map containing ProjectRef to Plugins
        Throws:
        org.commonjava.maven.ext.common.ManipulationException - if an error occurs