Class CreateFlatpakMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.eclipse.cbi.maven.plugins.flatpakager.CreateFlatpakMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="package-flatpak", defaultPhase=PACKAGE) public class CreateFlatpakMojo extends org.apache.maven.plugin.AbstractMojo
Create a Flatpak application from the archived product output of the tycho-p2-director-plugin and exports the application to a Flatpak repository. Signing the Flatpak repository is optional, but highly recommended.
Since:
1.1.5
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final List<AdditionalSource>
    An optional list of additional source files that should be installed into the Flatpak application.
    private String
    The branch of the application, defaults to "master" but can be set to identify the stream, for example: "Oxygen" or "4.7"
    private String
    The filename or path to the main binary of the application, defaults to "eclipse"
    private boolean
    Whether the build should be stopped if the packaging process fails.
    private String
    A longer description of the Flatpak application that may be shown in distro software centres.
    private String
     
    private File
    The location of the GPG secure keyring to use when signing the Flatpak application.
    private String
    The GPG key to use when signing the Flatpak application.
    private String
    A unique identifier for the Flatpak application, for example: "org.eclipse.Platform"
    private String
    The license that the Flatpak application is distributed under.
    private String
    An optional email address that can be used to contact the project about invalid or incomplete metadata.
    private String
    The minimum version of Flatpak needed at runtime, that this application will support.
    private String
    A friendly name for the Flatpak application that will be shown to use in software centres and in desktop environments.
    private org.apache.maven.project.MavenProject
     
    private File
    The repository to which the new Flatpak application should be exported.
    private String
    The URL at which the Flatpak repository will be available to users, this is embedded into generated "flatpakrepo" and "flatpakref" files.
    private String
    The version of the Gnome runtime on which to build the Flatpak application.
    private List<String>
    An optional list of URLs to screenshots that may be shown in distro software centres.
    private String
    An optional URL for the Flatpak application packaging web service.
    private boolean
    Whether the Flatpak application should be GPG signed.
    private boolean
    Skips the execution of this plugin.
    private File
    An .tar.gz or .zip file containing a Linux product from which to generate a Flatpak application.
    private String
    A short description of the Flatpak application that may be shown in distro software centres and in desktop environments.
    private int
    Defines the timeout in milliseconds for any communication with the packaging web service.

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private void
    buildAndSignRepo(ExceptionHandler exceptionHandler, File targetDir)
     
    void
     
    private void
    executeProcess(ExceptionHandler exceptionHandler, List<String> args, File targetDir)
     
    private void
     
    private String
    fetchGpgKey(ExceptionHandler exceptionHandler)
     
    private void
     
    private void
    generateRefFiles(String armouredGpgKey)
     

    Methods inherited from class org.apache.maven.plugin.AbstractMojo

    getLog, getPluginContext, setLog, setPluginContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • id

      @Parameter(required=true) private String id
      A unique identifier for the Flatpak application, for example: "org.eclipse.Platform"
      Since:
      1.1.5
    • flatpakId

      private String flatpakId
    • name

      @Parameter(required=true) private String name
      A friendly name for the Flatpak application that will be shown to use in software centres and in desktop environments.
      Since:
      1.1.5
    • summary

      @Parameter(required=true) private String summary
      A short description of the Flatpak application that may be shown in distro software centres and in desktop environments.
      Since:
      1.1.5
    • description

      @Parameter(required=true) private String description
      A longer description of the Flatpak application that may be shown in distro software centres.
      Since:
      1.1.5
    • maintainer

      @Parameter private String maintainer
      An optional email address that can be used to contact the project about invalid or incomplete metadata.
      Since:
      1.1.5
    • screenshots

      @Parameter private List<String> screenshots
      An optional list of URLs to screenshots that may be shown in distro software centres.
      Since:
      1.1.5
    • branch

      @Parameter(required=true, defaultValue="master") private String branch
      The branch of the application, defaults to "master" but can be set to identify the stream, for example: "Oxygen" or "4.7"
      Since:
      1.1.5
    • command

      @Parameter(required=true, defaultValue="eclipse") private String command
      The filename or path to the main binary of the application, defaults to "eclipse"
      Since:
      1.1.5
    • runtimeVersion

      @Parameter(required=true, defaultValue="3.28") private String runtimeVersion
      The version of the Gnome runtime on which to build the Flatpak application. Defaults to "3.28"
      Since:
      1.1.5
    • source

      @Parameter(required=true) private File source
      An .tar.gz or .zip file containing a Linux product from which to generate a Flatpak application.
      Since:
      1.1.5
    • additionalSources

      @Parameter private final List<AdditionalSource> additionalSources
      An optional list of additional source files that should be installed into the Flatpak application. These files are simply copied into the sandbox at the given location. For example:
       <additionalSources>
              <additionalSource>
                      <source>/path/to/local/file</source>
                      <destination>/path/to/location/inside/the/sandbox</destination>
              </additionalSources>
       </additionalSources>
       
      Since:
      1.1.5
    • minFlatpakVersion

      @Parameter(required=true, defaultValue="0.8.8") private String minFlatpakVersion
      The minimum version of Flatpak needed at runtime, that this application will support. Defaults to "0.8.8" (the version available on RHEL 7.5)
      Since:
      1.1.5
    • license

      @Parameter(required=true, defaultValue="EPL-1.0") private String license
      The license that the Flatpak application is distributed under. It should be a valid SPDX license expression. For example:
      • EPL-1.0
      • Apache-2.0 AND LGPL-3.0-or-later

      A full list of recognized licenses and their identifiers can be found at the SPDX OpenSource License Registry.

      Since:
      1.1.5
    • repository

      @Parameter(property="cbi.flatpakager.repo") private File repository
      The repository to which the new Flatpak application should be exported. If not specified, a new repository will be created inside the build directory.
      Since:
      1.1.5
    • repositoryUrl

      @Parameter(property="cbi.flatpakager.repoUrl", defaultValue="http://www.example.com/flatpak/repo") private String repositoryUrl
      The URL at which the Flatpak repository will be available to users, this is embedded into generated "flatpakrepo" and "flatpakref" files.
      Since:
      1.1.5
    • skip

      @Parameter(property="cbi.flatpakager.skip", defaultValue="false") private boolean skip
      Skips the execution of this plugin.
      Since:
      1.1.5
    • continueOnFail

      @Parameter(property="cbi.flatpakager.continueOnFail", defaultValue="false") private boolean continueOnFail
      Whether the build should be stopped if the packaging process fails.
      Since:
      1.1.5
    • sign

      @Parameter(property="cbi.flatpakager.sign", defaultValue="false") private boolean sign
      Whether the Flatpak application should be GPG signed.
      Since:
      1.1.5
    • gpgKey

      @Parameter(property="cbi.flatpakager.gpgkey") private String gpgKey
      The GPG key to use when signing the Flatpak application.
      Since:
      1.1.5
    • gpgHome

      @Parameter(property="cbi.flatpakager.gpghome") private File gpgHome
      The location of the GPG secure keyring to use when signing the Flatpak application. Defaults to the ".gnupg" directory in the user's home.
      Since:
      1.1.5
    • serviceUrl

      @Parameter(property="cbi.flatpakager.serviceUrl") private String serviceUrl
      An optional URL for the Flatpak application packaging web service.

      By default, the Flatpak application will be generated locally. If the Flatpak tools are unavailable locally, or the build is running on an architecture or OS where Flatpak is not supported, then a URL may be specified that indicated the location of the Flatpak packaging web service. For example:

      http://build.eclipse.org:31338/flatpak-packager

      Since:
      1.1.5
    • timeoutMillis

      @Parameter(property="cbi.flatpakager.timeoutMillis", defaultValue="0") private int timeoutMillis
      Defines the timeout in milliseconds for any communication with the packaging web service. Defaults to zero, which is interpreted as an infinite timeout. This only means something if a serviceUrl is specified.
      Since:
      1.1.5
    • project

      @Parameter(defaultValue="${project}", required=true, readonly=true) private org.apache.maven.project.MavenProject project
  • Constructor Details

    • CreateFlatpakMojo

      public CreateFlatpakMojo()
  • Method Details