io7m | single-page | multi-page | epub | Montarre User Manual 0.0.1
4.2. Goals
Previous
4.2. Goals
Up
5. Command Line
Next

# 4.2.1. package

- 4.2.1.1. Description
- 4.2.1.2. Configuration Parameters
  - 4.2.1.2.1. applicationKind
  - 4.2.1.2.2. categories
  - 4.2.1.2.3. copyright
  - 4.2.1.2.4. description
  - 4.2.1.2.5. flatpak
  - 4.2.1.2.6. humanName
  - 4.2.1.2.7. libraries
  - 4.2.1.2.8. license
  - 4.2.1.2.9. links
  - 4.2.1.2.10. longDescriptions
  - 4.2.1.2.11. mainModule
  - 4.2.1.2.12. outputFile
  - 4.2.1.2.13. packageName
  - 4.2.1.2.14. packageVersion
  - 4.2.1.2.15. platformLibraries
  - 4.2.1.2.16. requiredJDKVersion
  - 4.2.1.2.17. resources
  - 4.2.1.2.18. shortName
  - 4.2.1.2.19. vendor
- 4.2.1.3. Skipping

## 4.2.1.1. Description

1
The package goal produces a montarre package from the current module's dependencies.

## 4.2.1.2. Configuration Parameters

## 4.2.1.2.1. applicationKind

1
The applicationKind element specifies the kind of the application. Some operating systems distinguish between graphical and "console" applications, and some packaging standards such as Flatpak also require this information. The element must have one of the following values:

### 4.2.1.2.1.2. Application Kinds

- CONSOLE - The application does not have a graphical interface.
- GRAPHICAL - The application has a graphical interface.

### 4.2.1.2.1.3. Example

    <applicationKind>CONSOLE</applicationKind>

## 4.2.1.2.2. categories

1
The categories element specifies the categories for the application. The element must contain at least one category element. Each category must have text content matching one of the category values from the freedesktop.org category registry.

### 4.2.1.2.2.2. Example

    <categories>
      <category>Development</category>
      <category>Building</category>
    </categories>

## 4.2.1.2.3. copyright

1
The copyright element specifies a single-line copyright string.

### 4.2.1.2.3.2. Example

    <copyright>Copyright © 2024 Mark Raynsford &lt;code@io7m.com> https://www.io7m.com</copyright>

## 4.2.1.2.4. description

1
The description element specifies a single-line application description.
2
If this element is not provided, a value is inferred from the Maven POM's description element.

### 4.2.1.2.4.3. Example

    <description>Application packaging tools.</description>

## 4.2.1.2.5. flatpak

1
The flatpak element specifies a Flatpak parameters. The element accepts a runtimes element that specifies dependencies on Flatpak runtimes, and a permissions element that specifies Flatpak permissions that will be requested for the application.
2
If this element is not provided, a default Flatpak runtime is chosen, and no permissions are specified.

### 4.2.1.2.5.3. Example

    <flatpak>
      <runtimes>
        <runtime>
          <name>org.freedesktop.Sdk</name>
          <version>24.08</version>
          <role>SDK</role>
        </runtime>
        <runtime>
          <name>org.freedesktop.Platform</name>
          <version>24.08</version>
          <role>PLATFORM</role>
        </runtime>
      </runtimes>
      <permissions>
        <permission>--share=network</permission>
        <permission>--filesystem=home:rw</permission>
      </permissions>
    </flatpak>

## 4.2.1.2.6. humanName

1
The humanName element specifies a humanly-readable application name.

### 4.2.1.2.6.2. Example

    <humanName>Montarre</humanName>

## 4.2.1.2.7. libraries

1
The libraries element specifies rules for including and excluding dependencies and artifacts from being included in the resulting montarre package. The element can contain at most one includes element and at most one excludes element. When the Maven plugin is deciding whether to include an artifact in a package, it will compare the filename against each of the inclusion and exclusion patterns. If the file is matched by at least one inclusion filter, and not matched by any exclusion filter, then the file will be treated as included.
2
The includes element contains a list of include elements, each of which provides a regular expression against which the file names of artifacts are compared.
3
The excludes element contains a list of exclude elements, each of which provides a regular expression against which the file names of artifacts are compared.
4
If no libraries element is provided, the plugin acts as if all jar files are included, and nothing is specifically excluded.

### 4.2.1.2.7.5. Example

    <libraries>
      <excludes>
        <exclude>com\.io7m\.montarre\.cmdline-.*-main\.jar</exclude>
        <exclude>com\.io7m\.montarre\.distribution-.*</exclude>
        <exclude>maven-.*</exclude>
        <exclude>com\.io7m\.montarre\.maven_plugin-.*</exclude>
      </excludes>
    </libraries>

