org.codehaus.mojo.pomtools.wrapper.custom
Class ProjectWrapper
java.lang.Object
org.codehaus.mojo.pomtools.wrapper.modify.AbstractModifiableObject
org.codehaus.mojo.pomtools.wrapper.custom.ProjectWrapper
- All Implemented Interfaces:
- Modifiable
public class ProjectWrapper
- extends AbstractModifiableObject
- Version:
- $Id: ProjectWrapper.java 2166 2006-07-18 21:32:16Z carlos $
- Author:
- David Hawkins
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProjectWrapper
public ProjectWrapper(Modifiable parentMod,
org.apache.maven.project.MavenProject project)
throws PomToolsException
- Throws:
PomToolsException
initializeModel
protected void initializeModel()
throws PomToolsException
- Throws:
PomToolsException
getWrappedModel
public ObjectWrapper getWrappedModel()
createTempResolvedProject
protected org.apache.maven.project.MavenProject createTempResolvedProject(org.apache.maven.model.Model model)
throws PomToolsException,
org.apache.maven.project.ProjectBuildingException,
org.apache.maven.project.InvalidProjectModelException
- Creates a temporary MavenProject from the current contents of our
wrappedModel. This is usefule when performing operations that need
full model resolution. For example, dependencies that inherit their versions
from the parent pom.
- Throws:
PomToolsException
org.apache.maven.project.ProjectBuildingException
org.apache.maven.project.InvalidProjectModelException
setModified
public void setModified(boolean modified)
- Description copied from class:
AbstractModifiableObject
- Setting modified to true propagates the value up to our parent.
Setting it to false will propagate down to our children.
If I am modified, that makes my parent modified. However, if I am
setting my modified to false, that does not mean my parent is no longer
modified.
- Specified by:
setModified
in interface Modifiable
- Overrides:
setModified
in class AbstractModifiableObject
getTemporaryResolvedProject
public org.apache.maven.project.MavenProject getTemporaryResolvedProject()
throws PomToolsException,
org.apache.maven.project.InvalidProjectModelException,
org.apache.maven.project.ProjectBuildingException
- Throws:
PomToolsException
org.apache.maven.project.InvalidProjectModelException
org.apache.maven.project.ProjectBuildingException
findResolvedDependency
public org.apache.maven.model.Dependency findResolvedDependency(DependencyWrapper dep)
throws PomToolsException
- Throws:
PomToolsException
getGroupId
public java.lang.String getGroupId()
getArtifactId
public java.lang.String getArtifactId()
getVersion
public java.lang.String getVersion()
getValueLabel
public java.lang.String getValueLabel()
getBaseDir
public java.io.File getBaseDir()
getFile
public java.io.File getFile()
validateModel
public ProjectValidationResult validateModel()
throws org.apache.maven.project.ProjectBuildingException,
PomToolsException
- Throws:
org.apache.maven.project.ProjectBuildingException
PomToolsException
validateModel
public ProjectValidationResult validateModel(org.apache.maven.model.Model model)
save
public void save()
throws java.io.IOException
- Throws:
java.io.IOException
revert
public void revert()
throws PomToolsException
- Throws:
PomToolsException
writeModel
public static void writeModel(java.io.File pomFile,
org.apache.maven.model.Model model)
throws java.io.IOException
- Throws:
java.io.IOException
readModel
protected org.apache.maven.model.Model readModel(java.io.File pomFile)
throws PomToolsException
- Throws:
PomToolsException
findDependency
public ObjectWrapper findDependency(org.apache.maven.artifact.Artifact artifact)
Copyright © 2009 The Codehaus. All Rights Reserved.