Publishing

A build ends at artifacts under target/. Publishing is what makes them available to somebody else: the artifacts laid out as a repository, carrying the metadata a repository demands, and finally uploaded and signed. Publishing to Maven Central is really two jobs - produce a correct, complete bundle and upload it - and Jenesis owns the first while deliberately leaving the signed upload to a dedicated release tool. A repository of your own, which takes an unsigned upload, Jenesis releases into by itself.

Publishing locally with export

Another project on the same machine can require a module only once it has been exported: a build writes under its own target/, which no other project reads. export builds the project, stages the release tree that the next section describes, and copies it into the local repositories:

java build/jenesis/Make.java export
  • The maven layout exports only the Maven artifacts, into the local Maven repository (~/.m2/repository), under <group>/<artifact>/<version>/. Maven, and Gradle through mavenLocal(), consume them from there.
  • The modular layout exports only the modules, into the local module repository (~/.jenesis), under <module>/<version>/. Every export also refreshes <module>/<module>.jar, which holds the latest one.
  • modular_to_maven, the default, exports both, so one export is consumed everywhere: by a POM-based project of any build tool through the local Maven repository, and by a Jenesis project that requires the module by name through the local module repository.

A project that sets no version exports an unversioned module, whose POM carries 0-SNAPSHOT. Another project requires the module by name, and the local repositories are read before any remote: without a pin it takes the latest export, with a pinned version that version's build. A consumer does not notice a new export on its own; it takes one when it is rebuilt with -Djenesis.executor.rebuild=true.

Staging the release tree

The stage target materialises the full release tree in Maven repository layout under target/stage/maven/output/: the main jar, the POM, and - when you ask for them - the -sources.jar and -javadoc.jar that Central demands. You enable those and set the version from the command line:

java -Djenesis.project.version=1.0.0 \
     -Djenesis.project.sources=true \
     -Djenesis.project.documentation=true \
     build/jenesis/Make.java stage

javac stamps the version into what it compiles as the module version, so it must be one: a version that starts with a digit, as 1.2.0 or 1.2.0-3-gbd7698f. Any other value, such as v1.2.0, is refused before the build starts, and so is an empty one: an unversioned build leaves the setting out. A project built from module-info.java may keep its version as version=<version> in project.properties at the root instead, and the setting overrides it for a release.

Central requires the -javadoc.jar but not that it documents anything, and rendered documentation can make up most of a release's size. With -Djenesis.documentation.empty=true, the jar is still staged but holds nothing but a file named INTENTIONALLY_EMPTY, and no documentation tool runs.

A module that holds nothing to publish, such as one of integration tests, says so in the packaging.properties of its own configuration folder:

# build.jenesis/packaging.properties of that module
stage=false

It is built and tested, but its jar and POM are not staged and no sources, documentation or packages are assembled for it, so neither export nor release ships it. A test module is unstaged the same way unless -Djenesis.stage.tests=true stages it. The line works in every layout. A pom.xml module's maven.deploy.skip and maven.install.skip are not read, so a module that sets them states the same with this line.

Central also requires the POM to carry name, description, url, <licenses>, <developers>, and <scm>. Jenesis folds two channels into each POM. Everything it can derive from the source comes first: the coordinate from the module name, and the name and description from its Javadoc, or all three from the source pom.xml. The first sentence of the module's documentation comment is its name, and the comment's second paragraph its description, each reduced to plain text: HTML, <!-- --> comments, {@code} and {@link} markup give way to the words they mark, and a third paragraph is left for the reader of the source.