## 4.2.1.2.8. license

1
The license element specifies license information. In particular, the contents of the element must be an SPDX license identifier such as "ISC". If no license element is provided, the license identifier is inferred from the Maven POM's license element.

### 4.2.1.2.8.2. Example

    <license>ISC</license>

## 4.2.1.2.9. links

1
The links element specifies links to external resources. These links are used in many packaging systems to provide connections to source code repositories, issue trackers, and etc.
2
If no links element is provided, the plugin will make a best-effort attempt to extract links from the Maven POM's various elements.

### 4.2.1.2.9.3. Example

    <links>
      <link>
        <role>HOME_PAGE</role>
        <target>https://www.io7m.com/software/montarre/</target>
      </link>
      <link>
        <role>SCM</role>
        <target>https://www.github.com/io7m-com/montarre/</target>
      </link>
      <link>
        <role>ISSUES</role>
        <target>https://www.github.com/io7m-com/montarre/issues/</target>
      </link>
    </links>

## 4.2.1.2.10. longDescriptions

1
The longDescriptions element specifies longer descriptions of the application. Currently, this data is almost exclusively used for Flatpak applications. The text of long descriptions will be visible to users when published to services such as FlatHub.
2
The contents of the long description files must be XML long description elements.

### 4.2.1.2.10.3. Example

    <longDescriptions>
      <longDescription>src/main/meta/description-en.xml</longDescription>
    </longDescriptions>

### 4.2.1.2.10.4. Example Description

    $ cat src/main/meta/description-en.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <LongDescription xmlns="urn:com.io7m.montarre.package:1" Language="en">
      <Paragraph>
        The Montarre package provides a set of tools for producing native platform artifacts from platform-independent Java
        packages.
      </Paragraph>
    ...

## 4.2.1.2.11. mainModule

1
The mainModule element specifies the fully-qualified name of the entry point of the application. The syntax is the same as that expected by the java command: <module>/<mainclass>

### 4.2.1.2.11.2. Example

    <mainModule>com.io7m.montarre.cmdline/com.io7m.montarre.cmdline.MMain</mainModule>

## 4.2.1.2.12. outputFile

1
The outputFile element specifies the output file that will be created by the plugin. If not specified, this defaults to the artifact name, version, and a .mpk suffix.

### 4.2.1.2.12.2. Example

    <outputFile>com.io7m.montarre.cmdline-0.0.1.mpk</mainModule>

## 4.2.1.2.13. packageName

1
The packageName element specifies a globally-unique package name. This name must be in reverse DNS format conforming to the Lanark name specification.
2
In particular, this name is used to uniquely identify Flatpak applications and so cannot be changed after it has been published.

### 4.2.1.2.13.3. Example

    <packageName>com.io7m.montarre</packageName>

## 4.2.1.2.14. packageVersion

1
The packageVersion element specifies version information. It must have a number child element whose text content is the full semantic version of the application, and a date child element that indicates when the version number was set.
2
If no packageVersion element is specified, the number child element is set to the value of the Maven POM's version element, and the date child element is set to a fixed value of 2024-10-06 [1].

### 4.2.1.2.14.3. Example

    <version>
      <number>0.0.1</number>
      <date>2024-10-06</date>
    </version>

## 4.2.1.2.15. platformLibraries

1
The platformLibraries element is similar to the libraries element except that its purpose is to categorize matching artifacts as being platform-dependent. For example, an application might include native library jar files for a number of different platforms, and only the native library for the current platform should actually be placed on the module path when the application is run. The platformLibraries element allows for specifying rules that will mark each matching artifact with their hardware architecture and operating system.
2
The platformLibraries element contains zero or more platformLibrary elements that each specify a hardware architecture, operating system, and inclusion and exclusion patterns. It operates in the same manner as the libraries element except that, if an artifact is included by a pattern, that artifact is marked as having the hardware architecture and operating system of the platformLibrary element containing the pattern.
3
If no platformLibraries element is provided, no artifacts are marked as being platform-dependent.

