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
FieldsModifier and TypeFieldDescriptionprivate 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.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 -
Method Summary
Modifier and TypeMethodDescriptionprivate void
buildAndSignRepo
(ExceptionHandler exceptionHandler, File targetDir) void
execute()
private void
executeProcess
(ExceptionHandler exceptionHandler, List<String> args, File targetDir) private void
executeProcessOnRemoteServer
(HttpClient httpClient, HttpRequest request) private String
fetchGpgKey
(ExceptionHandler exceptionHandler) private void
generateManifest
(File targetDir) private void
generateRefFiles
(String armouredGpgKey) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
id
A unique identifier for the Flatpak application, for example: "org.eclipse.Platform"- Since:
- 1.1.5
-
flatpakId
-
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
A short description of the Flatpak application that may be shown in distro software centres and in desktop environments.- Since:
- 1.1.5
-
description
A longer description of the Flatpak application that may be shown in distro software centres.- Since:
- 1.1.5
-
maintainer
An optional email address that can be used to contact the project about invalid or incomplete metadata.- Since:
- 1.1.5
-
screenshots
An optional list of URLs to screenshots that may be shown in distro software centres.- Since:
- 1.1.5
-
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
The filename or path to the main binary of the application, defaults to "eclipse"- Since:
- 1.1.5
-
runtimeVersion
The version of the Gnome runtime on which to build the Flatpak application. Defaults to "3.28"- Since:
- 1.1.5
-
source
An.tar.gz
or.zip
file containing a Linux product from which to generate a Flatpak application.- Since:
- 1.1.5
-
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
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
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
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 repositoryUrlThe 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 skipSkips the execution of this plugin.- Since:
- 1.1.5
-
continueOnFail
@Parameter(property="cbi.flatpakager.continueOnFail", defaultValue="false") private boolean continueOnFailWhether the build should be stopped if the packaging process fails.- Since:
- 1.1.5
-
sign
@Parameter(property="cbi.flatpakager.sign", defaultValue="false") private boolean signWhether the Flatpak application should be GPG signed.- Since:
- 1.1.5
-
gpgKey
The GPG key to use when signing the Flatpak application.- Since:
- 1.1.5
-
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
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 timeoutMillisDefines 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 aserviceUrl
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
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
fetchGpgKey
private String fetchGpgKey(ExceptionHandler exceptionHandler) throws IOException, org.apache.maven.plugin.MojoExecutionException - Throws:
IOException
org.apache.maven.plugin.MojoExecutionException
-
generateManifest
- Throws:
IOException
-
buildAndSignRepo
private void buildAndSignRepo(ExceptionHandler exceptionHandler, File targetDir) throws InterruptedException, IOException, org.apache.maven.plugin.MojoExecutionException - Throws:
InterruptedException
IOException
org.apache.maven.plugin.MojoExecutionException
-
generateRefFiles
- Throws:
IOException
-
executeProcess
private void executeProcess(ExceptionHandler exceptionHandler, List<String> args, File targetDir) throws InterruptedException, IOException, org.apache.maven.plugin.MojoExecutionException - Throws:
InterruptedException
IOException
org.apache.maven.plugin.MojoExecutionException
-
executeProcessOnRemoteServer
private void executeProcessOnRemoteServer(HttpClient httpClient, HttpRequest request) throws IOException - Throws:
IOException
-