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
@Named
@Singleton
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
DefaultMavenProjectHelper
-
-
Method Details
-
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
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
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
Add an attached artifact or replace the file for an existing artifact.- Parameters:
project
- project reference.artifact
- artifact to add or replace.- See Also:
-
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.
-