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
mavenlayout exports only the Maven artifacts, into the local Maven repository (~/), under. m2/ repository <group>/. Maven, and Gradle through<artifact>/ <version>/ mavenLocal(), consume them from there. - The
modularlayout exports only the modules, into the local module repository (~/), under. jenesis <module>/. Every export also refreshes<version>/ <module>/, which holds the latest one.<module>. jar modular_, 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.to_ maven
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..
Staging the release tree
The stage target materialises the full release tree in Maven repository layout under
target/: the main jar, the POM, and - when you ask for them - the -sources. and
-javadoc. 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. or 1.. Any other value, such as v1., 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. may keep its version as version= in
project. at the root instead, and the setting overrides it for a release.
Central requires the -javadoc. but not that it documents anything, and rendered documentation can make
up most of a release's size. With -Djenesis., the jar is still staged but holds
nothing but a file named INTENTIONALLY_, and no documentation tool runs.
A module that holds nothing to publish, such as one of integration tests, says so in the packaging.
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. stages it. The line works in every layout. A pom. module's maven. and
maven. 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.. 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.
///) 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. file at the project root carries only what a module declaration cannot express. Jenesis
reads it when it is there; -Djenesis. 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. and organization. become the POM's <organization>, and a source pom. 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., manufacturer. 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. names another
id, or none when it is empty. A source pom. 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. the <distribution> of
that licence, as repo or manual.
A developer may also carry developer., organization, organizationUrl, timezone and roles, the
roles comma-separated, and the POM's <issueManagement> and <ciManagement> come from issueManagement.
and issueManagement., and ciManagement. and ciManagement.:
developer.raphw.roles=maintainer
issueManagement.system=GitHub
issueManagement.url=https://github.com/jenesis/jenesis/issues
A source pom. supplies all of these from its own elements, and from its parents where it declares none.
In a pom. 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. on its
<project>, or the matching child. on its <scm>; licences and developers are
inherited only as a whole. What a module declares or inherits wins, and project. 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., the coordinate follows from the module name: its first two
segments form the group ID (jenesis.) and the whole name is the artifact ID. project=
and artifact= in project. 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. of its
own, in the META-INF/ 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/, beside a
pom. 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. leaves both out of the jar.
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. 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. |
In the published POM |
|---|---|
requires |
a dependency of compile scope |
requires static |
a dependency of provided scope |
@jenesis. |
the <exclusions> of the dependency it names |
@jenesis. |
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. 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. names the revision, for Git the commit id; jenesis. names the
tag the release carries, if it has one; and jenesis. 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. is the commit the run builds, and
${{ github. 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., as
scm., scm. or scm., and a source pom. contributes the <tag> of its <scm>. A property takes
precedence over a declared value, and an empty property, such as -Djenesis., 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. names a URL, such as scm:git:https:/, 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:/. A tag of
HEAD, which a pom. 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. 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/ becomes variant.. A META-INF/ 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/ runs cargo, cmake
or make and writes the library as library/, and the line
linux-x86_ adds it to the variant as libnatives.. 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/, the
file decides which variants a machine builds: activating the profile builds that platform's variant, and an
empty classifiers. 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. 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., 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. project, a bill of materials is a module of <packaging>pom</ 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= in a
packaging. of its own configuration folder, such as bom/, 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., which may be
empty. The mojos are written as for maven-plugin-plugin, against maven-plugin-api and
maven-plugin-annotations, which a pom. declares in scope provided and a module-info. 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/ and its plugin-help. 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. by default. |
tools |
The release of Maven's plugin tools, 3. by default. |
Any other value is refused, and -Djenesis. switches the descriptor off.
A Gradle plugin
A Gradle plugin is a jar that names each plugin it implements by a META-INF/
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..
# 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>.: a POM that depends on the
jar. An empty gradleplugin. 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..
The file takes no values. An ID that is not a valid plugin ID, one in a namespace Gradle reserves (org.,
com.), 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. switches the markers off.
Converting the project's AsciiDoc documents
An asciidoctor. 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/. Every . file keeps its folder, so docs/
becomes docs/, 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. |
An AsciiDoc attribute every document reads, as {product-name} reads the line above. |
backend |
html5, the default, or docbook5. |
output |
The folder below target/ the documents go to, docs by default. |
Any other key fails the build. The documents alone switch nothing on, so . files kept for another tool
stay untouched, and a project laid out for the Maven or Gradle plugins of Asciidoctor names
documents=. 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. 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. 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.
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. makes the same run publish. Only the command line may pass it: jenesis.,
a profile and your own ~/ 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. names a repository,
release puts each staged module there as its release/ 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.:
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/ below that
address. What is staged beside the jar, such as the -sources. or the POM, stays in the staged tree. A project
whose jenesis. names the same address then resolves the module by its name at that version.
release does this in the modular and modular_ 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. 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_ and JENESIS_ 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, ~/ 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. releases without a key. A plaintext http: address is refused unless
-Djenesis. 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. names it, release puts the tree there
as its release/ 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>/, each beside the ., .,
. and . checksums a Maven client verifies. Then the artifact's maven-metadata. 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., beside a maven-metadata. in the version's folder that names them,
so a Maven or Gradle build that requires 1. 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_ and MAVEN_ environment variables - never
MAVEN_ and MAVEN_, which name where a build resolves from. Like the key of a
Jenesis module repository, the token may come only from the command line, ~/ or the
environment, and is never sent to a repository a file of the project named.
release does this in the maven and modular_ layouts, and refuses to run in the modular layout,
which stages no Maven tree. A plaintext http: address is refused unless -Djenesis.
allows it, and so is a release that publishes while jenesis. 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.
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/ 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. 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. is found, a jreleaser. (or a ., . or .) 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. leaves the
plugin out.
| Value | Meaning |
|---|---|
configuration |
The JReleaser configuration, a ., ., . or ., relative to jreleaser.; 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. 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.. 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. of project..
JReleaser reads its credentials from its JRELEASER_ environment variables, as on the command line. A
JRELEASER_ line of jreleaser. can name one as well, such as JRELEASER_, which reads
jenesis. from your own ~/. Once the plugin hands JReleaser a
settings file - the version alone makes one - that file stands in for ~/.
JReleaser releases a version without -SNAPSHOT. The staged Maven tree names a snapshot as Maven installs one,
library-1., 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., 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.
-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.
release target is for what they do not cover: rehearsing a release
locally, and releasing from a pipeline that has no such integration.