io7m | single-page | multi-page | Montarre User Manual 1.0.0-SNAPSHOT
5.3. maven-central download
Previous
5. Command Line
Up
5.5. native packagers
Next

# 5.4. native create

- 5.4.1. Name
- 5.4.2. Description
- 5.4.3. Parameters
- 5.4.4. Examples

## 5.4.1. Name

1
native create - Create native packages.

## 5.4.2. Description

1
The native create command creates native packages using every supported native packager on the current system.
2
Most native packagers require embedding a Java runtime. It is necessary to specify a runtime that will downloaded as part of producing native packages. There are currently two mutually exclusive options for this:

### 5.4.2.3. Runtimes

- Use the --java-runtime-download-uri parameters to specify the address of a runtime. If this parameter is specified, then it is also necessary to specify the --java-runtime-format and --java-runtime-sha256 parameters.
- Use the --adoptium-temurin-version parameter to specify an Eclipse Adoptium release. This will cause a runtime with a matching version to be downloaded using the Adoptium API.

4
As Java runtime packaging formats differ between platforms (Windows uses .zip archives, POSIX platforms use .tar.gz), and because hash values will be different for every runtime on every platform, it is generally preferable to use the Adoptium API. The API provides checksum values for integrity checking, and published artifacts are immutable, so reproducibility is not affected. The downside to using the Adoptium API is that the API does not keep runtime versions visible indefinitely, so older version numbers might disappear from the API as new runtimes are released.
5
The command will run every supported native packager unless the --include-packagers option is used to limit execution to only the named packagers.

## 5.4.3. Parameters

### 5.4.3.1. --adoptium-temurin-version

Attribute | Value
--- | ---
Name | --adoptium-temurin-version
Type | java.lang.Runtime.Version
Default Value |
Cardinality | [0, 1]
Description | The version of the Adoptium Temurin runtime to use.

### 5.4.3.2. --include-packagers

Attribute | Value
--- | ---
Name | --include-packagers
Type | java.lang.String
Default Value | []
Cardinality | [0, N]
Description | Only run the named packagers.

### 5.4.3.3. --java-runtime-download-uri

Attribute | Value
--- | ---
Name | --java-runtime-download-uri
Type | java.net.URI
Default Value |
Cardinality | [0, 1]
Description | The location for a Java runtime.

### 5.4.3.4. --java-runtime-format

Attribute | Value
--- | ---
Name | --java-runtime-format
Type | com.io7m.montarre.api.MArchiveFormat
Default Value |
Cardinality | [0, 1]
Description | The format of the Java runtime archive.

### 5.4.3.5. --java-runtime-sha256

Attribute | Value
--- | ---
Name | --java-runtime-sha256
Type | java.lang.String
Default Value |
Cardinality | [0, 1]
Description | The SHA-256 of the Java runtime.

### 5.4.3.6. --output-directory

Attribute | Value
--- | ---
Name | --output-directory
Type | java.nio.file.Path
Default Value |
Cardinality | [1, 1]
Description | The output directory.

### 5.4.3.7. --package

Attribute | Value
--- | ---
Name | --package
Type | java.nio.file.Path
Default Value |
Cardinality | [1, 1]
Description | The input package.

### 5.4.3.8. --verbose

Attribute | Value
--- | ---
Name | --verbose
Type | com.io7m.quarrel.ext.logback.QLogLevel
Default Value | info
Cardinality | [1, 1]
Description | Set the logging level of the application.

### 5.4.3.9. --work-directory

Attribute | Value
--- | ---
Name | --work-directory
Type | java.nio.file.Path
Default Value |
Cardinality | [1, 1]
Description | The work directory.

## 5.4.4. Examples

### 5.4.4.1. Example

    $ montarre native create \
      --verbose info \
      --package com.io7m.montarre.distribution/target/com.io7m.montarre.distribution-0.0.1-SNAPSHOT.mpk \
      --work-directory /tmp/work0 \
      --output-directory /tmp/work0-output \
      --java-runtime-download-uri https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.4%2B7/OpenJDK21U-jdk_x64_linux_hotspot_21.0.4_7.tar.gz \
      --java-runtime-sha256 51fb4d03a4429c39d397d3a03a779077159317616550e4e71624c9843083e7b9 \
      --java-runtime-format TAR_GZ
    INFO com.io7m.montarre.cmdline.internal.MCNativeCreate: Opening package com.io7m.montarre.distribution/target/com.io7m.montarre.distribution-0.0.1-SNAPSHOT.mpk.
    INFO com.io7m.montarre.cmdline.internal.MCNativeCreate: Creating output directory /tmp/work0-output
    INFO com.io7m.montarre.cmdline.internal.MCNativeCreate: Creating workspace /tmp/work0.
    INFO com.io7m.montarre.cmdline.internal.MCNativeCreate: Workspace architecture: x86_64
    INFO com.io7m.montarre.cmdline.internal.MCNativeCreate: Workspace OS: linux
    ...

    $ ls -alF /tmp/work0-output/
    total 187632
    drwxr-xr-x  2 montarre   montarre        120 Oct 13 12:13 ./
    drwxrwxrwt 29 root       root            840 Oct 13 12:12 ../
    -rw-r--r--  1 montarre   montarre    4138851 Oct 13 12:13 com.io7m.montarre-0.0.1-SNAPSHOT-any.txz
    -rw-r--r--  1 montarre   montarre   81923503 Oct 13 12:11 com.io7m.montarre-0.0.1-SNAPSHOT-x86_64-linux.txz
    -rw-r--r--  1 montarre   montarre   52665048 Oct 13 12:13 com.io7m.montarre.flatpak
    -rw-r--r--  1 montarre   montarre   53400220 Oct 13 12:11 montarre-0.0.1-SNAPSHOT-x86_64-linux.deb

5.3. maven-central download
Previous
5. Command Line
Up
5.5. native packagers
Next
io7m | single-page | multi-page | Montarre User Manual 1.0.0-SNAPSHOT