Package org.apache.maven.project
Class DefaultMavenProjectHelper
- java.lang.Object
-
- org.codehaus.plexus.logging.AbstractLogEnabled
-
- org.apache.maven.project.DefaultMavenProjectHelper
-
- All Implemented Interfaces:
MavenProjectHelper
,org.codehaus.plexus.logging.LogEnabled
@Component(role=MavenProjectHelper.class) public class DefaultMavenProjectHelper extends org.codehaus.plexus.logging.AbstractLogEnabled implements MavenProjectHelper
DefaultMavenProjectHelper
-
-
Field Summary
-
Fields inherited from interface org.apache.maven.project.MavenProjectHelper
ROLE
-
-
Constructor Summary
Constructors Constructor Description DefaultMavenProjectHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addResource(MavenProject project, String resourceDirectory, List<String> includes, List<String> excludes)
Add a resource directory to the project.void
addTestResource(MavenProject project, String resourceDirectory, List<String> includes, List<String> excludes)
Add a test resource directory to the project.void
attachArtifact(MavenProject project, File artifactFile, String artifactClassifier)
SeeMavenProjectHelper.attachArtifact(MavenProject, String, String, java.io.File)
, but with type set to null.void
attachArtifact(MavenProject project, String artifactType, File artifactFile)
* SeeMavenProjectHelper.attachArtifact(MavenProject, String, String, java.io.File)
, but with classifier set to null.void
attachArtifact(MavenProject project, String artifactType, String artifactClassifier, File artifactFile)
Add or replace an artifact to the current project.void
attachArtifact(MavenProject project, Artifact artifact)
Add an attached artifact or replace the file for an existing artifact.
-
-
-
Method Detail
-
attachArtifact
public void attachArtifact(MavenProject project, String artifactType, String artifactClassifier, File artifactFile)
Description copied from interface:MavenProjectHelper
Add or replace an artifact to the current project.- Specified by:
attachArtifact
in interfaceMavenProjectHelper
- Parameters:
project
- the project reference.artifactType
- the type (e.g. jar) or null.artifactClassifier
- the classifier or null.artifactFile
- the file for the artifact.
-
attachArtifact
public void attachArtifact(MavenProject project, String artifactType, File artifactFile)
Description copied from interface:MavenProjectHelper
* SeeMavenProjectHelper.attachArtifact(MavenProject, String, String, java.io.File)
, but with classifier set to null.- Specified by:
attachArtifact
in interfaceMavenProjectHelper
- Parameters:
project
- project reference.artifactType
- artifact type.artifactFile
- artifact file.
-
attachArtifact
public void attachArtifact(MavenProject project, File artifactFile, String artifactClassifier)
Description copied from interface:MavenProjectHelper
SeeMavenProjectHelper.attachArtifact(MavenProject, String, String, java.io.File)
, but with type set to null.- Specified by:
attachArtifact
in interfaceMavenProjectHelper
- Parameters:
project
- project reference.artifactFile
- artifact file.artifactClassifier
- artifact classifier.
-
attachArtifact
public void attachArtifact(MavenProject project, Artifact artifact)
Add an attached artifact or replace the file for an existing artifact.- Parameters:
project
- project reference.artifact
- artifact to add or replace.- See Also:
MavenProject.addAttachedArtifact(org.apache.maven.artifact.Artifact)
-
addResource
public void addResource(MavenProject project, String resourceDirectory, List<String> includes, List<String> excludes)
Description copied from interface:MavenProjectHelper
Add a resource directory to the project.- Specified by:
addResource
in interfaceMavenProjectHelper
- Parameters:
project
- project reference.resourceDirectory
- directory.includes
- include patterns.excludes
- exclude patterns.
-
addTestResource
public void addTestResource(MavenProject project, String resourceDirectory, List<String> includes, List<String> excludes)
Description copied from interface:MavenProjectHelper
Add a test resource directory to the project.- Specified by:
addTestResource
in interfaceMavenProjectHelper
- Parameters:
project
- project reference.resourceDirectory
- directory.includes
- include patterns.excludes
- exclude patterns.
-
-