Package com.heroku.sdk.maven.mojo
Class AbstractHerokuMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- com.heroku.sdk.maven.mojo.AbstractHerokuMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractHerokuDeployMojo,DashboardMojo,EclipseLaunchConfigMojo,RunWarMojo
public abstract class AbstractHerokuMojo extends org.apache.maven.plugin.AbstractMojo
-
-
Field Summary
Fields Modifier and Type Field Description protected StringappNameThe name of the Heroku app.protected List<String>buildpacksThe buildpacks to run against the partial build.protected Map<String,String>configVarsConfiguration variables that will be set on the Heroku app.protected List<String>includesA set of file patterns to include.protected booleanincludeTargetIf the target directory should also be included.protected StringjdkVersionThe version of the JDK Heroku with run the app with.protected booleanlogProgressIf upload progress should be logged to debug.protected org.apache.maven.project.MavenProjectmavenProjectprotected org.apache.maven.execution.MavenSessionmavenSessionprotected org.apache.maven.plugin.BuildPluginManagerpluginManagerprotected Map<String,String>processTypesThe process types used to run on Heroku (similar to Procfile).protected StringwarFileThe path to the war file that will be deployed with the `deploy-war` target.protected StringwebappRunnerVersionThe version of webapp-runner to use.
-
Constructor Summary
Constructors Constructor Description AbstractHerokuMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Optional<Path>findWarFilePath(Path projectDirectory)Common helper to find the projects WAR file either by referencing the explicitly configured WAR file or searching the build directory for a WAR file.-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
Field Detail
-
mavenSession
@Parameter(defaultValue="${session}", readonly=true) protected org.apache.maven.execution.MavenSession mavenSession
-
mavenProject
@Parameter(defaultValue="${project}", readonly=true) protected org.apache.maven.project.MavenProject mavenProject
-
pluginManager
@Component protected org.apache.maven.plugin.BuildPluginManager pluginManager
-
appName
@Parameter(name="appName", property="heroku.appName") protected String appNameThe name of the Heroku app.
-
jdkVersion
@Parameter(name="jdkVersion", property="heroku.jdkVersion") protected String jdkVersionThe version of the JDK Heroku with run the app with.
-
configVars
@Parameter(name="configVars") protected Map<String,String> configVars
Configuration variables that will be set on the Heroku app.
-
includes
@Parameter(name="includes") protected List<String> includes
A set of file patterns to include.
-
includeTarget
@Parameter(name="includeTarget", defaultValue="true") protected boolean includeTargetIf the target directory should also be included. Defaults to true.
-
logProgress
@Parameter(name="logProgress", defaultValue="false") protected boolean logProgressIf upload progress should be logged to debug.
-
buildpacks
@Parameter(name="buildpacks") protected List<String> buildpacks
The buildpacks to run against the partial build.
-
processTypes
@Parameter(name="processTypes") protected Map<String,String> processTypes
The process types used to run on Heroku (similar to Procfile).
-
warFile
@Parameter(name="warFile") protected String warFile
The path to the war file that will be deployed with the `deploy-war` target.
-
webappRunnerVersion
@Parameter(name="webappRunnerVersion") protected String webappRunnerVersion
The version of webapp-runner to use.
-
-
Method Detail
-
findWarFilePath
protected Optional<Path> findWarFilePath(Path projectDirectory) throws org.apache.maven.plugin.MojoExecutionException, IOException
Common helper to find the projects WAR file either by referencing the explicitly configured WAR file or searching the build directory for a WAR file. This implementation assumes it is run as part of a goal and will throw MojoExecutionExceptions with user-facing error messages.- Parameters:
projectDirectory- The root directory of the project- Returns:
- An optional Path to the WAR file if one could be found
- Throws:
org.apache.maven.plugin.MojoExecutionException- If there is no explicitly configured WAR file path or the projects packaged as a WARIOException- If an IO error occurred during WAR file search
-
-