A Markdown comment (///) keeps its inline markup: `code` and **emphasis** reach the name and the description as written, and only a link is reduced to its label. The JDK renders Markdown in its javadoc tool alone, so a build has no Markdown to plain text conversion to call.

A project.properties file at the project root carries only what a module declaration cannot express. Jenesis reads it when it is there; -Djenesis.project.metadata names other files instead, and an empty value reads none:

# project.properties
url=https://github.com/jenesis/jenesis
license.apache-2_0.name=Apache-2.0
license.apache-2_0.url=https://www.apache.org/licenses/LICENSE-2.0.txt
developer.raphw.name=Rafael Winterhalter
developer.raphw.email=rafael.wth@gmail.com
scm.connection=scm:git:https://github.com/jenesis/jenesis.git
scm.url=https://github.com/jenesis/jenesis
organization.name=Example Ltd
organization.url=https://example.com
copyright=Copyright 2026 Example Ltd
manufacturer.name=Example Ltd
manufacturer.url=https://example.com
publisher=Example Ltd

organization.name and organization.url become the POM's <organization>, and a source pom.xml supplies them from its own <organization>. copyright has no place in a POM; it is taken as written into the SBOM and an installer, and no year is added to it. manufacturer.name, manufacturer.url and publisher have no place in a POM either and are recorded in the SBOM alone. Every one of these keys is optional, and nothing is recorded for a key the project does not declare.

A developer is published with its key as the POM's <id>, raphw above. developer.<key>.id names another id, or none when it is empty. A source pom.xml developer that declares no <id> is published without one, and one that declares nothing but its <id> is kept as well.

inceptionYear becomes the POM's <inceptionYear>, and license.<id>.distribution the <distribution> of that licence, as repo or manual.

A developer may also carry developer.<key>.url, organization, organizationUrl, timezone and roles, the roles comma-separated, and the POM's <issueManagement> and <ciManagement> come from issueManagement.system and issueManagement.url, and ciManagement.system and ciManagement.url:

developer.raphw.roles=maintainer
issueManagement.system=GitHub
issueManagement.url=https://github.com/jenesis/jenesis/issues

A source pom.xml supplies all of these from its own elements, and from its parents where it declares none.

In a pom.xml project, a module inherits its description, URL, inception year, licences, developers, organisation, SCM, issue management and CI management from its parents, local or fetched, as Maven's model does. The URL and the SCM locations get the module's artifact ID appended, unless the parent sets child.project.url.inherit.append.path="false" on its <project>, or the matching child.scm.*.inherit.append.path on its <scm>; licences and developers are inherited only as a whole. What a module declares or inherits wins, and project.properties fills in only what the POMs leave out. The version, tag, revision and tree given as settings win over both.

In a project built from module-info.java, the coordinate follows from the module name: its first two segments form the group ID (jenesis.maven.segments) and the whole name is the artifact ID. project=<groupId> and artifact=<artifactId> in project.properties replace them for every module. A module that must keep a coordinate of its own, such as one it was published under before, declares it in a project.properties of its own, in the META-INF/build.jenesis/ folder beside its sources. That file is layered over the root one and wins for every key it names, the metadata above included.

The jar carries the POM it is published with as well, at META-INF/maven/<groupId>/<artifactId>/pom.xml, beside a pom.properties that holds its groupId, artifactId and version - where Maven places them in every jar it builds. Tools that find a jar inside an image or an archive identify it by these files: a scanner such as Syft, or GraalVM's own SBOM of a native image. The POM is generated before the jar is packed so that both carry the same one, and a module under the modular layout, which has no Maven coordinate, carries neither. -Djenesis.maven.embed=false leaves both out of the jar.

A staged bundle is reproducible: jar entries carry a fixed timestamp, the manifest records Created-By: Jenesis rather than the JDK that ran the build, and Javadoc is generated with -notimestamp, so two independent builds of the same sources hash bit-for-bit identically - a consumer can verify the bytes on Central were built from the published sources. Declare your own Created-By and it is kept.

What the published POM names

A published POM names what the module declares, each dependency at the version the build resolved, and a consumer finds the rest through those dependencies' own POMs. Every other version the module's class paths resolved is listed in its <dependencyManagement>, the runtime class path's version ahead of the compile class path's. A consumer that builds with Maven 4 applies a dependency's management to that dependency's own dependencies, so it resolves the versions the module was built and tested with. Maven 3 and Gradle do not apply it, and settle every version beneath as they settle any other: a version they override takes the dependencies of that version with it.

A pom.xml module publishes every dependency it declares but those of test scope, with their <optional> and <exclusions>. A module declaration publishes each module it requires as the Maven artifact that module resolved to, a sibling module as its published coordinate:

In module-info.java In the published POM
requires a dependency of compile scope
requires static a dependency of provided scope
@jenesis.exclude the <exclusions> of the dependency it names
@jenesis.override no dependency for the overridden module, and an exclusion of each artifact the override dropped on every dependency

Nothing is published as optional. A requires that resolved to no Maven artifact has nothing to be named by, so the build fails and names the @jenesis.alias that gives it one.

Pointing a release at its sources

The repository URL says where a project lives, not which revision a release was built from. Three properties say that: jenesis.project.revision names the revision, for Git the commit id; jenesis.project.tag names the tag the release carries, if it has one; and jenesis.project.tree names the Git tree of that revision, which identifies the content of the whole repository independently of its history. Pass them on the command that stages the release:

java -Djenesis.project.version=1.0.0 \
     -Djenesis.project.tag=v1.0.0 \
     -Djenesis.project.revision=$(git rev-parse HEAD) \
     -Djenesis.project.tree=$(git rev-parse HEAD^{tree}) \
     build/jenesis/Make.java stage

A GitHub Actions workflow has the first two at hand: ${{ github.sha }} is the commit the run builds, and ${{ github.ref_name }} is the tag when a pushed tag started the run. The tree comes from the checkout.

- run: >
    java -Djenesis.project.tag=${{ github.ref_name }}
    -Djenesis.project.revision=${{ github.sha }}
    -Djenesis.project.tree=$(git rev-parse HEAD^{tree})
    build/jenesis/Make.java stage

Neither value is derived: projects name their tags differently, so the tag is not guessed from the version. A value that does not change from release to release can also be declared in project.properties, as scm.tag, scm.revision or scm.tree, and a source pom.xml contributes the <tag> of its <scm>. A property takes precedence over a declared value, and an empty property, such as -Djenesis.project.tag=, records nothing even when a value is declared.

The tag becomes the <tag> of the POM's <scm>; the POM has no element for a revision or a tree. The SBOM records the tag and the revision as the jenesis:scm:tag and jenesis:scm:revision properties of the project's component, and the tree in the component's swhid field, as the SWHID swh:1:dir:<tree>; a tree that is not a 40-character Git tree id fails the build. When scm.connection names a URL, such as scm:git:https://github.com/jenesis/jenesis.git, the SBOM also carries a vcs reference that locates the sources at the revision, or at the tag when no revision is given, in the notation SPDX uses for a download location: git+https://github.com/jenesis/jenesis.git@<revision>. A tag of HEAD, which a pom.xml declares for the root of its repository, counts as no tag there.

Publishing variants of a jar

Some libraries publish more than one jar under their coordinate: the jar itself, and variants told apart by a classifier, each adding what one platform needs, such as a native library. A classifiers.properties in a module's configuration folder declares them, one line per classifier naming the folders whose files the variant adds to the module's jar:

platform-a=../variants/platform-a,library/platform-a
legacy=

A variant is the module's jar plus those files, each at its path inside its folder, so variants/platform-a/variant.txt becomes variant.txt. A META-INF/MANIFEST.MF among them is merged over the jar's manifest, its value winning for each attribute it names. A variant only adds: a file the jar holds already fails the build. A line naming no folder, as legacy=, publishes the jar as it is under that classifier. tests, sources and javadoc are the build's own and cannot be declared.

stage lays each variant out beside the jar, in both trees:

target/stage/modular/output/demo.natives/demo.natives-platform-a.jar
target/stage/maven/output/demo/natives/demo.natives/0-SNAPSHOT/demo.natives-0-SNAPSHOT-platform-a.jar

export and a release to a Maven repository publish the variants with the rest of the Maven tree. A release into a Jenesis module repository puts each module's jar alone, so the variants stay in the staged tree.

Folders a plugin writes

A folder is named from the module's folder and must lie inside the project. A name the project does not hold is the folder a plugin of the module wrote, named as the plugin writes it in its own output. That is how a variant carries a native library: a plugin at binary/compiled runs cargo, cmake or make and writes the library as library/linux-x86_64/libnatives.so, and the line linux-x86_64=library/linux-x86_64 adds it to the variant as libnatives.so. The module's own jar does not hold it. A name that is both a folder of the project and one a plugin wrote gives the variant the files of both, refusing a file the two share; a name neither provides fails the build when the variant is made. The compiler is the one installed on the machine, as it is for Maven and Gradle.

One variant per platform

Kept in a profile's folder, such as META-INF/build.jenesis/linux-x86_64/, the file decides which variants a machine builds: activating the profile builds that platform's variant, and an empty classifiers.properties declares none. A release that gathers several platforms builds each on a machine of its own. A module of the same build selects a variant by its classifier, which then takes the jar's place on every path that module is built and run with.

Publishing a bill of materials

A module can also publish the pin set of its own resolved closure, so a downstream project imports the versions this one was built and tested against instead of curating its own. It is the emitting counterpart of the bills of materials you already know how to consume.

A bom.properties file in the configuration folder switches it on - the file may be empty, presence is the switch. The modular layouts then render the module's closure as a properties file that export publishes into the local module repository beside the module jar:

~/.jenesis/demo.bom/1.0.0/demo.bom.properties

Another project consumes it with @jenesis.bom demo.bom, exactly the way it consumes a hand-written file. The BOM travels through the module layout only; the Maven export never carries it.

A Maven BOM from a pom.xml

In a pom.xml project, a bill of materials is a module of <packaging>pom</packaging> that lists no modules but declares a <dependencyManagement>, as a library's -bom does. Nothing is compiled for it, and stage publishes it as its POM alone, beside the jars:

target/stage/maven/output/build/jenesis/demo/bom/1.0.0/bom-1.0.0.pom

The staged POM carries the BOM's coordinate, packaging and metadata, and its own <dependencyManagement> with every ${...} resolved. It names no parent and leaves out the parent's managed versions, since an aggregator is not published. export installs it and release publishes it like any staged POM, unless stage=false in a packaging.properties of its own configuration folder, such as bom/build.jenesis/, keeps it out of the staged repositories, as it keeps a module's jar.

Relocating a former coordinate

When an artifact moves to another coordinate, a module at the old one can declare where it went, so builds that still depend on it are sent on:

<distributionManagement>
  <relocation>
    <artifactId>greeter</artifactId>
  </relocation>
</distributionManagement>

Such a module is published as its POM alone, the relocation kept, whatever its packaging. What the relocation leaves out - here the group ID and the version - stays that of the module itself, as Maven reads it. A module that relocates its artifact and also holds sources fails the build, since nothing would compile them.

Building a Maven or Gradle plugin

A plugin for another build tool is an ordinary jar with a descriptor that tool reads. Jenesis compiles the jar like any other, and an official plugin adds what the other tool looks the plugin up by.

A Maven plugin

A module becomes a Maven plugin when its configuration folder holds a mavenplugin.properties, which may be empty. The mojos are written as for maven-plugin-plugin, against maven-plugin-api and maven-plugin-annotations, which a pom.xml declares in scope provided and a module-info.java by requires static. The module keeps the packaging jar, as Maven reads a plugin from its descriptor alone.

# src/main/build.jenesis/mavenplugin.properties
goalprefix=greet

Maven's own plugin tools then write META-INF/maven/plugin.xml and its plugin-help.xml into the module's classes. The descriptor names each goal, its parameters, their properties and defaults, with descriptions taken from the javadoc of the mojos and their fields. A dependency the module compiles against alone is provided by Maven and left out of the descriptor's dependencies. The staged jar installs into a Maven repository as it stands, and Maven runs its goals:

mvn demo:greet-maven-plugin:1.0:hello -Dgreet.name=Jenesis
Value Meaning
goalprefix The prefix a goal is called by, as greet in greet:hello; by default the one Maven derives from the artifact ID.
maven The release of Maven whose API the descriptor is generated with, 3.9.11 by default.
tools The release of Maven's plugin tools, 3.15.1 by default.

Any other value is refused, and -Djenesis.artifact.mavenplugin=false switches the descriptor off.

A Gradle plugin

A Gradle plugin is a jar that names each plugin it implements by a META-INF/gradle-plugins/<id>.properties among its resources. It compiles against the Gradle API in scope provided, or by requires static. Gradle publishes no API to Maven Central, so a module compiles against the community build dev.gradleplugins:gradle-api.

# src/main/resources/META-INF/gradle-plugins/demo.greet.properties
implementation-class=demo.greet.GreetPlugin

A build that puts the jar on its buildscript class path applies the plugin by that ID. Gradle's plugins block finds an ID through a marker instead, the artifact <id>:<id>.gradle.plugin: a POM that depends on the jar. An empty gradleplugin.properties in the project's configuration folder stages that marker beside the jar, for every plugin a staged jar declares:

target/stage/maven/output/demo/greet/demo.greet.gradle.plugin/1.0/demo.greet.gradle.plugin-1.0.pom

The marker carries the name, description, URL, licences, developers and SCM of the jar's own POM, as Maven Central requires of every artifact, so export and release ship it with the jar. A Gradle build that names that repository in pluginManagement then applies the plugin with plugins { id 'demo.greet' version '1.0' }.

The file takes no values. An ID that is not a valid plugin ID, one in a namespace Gradle reserves (org.gradle, com.gradleware), a descriptor naming no implementation-class or a class its jar does not hold, and an ID two jars declare each fail the build. Publishing to the Gradle Plugin Portal takes the portal's own tooling. -Djenesis.artifact.gradleplugin=false switches the markers off.

Converting the project's AsciiDoc documents

An asciidoctor.properties in the project's configuration folder converts the project's AsciiDoc documents to HTML with Asciidoctor and stages them beside its modules. It names the folder of documents as documents, relative to itself, and properties without that line fail the build naming it:

# build.jenesis/asciidoctor.properties
documents=../docs
attribute.product-name=Greeter

The documents are converted once for the whole project, after every module is built, and staged under target/stage/project/output/docs/. Every .adoc file keeps its folder, so docs/guide/getting-started.adoc becomes docs/guide/getting-started.html, and an xref: between two documents links them. A file or folder whose name starts with _ is a partial, which a document includes and which is never converted on its own. Every other file, an image or a stylesheet, is copied as it stands.

Value Meaning
attribute.<name> An AsciiDoc attribute every document reads, as {product-name} reads the line above.
backend html5, the default, or docbook5.
output The folder below target/stage/project/output/ the documents go to, docs by default.

Any other key fails the build. The documents alone switch nothing on, so .adoc files kept for another tool stay untouched, and a project laid out for the Maven or Gradle plugins of Asciidoctor names documents=../src/docs/asciidoc. The HTML names neither the time nor the Asciidoctor version, so two builds stage the same bytes, and a document that includes a file that does not exist fails the build. -Djenesis.documentation.asciidoctor=false switches the conversion off. export, and the repositories a release puts into, take the staged Maven and module trees only, so the documents stay in the staged tree for a release plugin to publish.

Signing the jar itself

There are two signatures around a published jar, and they answer different questions. The detached one the next section covers travels beside the artifact and says who published it. The other lives inside the archive: jarsigner, the JDK's own signer, writes a manifest of digests and a signature block into the jar, which a JVM can check as it loads the classes.

Naming a key store turns it on:

jenesis.jarsigner.keystore     the key store to sign with
jenesis.jarsigner.alias        the key within that store
jenesis.jarsigner.storepass    where the store's password is read from
jenesis.jarsigner.keypass      the same, where the key has a password of its own
jenesis.jarsigner.storetype    the JDK's own default otherwise, normally PKCS12
jenesis.jarsigner.tsa          a timestamp authority, so a signature outlives the certificate
jenesis.jarsigner.arguments    anything else jarsigner accepts

These are properties rather than a configuration file because where the key is and what unlocks it differ between a laptop, a release machine and a CI runner, and a developer without the key still has to be able to build. They belong to the machine that signs: a project's jenesis.properties or profile that sets any of them is refused, since a file travelling with the sources would decide which key a build reaches for and which file a password is read from. A machine holds them once, for everything built on it:

# ~/.jenesis/jenesis.properties
jenesis.jarsigner.keystore=/home/me/.keys/signing.p12
jenesis.jarsigner.alias=me
jenesis.jarsigner.storepass=file /home/me/.keys/signing.pass

and a release runner names them for one run, where a -D wins over that file:

java -Djenesis.jarsigner.keystore=/etc/jenesis/release.p12 \
     -Djenesis.jarsigner.alias=release \
     -Djenesis.jarsigner.storepass=env JENESIS_KEYSTORE_PASSWORD \
     build/jenesis/Make.java

Naming any of those keys says the project signs its jar. Saying that and then leaving the key store, the alias or the password location unnamed stops the build rather than producing an unsigned jar - a release that shipped unsigned because a runner forgot a flag is the one outcome worth refusing. A project that names none of them does not sign.

A password is never a value, not even a property value. storepass and keypass take a location in jarsigner's own grammar - env <variable> or file <path> - and anything else fails the build naming the two forms; a password passed as -D would otherwise stand in the process list of the machine that runs the build. The key store itself is referenced by path and never copied into target/, so no private key reaches the build tree or a shared build cache.

Signing is part of producing the artifact rather than a step after it: the signer reads the jar the archiver wrote and writes the signed jar in its place, so the unsigned jar never leaves the toolchain. The module's inventory, both staged repositories, an export and a publication all see only the signed jar - and a detached signature made afterwards covers the signed bytes.

The step re-runs when the jar changes or when any of those settings change. It does not hash the key store's contents, so replacing the key behind an unchanged path does not by itself invalidate the step: delete target/ after a key rotation.

Rehearsing and publishing a release

release is a dry run unless the command line asks for more. It stages, checks what it would release and names each file it would put, and runs the plugins of release dry, JReleaser with --dry-run, so no repository receives anything:

[DRY RUN]   https://repo.example.com/.../com/example/library/1.0.0/library-1.0.0.jar

-Djenesis.release.publish=true makes the same run publish. Only the command line may pass it: jenesis.properties, a profile and your own ~/.jenesis/jenesis.properties refuse it, so no file makes every release publish. A dry release needs no network and checks what a real one would refuse, a missing version or a plaintext address among them.

Because a release is dry unless asked otherwise, pin runs one as well. It runs last, after stage and a dry release, so the tool a plugin of release resolves is pinned with the rest.

Releasing into a Jenesis module repository

A destination the tool publishes to by itself is a Jenesis module repository, the layout a modular build resolves module names from. export reaches one machine; once jenesis.release.uri names a repository, release puts each staged module there as its release/jenesis step, for every machine that resolves from it. A jenesis repository of a Jenesis Repository takes that release and serves the layout, at the same address a build names in jenesis.module.uri:

java -Djenesis.project.version=1.0.0 \
     -Djenesis.release.uri=https://repo.example.com/repository/releases/<repo>/ \
     -Djenesis.release.token=<key> \
     -Djenesis.release.publish=true \
     build/jenesis/Make.java release

Each module is put once: its jar, under its version, at module/<module>/<version>/<module>.jar below that address. What is staged beside the jar, such as the -sources.jar or the POM, stays in the staged tree. A project whose jenesis.module.uri names the same address then resolves the module by its name at that version. release does this in the modular and modular_to_maven layouts, and refuses to run in the maven layout, which stages no modular tree.

A release needs a version: a module staged without one, as when jenesis.project.version is not set, fails the release, dry or not, before anything is put into the repository, and so does a module staged at more than one version.

The key is sent as the Authorization header, exactly as given. Where the settings are not given, a release reads the JENESIS_RELEASE_URI and JENESIS_RELEASE_TOKEN environment variables - never the variables naming the repositories a build resolves from, so a CI job keeps its release key apart from the key it reads with. The key is a credential: only the command line, ~/.jenesis/jenesis.properties or the environment may name it, and it is never sent to a repository that a file of the project named, so a project that names its own release address in jenesis.properties releases without a key. A plaintext http: address is refused unless -Djenesis.repository.insecure=true allows it.

A project that publishes to Maven does not need this step to reach module consumers: a java repository of a Jenesis Repository takes Maven publishes only, and makes a module available from one. A modular jar deployed to its Maven layout, by the release the next section describes, JReleaser, mvn deploy or any other tool, is served by its module name as well.

Releasing into a Maven repository of your own

An internal Maven repository - a Nexus, an Artifactory, a java repository of a Jenesis Repository - takes the staged Maven tree from release itself. Once jenesis.deploy.uri names it, release puts the tree there as its release/maven step, which is what maven-deploy-plugin does with a <distributionManagement> repository, or Gradle's maven-publish with a repository of its own:

java -Djenesis.project.version=1.0.0 \
     -Djenesis.deploy.uri=https://repo.example.com/repository/maven-releases/ \
     -Djenesis.deploy.token="Basic <credentials>" \
     -Djenesis.release.publish=true \
     build/jenesis/Make.java release
[RELEASED]  https://repo.example.com/.../com/example/library/1.0.0/library-1.0.0.jar
[RELEASED]  https://repo.example.com/.../com/example/library/1.0.0/library-1.0.0.pom

Every staged file is put at <group path>/<artifactId>/<version>/<file>, each beside the .md5, .sha1, .sha256 and .sha512 checksums a Maven client verifies. Then the artifact's maven-metadata.xml is read from the repository and the release merged into it, so it lists every version released so far, the newest as <latest> and the newest without -SNAPSHOT as <release>. Nothing is signed.

A -SNAPSHOT version is released as Maven deploys one. Each file is put under a name of its own, stamped with the time and a build number that counts on from the one the repository holds, as library-1.0.0-20261010.120053-1.jar, beside a maven-metadata.xml in the version's folder that names them, so a Maven or Gradle build that requires 1.0.0-SNAPSHOT resolves the newest. A project that sets no version releases the 0-SNAPSHOT its POM carries.

The token is sent as the Authorization header exactly as given, so it names its scheme: Basic and the Base64 of <user>:<password>, or Bearer <token> where the repository hands out tokens. Where the settings are not given, a release reads the MAVEN_RELEASE_URI and MAVEN_RELEASE_TOKEN environment variables - never MAVEN_REPOSITORY_URI and MAVEN_REPOSITORY_TOKEN, which name where a build resolves from. Like the key of a Jenesis module repository, the token may come only from the command line, ~/.jenesis/jenesis.properties or the environment, and is never sent to a repository a file of the project named.

release does this in the maven and modular_to_maven layouts, and refuses to run in the modular layout, which stages no Maven tree. A plaintext http: address is refused unless -Djenesis.repository.insecure=true allows it, and so is a release that publishes while jenesis.repository.offline is set. A repository that refuses the key fails the release naming the setting, one that already holds other content at a path asks for a new version, and any other answer than success stops it, naming the address and the status.

A release to Maven Central goes through the JReleaser plugin, as the next section shows: Central takes a release only signed and through its own publishing service, and jenesis.deploy.uri signs nothing. Central's snapshot repository takes a snapshot from jenesis.deploy.uri as any repository does.

The last mile: signing and uploading

For Maven Central, the remote upload and GPG signing are not Jenesis's job. Point JReleaser at target/stage/maven/output/ and it signs every artifact and uploads the bundle to Central. For Central, Jenesis stops at the unsigned, validated bundle, so signing keys never enter the build.

This split is deliberate. Most people building a project never release it: releasing is a rare, tightly controlled job for CI or a hardened environment that holds the keys. And the way you release evolves independently of how the build produces artifacts.

Driving the release tool from the build

You can still reach that tool through the same selector vocabulary as everything else. release is a target on every layout, and it depends on stage, so what a release tool uploads is always the tree this build just produced. A jreleaser.properties in the project's configuration folder has release run JReleaser in the build's own JVM, through the JReleaser plugin of jenesis-plugins. The build resolves the plugin by itself, so nothing names it. The file names the JReleaser configuration as configuration, relative to itself, and properties without that line fail the build naming it:

# build.jenesis/jreleaser.properties
configuration=../jreleaser.yml
java -Djenesis.release.publish=true -Djenesis.project.version=1.0.0 build/jenesis/Make.java release

Where no jreleaser.properties is found, a jreleaser.yml (or a .yaml, .toml or .json) in a configuration folder switches the plugin on alone. A file at the project root, where JReleaser's own command reads it, switches nothing on unless configuration names it. -Djenesis.release.jreleaser=false leaves the plugin out.

Value Meaning
configuration The JReleaser configuration, a .yml, .yaml, .toml or .json, relative to jreleaser.properties; required.
command The JReleaser command to run, full-release by default.
JRELEASER_* A setting JReleaser reads, handed to it as its settings file.

JReleaser is resolved and pinned like any other tool, and it runs in the project's root. It releases the version the build resolved, -Djenesis.project.version included, so the version is stated once. The build reads no version off what it staged, so a release whose configuration names none sets -Djenesis.project.version. Every value of the project's metadata and the folder of every staged tree are template properties of the configuration. Each is named in camel case after a jenesis prefix: {{ jenesisStageMaven }} is the staged Maven tree, {{ jenesisStageProject }} the project's own files, such as the documents Asciidoctor converted, and {{ jenesisScmUrl }} the scm.url of project.properties.

JReleaser reads its credentials from its JRELEASER_* environment variables, as on the command line. A JRELEASER_* line of jreleaser.properties can name one as well, such as JRELEASER_GITHUB_TOKEN=@github.token, which reads jenesis.variable.github.token from your own ~/.jenesis/jenesis.properties. Once the plugin hands JReleaser a settings file - the version alone makes one - that file stands in for ~/.jreleaser/config.properties.

JReleaser releases a version without -SNAPSHOT. The staged Maven tree names a snapshot as Maven installs one, library-1.0.0-SNAPSHOT.jar, without the timestamp that JReleaser's Maven deployers read from every file name, and they fail on it. A snapshot is released into a repository of your own with jenesis.deploy.uri, as releasing into a Maven repository of your own describes, which stamps every file as Maven deploys it, into Maven Central's snapshot repository as into any other.

The plugin runs JReleaser as a dry run by default: every local phase runs and every remote one is skipped. A real release needs -Djenesis.release.publish=true on the command line, which no file may set, so no configuration and no combination of selectors alone can publish. Every pin runs this dry release, which is how it pins JReleaser.
Prefer a dedicated release integration wherever your CI offers one - JReleaser ships a GitHub Action, and other platforms offer equivalents. They pin the tool version, wire the platform's secret store, and publish the release logs. The release target is for what they do not cover: rehearsing a release locally, and releasing from a pipeline that has no such integration.