Class AbstractHerokuMojo

    • 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 appName
        The name of the Heroku app.
      • jdkVersion

        @Parameter(name="jdkVersion",
                   property="heroku.jdkVersion")
        protected String jdkVersion
        The 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 includeTarget
        If the target directory should also be included. Defaults to true.
      • logProgress

        @Parameter(name="logProgress",
                   defaultValue="false")
        protected boolean logProgress
        If 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.
    • Constructor Detail

      • AbstractHerokuMojo

        public AbstractHerokuMojo()
    • 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 WAR
        IOException - If an IO error occurred during WAR file search