Package org.commonjava.maven.ext.io
Class ModelIO
- java.lang.Object
-
- org.commonjava.maven.ext.io.ModelIO
-
@Named @Singleton public class ModelIO extends Object
Class to resolve artifact descriptors (pom files) from a maven repository
-
-
Constructor Summary
Constructors Constructor Description ModelIO(GalleyAPIWrapper galleyWrapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<ArtifactRef,String>
getRemoteDependencyVersionOverrides(ProjectVersionRef ref)
Map<ProjectRef,String>
getRemoteDependencyVersionOverridesByProject(ProjectVersionRef ref)
Set<Plugin>
getRemotePluginManagementVersionOverrides(ProjectVersionRef ref, Properties userProperties)
Return remote pluginManagements to overrideProperties
getRemotePropertyMappingOverrides(ProjectVersionRef ref)
File
resolveRawFile(ArtifactRef ref)
Read the raw file from a given GAVTC (GAV + Type and Classifier).Model
resolveRawModel(ProjectVersionRef ref)
Read the raw model (equivalent to the pom file on disk) from a given GAV.
-
-
-
Constructor Detail
-
ModelIO
@Inject public ModelIO(GalleyAPIWrapper galleyWrapper)
-
-
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
-
-