@Mojo(name="run",
threadSafe=true,
requiresDependencyResolution=TEST)
public class AntRunMojo
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field | Description |
---|---|---|
static String |
ANTLIB |
The path to The XML file containing the definition of the Maven tasks.
|
static String |
DEFAULT_ANT_TARGET_NAME |
The default target name.
|
static String |
DEFAULT_MAVEN_PROJECT_HELPER_REFID |
The refid used to store the Maven project object in the Ant build.
|
static String |
DEFAULT_MAVEN_PROJECT_REFID |
The refid used to store the Maven project object in the Ant build.
|
static String |
DEPENDENCY_PREFIX |
Deprecated.
This should only be used for generating the old property format.
|
protected org.apache.maven.artifact.repository.ArtifactRepository |
localRepository |
The local Maven repository
|
static String |
TASK_URI |
The URI which defines the built in Ant tasks
|
static String |
UTF_8 |
The default encoding to use for the generated Ant build.
|
Constructor | Description |
---|---|
AntRunMojo() |
Modifier and Type | Method | Description |
---|---|---|
String |
checkTargetName(org.codehaus.plexus.configuration.PlexusConfiguration antTargetConfig) |
|
void |
copyProperties(org.apache.maven.project.MavenProject mavenProject,
org.apache.tools.ant.Project antProject) |
Copy properties from the Maven project to the Ant project.
|
void |
copyProperties(org.apache.tools.ant.Project antProject,
org.apache.maven.project.MavenProject mavenProject) |
Copy properties from the Ant project to the Maven project.
|
void |
execute() |
|
static String |
getDependencyArtifactPropertyName(org.apache.maven.artifact.Artifact artifact) |
Deprecated.
The dependency conflict ID should be used as the property name.
|
org.apache.maven.project.MavenProject |
getMavenProject() |
Get the current Maven project
|
org.apache.tools.ant.types.Path |
getPathFromArtifacts(Collection<org.apache.maven.artifact.Artifact> artifacts,
org.apache.tools.ant.Project antProject) |
|
void |
initMavenTasks(org.apache.tools.ant.Project antProject) |
|
void |
stringReplace(StringBuilder text,
String match,
String with) |
Replace text in a StringBuilder.
|
public static final String DEFAULT_MAVEN_PROJECT_REFID
public static final String DEFAULT_MAVEN_PROJECT_HELPER_REFID
public static final String DEFAULT_ANT_TARGET_NAME
public static final String UTF_8
public static final String ANTLIB
public static final String TASK_URI
@Parameter(property="localRepository", readonly=true) protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
public static final String DEPENDENCY_PREFIX
public void execute() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public org.apache.tools.ant.types.Path getPathFromArtifacts(Collection<org.apache.maven.artifact.Artifact> artifacts, org.apache.tools.ant.Project antProject) throws org.apache.maven.artifact.DependencyResolutionRequiredException
artifacts
- Artifact
collection.antProject
- Project
Path
org.apache.maven.artifact.DependencyResolutionRequiredException
- In case of a failure.public void copyProperties(org.apache.maven.project.MavenProject mavenProject, org.apache.tools.ant.Project antProject)
mavenProject
- MavenProject
antProject
- Project
public void copyProperties(org.apache.tools.ant.Project antProject, org.apache.maven.project.MavenProject mavenProject)
antProject
- not nullmavenProject
- not nullpublic static String getDependencyArtifactPropertyName(org.apache.maven.artifact.Artifact artifact)
artifact
- Artifact
public org.apache.maven.project.MavenProject getMavenProject()
public void initMavenTasks(org.apache.tools.ant.Project antProject)
antProject
- Project
public void stringReplace(StringBuilder text, String match, String with)
text
- The string buffer containing the textmatch
- The string to match and removewith
- The string to insertpublic String checkTargetName(org.codehaus.plexus.configuration.PlexusConfiguration antTargetConfig) throws org.codehaus.plexus.configuration.PlexusConfigurationException
antTargetConfig
- PlexusConfiguration
org.codehaus.plexus.configuration.PlexusConfigurationException
- in case of not existing attribute.Copyright © 2002–2019 The Apache Software Foundation. All rights reserved.