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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v2.1.0
Thu 9 Apr 2020 14:13:36 BST

* [72e6f78](https://github.com/hyperledger/fabric-chaincode-java/commit/72e6f78) [FABCJ-283](https://jira.hyperledger.org/browse/FABCJ-283) Update docker image version
* [54606f8](https://github.com/hyperledger/fabric-chaincode-java/commit/54606f8) [FABCJ-269](https://jira.hyperledger.org/browse/FABCJ-269) Compatibility Matrix

## v2.0.1
Wed 4 Mar 16:38:58 GMT 2020

Expand Down
22 changes: 11 additions & 11 deletions COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ Github is used for code base management, issues should reported in the [FABCJ](h

## Summary of Compatibility

This table shows the summary of the compatibility of the Java libraries at versions 1.4 and 2.0, together with the JVM version they require and the Fabric Peer versions they can communicate with.
This table shows the summary of the compatibility of the Java libraries at versions 1.4 and 2.1, together with the JVM version they require and the Fabric Peer versions they can communicate with.

| | Fabric Peer v1.4 connectivity | Java 8 VM | Fabric Peer v2.0 Connectivity | Java 11 VM |
| | Fabric Peer v1.4 connectivity | Java 8 VM | Fabric Peer v2.1 Connectivity | Java 11 VM |
| ----------------------- | ----------------------------- | --------- | ----------------------------- | ---------- |
| Java libraries **v1.4** | Yes | Yes | Yes | Yes |
| Java libraries **v2.0** | Yes | No | Yes | Yes |
| Java libraries **v2.1** | Yes | No | Yes | Yes |

Testing is performed with
- Java v8: Openjdk version 1.8.0_222
- Java v11: Openjdk version 11.04_11

By default a Fabric Peer v1.4 will create a Java 8 VM, and a Fabric Peer v2.0 will create a Java 11 VM. Whilst is the default, the docker image used to host the chaincode and contracts can be altered. Set the environment variable `CORE_CHAINCODE_JAVA_RUNTIME` on the peer to the name of the docker image. For example `CORE_CHAINCODE_JAVA_RUNTIME=example/customJavaRuntime:latest`
By default a Fabric Peer v1.4 will create a Java 8 VM, and a Fabric Peer v2.1 will create a Java 11 VM. Whilst is the default, the docker image used to host the chaincode and contracts can be altered. Set the environment variable `CORE_CHAINCODE_JAVA_RUNTIME` on the peer to the name of the docker image. For example `CORE_CHAINCODE_JAVA_RUNTIME=example/customJavaRuntime:latest`

The Java Libraries will connect to the peer whilst running; this is referred to as 'Fabric Peer Connectivity' in the table. For example, whilst the Fabric Peer v1.4 will create a Java 8 environment, if a Java 11 environment was configured, the Java Libraries at v2.0.0 still function when connecting to the Fabric Peer v1.4.
The Java Libraries will connect to the peer whilst running; this is referred to as 'Fabric Peer Connectivity' in the table. For example, whilst the Fabric Peer v1.4 will create a Java 8 environment, if a Java 11 environment was configured, the Java Libraries at v2.1.0 still function when connecting to the Fabric Peer v1.4.

## Compatibility

Expand All @@ -28,26 +28,26 @@ The key elements are : 
- the version of the JVM used to run the code
- When starting a chaincode container to run a Smart Contract the version of the runtime that is used is determined by these factors:

Fabric v1.4.2, and Fabric v2.0.0 will, by default, start up docker image to host the chaincode and contracts. The version of the docker image used is defined by the version of Fabric in use.
Fabric v1.4.2, and Fabric v2.1.0 will, by default, start up docker image to host the chaincode and contracts. The version of the docker image used is defined by the version of Fabric in use.

With Fabric v2.0.0, the chaincode container can be configured to be started by other means, and not the Peer. In this case, the environment used is not in the control of Fabric.
With Fabric v2.1.0, the chaincode container can be configured to be started by other means, and not the Peer. In this case, the environment used is not in the control of Fabric.

The Java libraries are produced are `group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim'`

### Supported JVMs

v1.4.x and v2.0.0 Java Libraries are supported running in Java 11 with the x86_64 architecture. Later Java 11 versions are supported but are not tested.
v1.4.x and v2.1.0 Java Libraries are supported running in Java 11 with the x86_64 architecture. Later Java 11 versions are supported but are not tested.

v1.4.x Java Libraries are supported running in Java 8 with the  x86_64 architecture. Later Java 8 versions are supported but are not tested.

Architecture Support: all docker images, JVMs, tools are tested under x86_64 ONLY

### Default Peer Runtime selection

When using Fabric 2.0.0, the default docker image that is used to run the Java chaincode is *openjdk11:jdk-11.04_11-alpine*
When using Fabric 2.1.0, the default docker image that is used to run the Java chaincode is *openjdk11:jdk-11.04_11-alpine*

With the default docker image used by Fabric 2.0.0. should the packaged Java code contains a maven or gradle build script, it will be built using Gradle 5.6.2, or Maven 3.6.2 (if both Gradle and Maven files are present Gradle is used. Gradle build files can be groovy, or kotlin. If the Gradle wrapper is present, this will used in preference to the installed version of Gradle)
With the default docker image used by Fabric 2.1.0. should the packaged Java code contains a maven or gradle build script, it will be built using Gradle 5.6.2, or Maven 3.6.2 (if both Gradle and Maven files are present Gradle is used. Gradle build files can be groovy, or kotlin. If the Gradle wrapper is present, this will used in preference to the installed version of Gradle)

### Supported Runtime communication with the Peer

Subject to a suitable runtime environment, the 1.4.4 and 2.0.0 Java Libraries can used to communicate with a Fabric 2.0.0 or 1.4.4 Peer - with the level of functionality that is implied by the Fabric version in use. 
Subject to a suitable runtime environment, the 1.4.4 and 2.1.0 Java Libraries can used to communicate with a Fabric 2.1.0 or 1.4.4 Peer - with the level of functionality that is implied by the Fabric version in use. 
22 changes: 15 additions & 7 deletions ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ schedules:
displayName: "Chaincode Java Nightly Driver"
branches:
include:
- "release-2.0"
- "release-2.x"
always: true

trigger:
branches:
include:
- "release-2.0"
- "release-2.x"
tags:
include:
- "*"
Expand Down Expand Up @@ -50,9 +50,11 @@ pool:
stages:
- stage: Build_and_test
jobs:
- job: main
steps:
- job: displayenv
steps:
- template: templates/build-data.yml
- job: main
steps:
- task: Gradle@2
inputs:
workingDirectory: ""
Expand Down Expand Up @@ -117,7 +119,13 @@ stages:
artifactName: javaenv-docker-image

- job: javadoc
dependsOn: displayenv
condition: and(succeeded(),eq(variables['Build.Reason'], 'IndividualCI'))
variables:
${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}:
javadoc_release: master
${{ if ne(variables['Build.SourceBranch'], 'refs/heads/master') }}:
javadoc_release: release-$(BuildData.MINOR_PACKAGE_VERSION)
steps:
- script: ./gradlew javadoc
displayName: 'Build JavaDoc'
Expand All @@ -131,9 +139,9 @@ stages:
- script: |
git fetch origin
git checkout -b gh-pages origin/gh-pages
mkdir -p $(Build.SourceBranchName)/api
rm -rf $(Build.SourceBranchName)/api/*
cp -r fabric-chaincode-shim/build/docs/javadoc/* $(Build.SourceBranchName)/api
mkdir -p $(javadoc_release)/api
rm -rf $(javadoc_release)/api/*
cp -r fabric-chaincode-shim/build/docs/javadoc/* $(javadoc_release)/api

# if the gh-pages is present from the previous script, then copy across the files across.
if [ -d gh-pages ]; then
Expand Down
6 changes: 6 additions & 0 deletions ci/templates/build-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ steps:
- script: |
env | sort
java -version
# handle full version number
VERSION=$(./gradlew -q printVersionName | head -n 1 | cut -d'-' -f1)
VERSION=${VERSION// }
echo Current version in code is :${VERSION}:
echo "##vso[task.setvariable variable=PACKAGE_VERSION;isOutput=true]${VERSION}"
# handle minor version
MINOR_VERSION=$(echo $VERSION | sed 's/^\([0-9]\{1,\}\.[0-9]\{1,\}\)\..*/\1/')
MINOR_VERSION=${MINOR_VERSION// }
echo Current minor version in code is :${MINOR_VERSION}:
echo "##vso[task.setvariable variable=MINOR_PACKAGE_VERSION;isOutput=true]${MINOR_VERSION}"
name: BuildData
displayName: 'Build data'
31 changes: 13 additions & 18 deletions docs/_includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,19 @@
<div class="wrapper">
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>

{%- assign num_releases = site.releases | size -%}
{%- if num_releases > 0 -%}
<nav class="site-nav">
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger">
<span class="menu-icon">
<svg viewBox="0 0 18 15" width="18px" height="15px">
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
</svg>
</span>
</label>
<nav class="site-nav">
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger">
<span class="menu-icon">
<svg viewBox="0 0 18 15" width="18px" height="15px">
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
</svg>
</span>
</label>

<div class="trigger">
{%- for release in site.releases -%}
<a class="page-link" href="https://github.com/hyperledger/fabric-chaincode-java/tree/{{ release }}">{{ release | escape }}</a>
{%- endfor -%}
</div>
</nav>
{%- endif -%}
<div class="trigger">
<a class="page-link" href="https://github.com/hyperledger/fabric-chaincode-java/">View on GitHub</a>
</div>
</nav>
</div>
</header>
26 changes: 26 additions & 0 deletions release_notes/v2.1.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
v2.0.1 4 March 2020
--------------------------

Release Notes
-------------
There are minimal changes between v2.0.0 and v2.1.0, please see the change log for a full list of updates.

The release-2.0 branch has been renamed to release-2.x; the v2.1.0 release supercedes v2.0.0.
The release-1.4 branch is currently LTS, please see the proposed Fabric LTS strategy for more information:
https://github.com/hyperledger/fabric-rfcs/pull/23

Known Vulnerabilities
---------------------
none

Resolved Vulnerabilities
------------------------
none

Known Issues & Workarounds
--------------------------
none

Change Log
----------
https://github.com/hyperledger/fabric-chaincode-java/blob/release-2.x/CHANGELOG.md#v210