Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 14 additions & 56 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,74 +2,32 @@

The following artifacts are created as a result of releasing Fabric Chaincode Java:

- docker images
- [fabric-javaenv](https://hub.docker.com/r/hyperledger/fabric-javaenv)
- Java libraries
- [fabric-chaincode-shim](https://search.maven.org/search?q=a:fabric-chaincode-shim)

**Note:** A docker image with a matching V.R version is required before releasing a new version of Fabric.
- `fabric-javaenv` Docker images:
- [Docker Hub](https://hub.docker.com/r/hyperledger/fabric-javaenv)
- [GitHub Packages](https://github.com/orgs/hyperledger/packages/container/package/fabric-javaenv)
- `fabric-chaincode-shim` Java libraries:
- [Maven Central](https://central.sonatype.com/artifact/org.hyperledger.fabric-chaincode-java/fabric-chaincode-shim)
- [GitHub Packages](https://github.com/hyperledger/fabric-chaincode-java/packages/50049)

## Before releasing

It's useful to create an issue to keep track of each release, for example [Release v2.1.0](https://jira.hyperledger.org/browse/FABCJ-283).

The following tasks are required before releasing:

- Update version numbers in `build.gradle` files to the required version
- Update test, sample, and docs files to match the new version
- Update the [`COMPATIBILITY.md`](./COMPATIBILITY.md)

See the [[FABCJ-289] release: 2.2.0 LTS](https://github.com/hyperledger/fabric-chaincode-java/pull/124) pull request for an example, although be careful to search for all versions in the codebase as they're easy to miss and things change!

Ensure the last branch build passed since exactly this repository state will be released.
- Ensure the version number in `build.gradle` is the required release version.
- Check the last branch build passed since exactly this repository state will be released.

## Create release

Creating a GitHub release on the [releases page](https://github.com/hyperledger/fabric-chaincode-java/releases) will trigger the build to publish the new release.

When drafting the release, create a new tag for the new version (with a `v` prefix), e.g. `v2.1.4`
When drafting the release, create a new tag for the new version (with a `v` prefix). For example: `v2.1.4`

See previous releases for examples of the title and description.

## Publish Java libraries

Log on to the [nexus repository manager](https://oss.sonatype.org/#welcome) to manually publish the JARs which were pushed by the release build.

Find the results of the release build under _Build Promotion > Staging Repositories_ and perform the following steps:

1. Close

You should see a series of close activities (see note)

2. Release using the automatically drop option

You should see a series of release activities (see note)

Note: you may need to refresh to update the activities view.

When the release has completed and the _Staging Repositories_ list is empty, the Java chaincode libraries should appear in the maven repository. They can take some time to appear in the UI but they should exist in the repository sooner.

## After releasing

- Update version numbers in `build.gradle` files to the next version
- Update test, sample, and docs files to match the new version

See the [Bump version to 2.2.1](https://github.com/hyperledger/fabric-chaincode-java/pull/127) pull request for an example. It should include almost all the files changed to prepare for the release, except for the release notes and changelog which do not need updating.

## Interim Build Publishing

The nightly Azure Pipeline Builds will also publish the 'dev' drivers to Artifactory. These can be accessed via the repository at

```
maven {
url "https://hyperledger.jfrog.io/hyperledger/fabric-maven"
}
```

These 'dev' drivers are built from the main branch only, and have a version format including the date for example `2.3.1.dev.20210303`. They can be accessed in a build file like this

```
dependencies {
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '2.3.1.dev.+'
}
```
- Update the version number in `build.gradle` to the next version.
- Update version numbers in `fabric-chaincode-docker/build.gradle` to match the next version.
- Update the `fabric-chaincode-shim` dependency version in all `build.gradle` and `pom.xml` files within `fabric-chaincode-integration-test/src/contracts` to match the next version.
- Update the `fabric-chaincode-shim` dependency version in all `build.gradle`, `build.gradle.kts` and `pom.xml` files within `examples` to mast the last _released_ version.
- Check that `COMPATIBILITY.md` is correct and update if required.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
id "com.diffplug.spotless" version "7.0.4"
}

version = '2.5.6'
version = '2.5.7'


// If the nightly property is set, then this is the scheduled main
Expand Down
2 changes: 1 addition & 1 deletion examples/fabric-contract-example-as-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repositories {
}

dependencies {
implementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.5'
implementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.6'
implementation 'org.json:json:20250517'
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.1'
testImplementation 'org.assertj:assertj-core:3.27.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {
version = "0.0.1"

dependencies {
implementation("org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.5")
implementation("org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.6")
implementation("org.json:json:20250517")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")

Expand Down
4 changes: 2 additions & 2 deletions examples/fabric-contract-example-gradle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ repositories {
}

dependencies {
compile 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.5'
compile 'org.json:json:20250517'
implementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.6'
implementation 'org.json:json:20250517'
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.1'
testImplementation 'org.assertj:assertj-core:3.27.3'
testImplementation 'org.mockito:mockito-core:5.18.0'
Expand Down
2 changes: 1 addition & 1 deletion examples/fabric-contract-example-maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- fabric-chaincode-java -->
<fabric-chaincode-java.version>2.5.5</fabric-chaincode-java.version>
<fabric-chaincode-java.version>2.5.6</fabric-chaincode-java.version>

<!-- Logging -->
<logback.version>1.5.15</logback.version>
Expand Down
4 changes: 2 additions & 2 deletions examples/ledger-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ repositories {
}

dependencies {
compile 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.5'
compile 'org.json:json:20250517'
implementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.6'
implementation 'org.json:json:20250517'
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.1'
testImplementation 'org.assertj:assertj-core:3.27.3'
testImplementation 'org.mockito:mockito-core:5.18.0'
Expand Down
2 changes: 1 addition & 1 deletion fabric-chaincode-docker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ tasks.register('copyAllDeps', Copy) {
tasks.register('buildImage', DockerBuildImage) {
dependsOn copyAllDeps
inputDir = project.file('Dockerfile').parentFile
images = ['hyperledger/fabric-javaenv', 'hyperledger/fabric-javaenv:2.5', 'hyperledger/fabric-javaenv:amd64-2.5.6', 'hyperledger/fabric-javaenv:amd64-latest']
images = ['hyperledger/fabric-javaenv', 'hyperledger/fabric-javaenv:2.5', 'hyperledger/fabric-javaenv:amd64-2.5.7', 'hyperledger/fabric-javaenv:amd64-latest']
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repositories {
}

dependencies {
implementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.6'
implementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.7'
implementation 'org.hyperledger.fabric:fabric-protos:0.3.7'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- fabric-chaincode-java -->
<fabric-chaincode-java.version>2.5.6</fabric-chaincode-java.version>
<fabric-chaincode-java.version>2.5.7</fabric-chaincode-java.version>

</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repositories {
}

dependencies {
implementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.6'
implementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.7'
implementation 'org.hyperledger.fabric:fabric-protos:0.3.7'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repositories {
}

dependencies {
implementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.6'
implementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.7'
implementation 'org.hyperledger.fabric:fabric-protos:0.3.7'
implementation 'commons-logging:commons-logging:1.3.5'
implementation 'com.google.code.gson:gson:2.13.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- fabric-chaincode-java -->
<fabric-chaincode-java.version>2.5.6</fabric-chaincode-java.version>
<fabric-chaincode-java.version>2.5.7</fabric-chaincode-java.version>

</properties>

Expand Down