@Mojo(name="run", threadSafe=true, requiresDependencyResolution=TEST) public class AntRunMojo extends AbstractMojo
| Modifier and Type | Field and 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 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 and Description |
|---|
AntRunMojo() |
| Modifier and Type | Method and 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(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<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.
|
getLog, getPluginContext, setLog, setPluginContextpublic 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 ArtifactRepository localRepository
public static final String DEPENDENCY_PREFIX
public void execute()
throws MojoExecutionException
MojoExecutionExceptionpublic org.apache.tools.ant.types.Path getPathFromArtifacts(Collection<Artifact> artifacts, org.apache.tools.ant.Project antProject) throws DependencyResolutionRequiredException
artifacts - Artifact collection.antProject - ProjectPathDependencyResolutionRequiredException - In case of a failure.public void copyProperties(org.apache.maven.project.MavenProject mavenProject,
org.apache.tools.ant.Project antProject)
mavenProject - MavenProjectantProject - Projectpublic void copyProperties(org.apache.tools.ant.Project antProject,
org.apache.maven.project.MavenProject mavenProject)
antProject - not nullmavenProject - not nullpublic static String getDependencyArtifactPropertyName(Artifact artifact)
artifact - Artifactpublic org.apache.maven.project.MavenProject getMavenProject()
public void initMavenTasks(org.apache.tools.ant.Project antProject)
antProject - Projectpublic 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 - PlexusConfigurationorg.codehaus.plexus.configuration.PlexusConfigurationException - in case of not existing attribute.Copyright © 2002–2014 The Apache Software Foundation. All rights reserved.