@Mojo(name="build",
threadSafe=true,
defaultPhase=PACKAGE,
requiresDependencyCollection=TEST,
requiresDependencyResolution=TEST)
public class AntBuildMojo
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field and Description |
---|---|
protected AntProfileManager |
antProfileManager |
protected org.apache.maven.artifact.handler.manager.ArtifactHandlerManager |
artifactHandlerManager |
protected File |
buildFile
Location of the build file, if unique
|
protected File[] |
buildFiles
Location of the build files.
|
protected String |
encoding
The character encoding scheme to be applied.
|
protected String |
expand
How many levels the graph must be expanded before running Ant.
|
protected boolean |
exportAntProperties
If true, Ant properties are propagated to Maven.
|
protected Set<String> |
exportedAntProperties
If set, only the listed properties will be set back to Maven from Ant.
|
protected boolean |
failOnError
If 'false', the Maven build will proceed even if the Ant build fails.
|
protected Graph |
graph |
protected org.apache.maven.artifact.repository.ArtifactRepository |
localRepository |
protected org.apache.maven.project.MavenProject |
project |
protected org.apache.maven.project.MavenProjectHelper |
projectHelper |
protected String |
propertyPrefix
Prefix for property names.
|
protected List<org.eclipse.aether.repository.RemoteRepository> |
remoteRepositories |
protected org.eclipse.aether.RepositorySystemSession |
repositorySystemSession |
protected org.eclipse.aether.DefaultRepositorySystemSession |
session |
protected org.apache.maven.settings.Settings |
settings |
protected org.eclipse.aether.RepositorySystem |
system |
protected String |
target
Ant target to call on build file(s).
|
protected String[] |
targets
Ant targets to call on build file(s).
|
Constructor and Description |
---|
AntBuildMojo() |
Modifier and Type | Method and Description |
---|---|
void |
execute() |
protected void |
expandGraph(Graph newGraph) |
List<org.apache.maven.model.Profile> |
getActiveProfiles() |
AntProfileManager |
getAntProfileManager() |
org.apache.maven.artifact.handler.manager.ArtifactHandlerManager |
getArtifactHandlerManager() |
File[] |
getBuildFiles() |
String |
getEncoding() |
Graph |
getGraph() |
List<String> |
getInjectedProfileIds() |
static AntBuildMojo |
getInstance() |
org.apache.maven.artifact.repository.ArtifactRepository |
getLocalRepository() |
org.apache.maven.project.MavenProject |
getProject() |
org.apache.maven.project.MavenProjectHelper |
getProjectHelper() |
List<org.eclipse.aether.repository.RemoteRepository> |
getRemoteRepositories() |
org.eclipse.aether.DefaultRepositorySystemSession |
getSession() |
org.eclipse.aether.RepositorySystem |
getSystem() |
Graph |
newGraph() |
Graph |
newGraph(String key) |
protected void |
setAntPropertiesFromMaven(org.apache.tools.ant.Project antProject) |
protected void |
setAntReferencesFromMaven(org.apache.tools.ant.Project antProject) |
protected void |
setMavenPropertiesFromAnt(AntClient ant) |
protected Graph graph
protected AntProfileManager antProfileManager
@Parameter(property="buildFile") protected File buildFile
@Parameter(property="buildFiles") protected File[] buildFiles
@Parameter(property="target") protected String target
@Parameter(property="targets") protected String[] targets
@Parameter(defaultValue="0", property="expand") protected String expand
@Component protected org.eclipse.aether.RepositorySystem system
@Parameter(defaultValue="${repositorySystemSession}", readonly=true) protected org.eclipse.aether.RepositorySystemSession repositorySystemSession
protected org.eclipse.aether.DefaultRepositorySystemSession session
@Parameter(defaultValue="${project}", readonly=true) protected org.apache.maven.project.MavenProject project
@Component protected org.apache.maven.project.MavenProjectHelper projectHelper
@Component protected org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager
@Parameter(defaultValue="maven.", property="aamp.propertyPrefix") protected String propertyPrefix
@Parameter(defaultValue="${localRepository}") protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
@Parameter(defaultValue="false", property="aamp.exportAntProperties") protected boolean exportAntProperties
@Parameter(property="aamp.exportedAntProperties") protected Set<String> exportedAntProperties
@Parameter(defaultValue="${project.remoteProjectRepositories}") protected List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories
@Parameter(defaultValue="${project.build.sourceEncoding}", property="aamp.encoding") protected String encoding
@Parameter(defaultValue="${settings}") protected org.apache.maven.settings.Settings settings
@Parameter(defaultValue="true", property="failOnError", alias="aamp.failOnError") protected boolean failOnError
public File[] getBuildFiles() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public org.eclipse.aether.RepositorySystem getSystem()
public org.eclipse.aether.DefaultRepositorySystemSession getSession()
public org.apache.maven.artifact.handler.manager.ArtifactHandlerManager getArtifactHandlerManager()
public List<org.eclipse.aether.repository.RemoteRepository> getRemoteRepositories()
public String getEncoding()
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
public Graph newGraph()
public Graph newGraph(String key)
key
- artifact GAVGraph
which root is artifact resolved from key
protected void expandGraph(Graph newGraph)
protected void setMavenPropertiesFromAnt(AntClient ant)
protected void setAntReferencesFromMaven(org.apache.tools.ant.Project antProject) throws org.apache.tools.ant.BuildException, org.apache.maven.artifact.DependencyResolutionRequiredException
org.apache.maven.artifact.DependencyResolutionRequiredException
org.apache.tools.ant.BuildException
protected void setAntPropertiesFromMaven(org.apache.tools.ant.Project antProject)
public List<org.apache.maven.model.Profile> getActiveProfiles()
public org.apache.maven.project.MavenProject getProject()
public org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
public org.apache.maven.project.MavenProjectHelper getProjectHelper()
public Graph getGraph()
public AntProfileManager getAntProfileManager()
public static AntBuildMojo getInstance()
Copyright © 2016 Nuxeo SA. All Rights Reserved.