### 4.2.1.2.15.4. Example

    <platformLibraries>
      <platformLibrary>
        <architecture>x86_64</architecture>
        <operatingSystem>linux</operatingSystem>
        <includes>
          <include>lwjgl-natives-linux-amd64\.jar</include>
        </includes>
      </platformLibrary>
      <platformLibrary>
        <architecture>aarch64</architecture>
        <operatingSystem>linux</operatingSystem>
        <includes>
          <include>lwjgl-natives-linux-aarch64\.jar</include>
        </includes>
      </platformLibrary>
      <platformLibrary>
        <architecture>x86_64</architecture>
        <operatingSystem>windows</operatingSystem>
        <includes>
          <include>lwjgl-natives-windows-amd64\.jar</include>
        </includes>
      </platformLibrary>
      <platformLibrary>
        <architecture>aarch64</architecture>
        <operatingSystem>windows</operatingSystem>
        <includes>
          <include>lwjgl-natives-windows-aarch64\.jar</include>
        </includes>
      </platformLibrary>
    </platformLibraries>

## 4.2.1.2.16. requiredJDKVersion

1
The requiredJDKVersion element specifies the minimum Java version required to run the application.

### 4.2.1.2.16.2. Example

    <requiredJDKVersion>21</requiredJDKVersion>

## 4.2.1.2.17. resources

1
The resources element specifies metadata resources that will be included in the application package. The resources element contains zero or more resource elements that each specify a role, a file, and an entry name.

### 4.2.1.2.17.2. Example

    <resources>
      <resource>
        <role>BOM</role>
        <file>/home/runner/work/montarre/montarre/com.io7m.montarre.documentation/target/bom.xml</file>
        <entryName>bom.xml</entryName>
      </resource>
      <resource>
        <role>ICON_16</role>
        <file>/home/runner/work/montarre/montarre/com.io7m.montarre.documentation/src/main/meta/icon16.png</file>
        <entryName>icon16.png</entryName>
      </resource>
      <resource>
        <role>ICON_24</role>
        <file>/home/runner/work/montarre/montarre/com.io7m.montarre.documentation/src/main/meta/icon24.png</file>
        <entryName>icon24.png</entryName>
      </resource>
      <resource>
        <role>ICON_32</role>
        <file>/home/runner/work/montarre/montarre/com.io7m.montarre.documentation/src/main/meta/icon32.png</file>
        <entryName>icon32.png</entryName>
      </resource>
      <resource>
        <role>ICON_48</role>
        <file>/home/runner/work/montarre/montarre/com.io7m.montarre.documentation/src/main/meta/icon48.png</file>
        <entryName>icon48.png</entryName>
      </resource>
      <resource>
        <role>ICON_64</role>
        <file>/home/runner/work/montarre/montarre/com.io7m.montarre.documentation/src/main/meta/icon64.png</file>
        <entryName>icon64.png</entryName>
      </resource>
      <resource>
        <role>ICON_128</role>
        <file>/home/runner/work/montarre/montarre/com.io7m.montarre.documentation/src/main/meta/icon128.png</file>
        <entryName>icon128.png</entryName>
      </resource>
      <resource>
        <role>ICO_WINDOWS</role>
        <file>/home/runner/work/montarre/montarre/com.io7m.montarre.documentation/src/main/meta/icon.ico</file>
        <entryName>icon.ico</entryName>
      </resource>
      <resource>
        <role>LICENSE</role>
        <file>/home/runner/work/montarre/montarre/com.io7m.montarre.documentation/../README-LICENSE.txt</file>
        <entryName>license.txt</entryName>
      </resource>
    </resources>

## 4.2.1.2.18. shortName

1
The shortName element specifies the shortened name of the package. This is used in a number of places. For example, the executable produced by jpackage when producing an app-image will be named according to the short name. Additionally, packaging systems such as Debian packages will use the short name instead of the package name due to being unable to support reverse DNS notation.

### 4.2.1.2.18.2. Example

    <shortName>montarre</requiredJDKVersion>

## 4.2.1.2.19. vendor

1
The vendor element specifies information about the vendor of the package. It must contain an id element specifying the globally unique, reverse DNS identifier of the vendor, and a name element specifying a filesystem-safe vendor name. Some packaging systems will use the vendor name as a directory name, so the name must be limited to short, filesystem-safe names. A sensible approach for vendor IDs is to use a prefix of your Maven group name (or perhaps just the entire group name if you use the same group name in every project).

### 4.2.1.2.19.2. Example

    <vendor>
      <id>com.io7m</id>
      <name>io7m</name>
    </vendor>

## 4.2.1.3. Skipping

1
The plugin execution can be skipped by setting the montarre.skip property to true.

## Footnotes

1 | A fixed date value is used in order to avoid making builds non-reproducible by inserting a varying date value into packages. References to this footnote: 1

4.2. Goals
Previous
4.2. Goals
Up
5. Command Line
Next
io7m | single-page | multi-page | epub | Montarre User Manual 0.0.1