JReleaser 0.4.0 has been released!

I'm ecstatic to announce that JReleaser v0.4.0 is readily available! This release brings a host of features and bug fixes that should make your release process snappier and customizable. Take special note of the breaking changes introduced in this release, as always all features and fixes are collected in matching milestone. Starting with this release there are now 4 cross-platform Java Runtimes to help you get started: Mac OSX, Windows, Linux (glibc), and Linux (musl). Here's a quick recap of the new features available in this release:

Additional Git Releasers

GitHub, GitLab, and Gitea are supported since the first JReleaser version however they are not the only game in town. Version 0.4.0 adds support for Codeberg (which is Gitea based) and Generic git services. The latter lets you integrate with git services such as AWS CodeCommit, BitBucket, and Azure DevOps for example, that is, til JReleaser adds full support for them. Bear in mind that at the moment not all features are supported when a generic git releaser is selected. This is likely to change in future releases.

Multiple Dockerfile per Distribution

Until now it was only possible to define a single Docker configuration per distribution. Starting with this release you may configure multiple Docker settings per distribution. This is very handy when assembling cross-platform Java Runtimes with jlink that target both Linux (glibc) and Linux (musl). Here's for example how JReleaser itself uses this feature. First the assembly of the jlink images

assemble:
  jlink:
    jreleaser-standalone:
      active: always
      extraProperties:
        sdkmanSkip: true
      java:
        version: 11
        mainClass: 'org.jreleaser.cli.Main'
      imageName: '{{distributionName}}-{{projectEffectiveVersion}}'
      executable: 'jreleaser'
      moduleNames:
        - java.base
        - java.desktop
        - java.management
        - java.naming
        - java.rmi
        - java.security.jgss
        - java.security.sasl
        - java.sql
        - jdk.crypto.ec
        - jdk.crypto.cryptoki
        - jdk.security.auth
        - jdk.security.jgss
        - org.openjsse
      targetJdks:
        - path: '{{jdkPathPrefix}}-macosx_x64/zulu-11.jdk/Contents/Home'
          platform: 'osx'
        - path: '{{jdkPathPrefix}}-linux_x64'
          platform: 'linux'
        - path: '{{jdkPathPrefix}}-linux_musl_x64'
          platform: 'linux_musl'
        - path: '{{jdkPathPrefix}}-win_x64'
          platform: 'windows'
      mainJar:
        path: 'apps/jreleaser/build/libs/jreleaser-{{projectVersion}}.jar'
      jars:
        - directory: 'apps/jreleaser/build/dependencies/flat'
          include: '*.jar'

Next the Docker configuration, matching artifacts by platform:

distributions:
  jreleaser-standalone:
    docker:
      active: always
      registries:
        - serverName: DEFAULT
          username: jreleaser
      labels:
        'org.opencontainers.image.title': 'jreleaser'
      postCommands:
        - 'VOLUME /workspace'
      specs:
        slim:
          imageNames:
            - 'jreleaser/jreleaser-{{dockerSpecName}}:{{tagName}}'
            - 'jreleaser/jreleaser-{{dockerSpecName}}:latest'
          matchers:
            platform: 'linux'
          preCommands:
            - 'RUN apt-get update -y'
            - 'RUN apt-get install unzip'
        alpine:
          imageNames:
            - 'jreleaser/jreleaser-{{dockerSpecName}}:{{tagName}}'
            - 'jreleaser/jreleaser-{{dockerSpecName}}:latest'
          matchers:
            platform: 'linux_musl'
          preCommands:
            - 'RUN apk add unzip'

Resulting in two Docker images: jreleaser/jreleaser-slim and jreleaser/jreleaser-alpine.

Upload Artifacts to a HTTP/HTTPS Server

Version 0.3.0 added support for uploading artifacts to a generic Artifactory repository. This release lets you upload artifacts to an HTTP/HTTPS server that supports either POST or PUT, with our without authentication. More upload options to come in future releases.

More Announcers

Additional announcing services are now available: post a release to Mastodon or let your team know a new release is available via Mattermost. Are we missing your communication channel of choice? Let us know!

Checksum Improvements

Sha256 is the default algorithm for calculating checksums since JReleaser's first release, but it's by no means the only algorithm that a project may require. For this reason JReleaser now supports calculating checksums with the following algorithms: MD2, MD5, SHA1, SHA256, SHA384, SHA512, SHA3-224, SHA3-256, SHA3-384, SHA3-512. You can also decide to upload individual checksum files. It's worth noting that Sha256 remains the default algorithm and will always be enabled.

Multiple CI/CD Options

We just double the number of CI/CD configuration settings in this release. Pick one from Buddy, Buildkite, Circle CI, Cirrus CI, Codefresh, CodeShip, Drone, GitHub Actions, GitLab CI, Jenkins, Semaphore, TeamCity, Travis CI, Wercker.

Searchable Docs

The documentation site has been updated with a search widget powered by Algolia.

As always, feedback is welcomed, feel free to file a ticket or start a discussion topic.

Keep on coding!

Image by David Mark from Pixabay

Liked it? Take a second to support aalmiray on Patreon!
Become a patron at Patreon!

Trackbacks/Pingbacks

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

ˆ Back To Top