Skip to content

Commit aa74412

Browse files
authored
Merge pull request #148 from jt-nti/merge-2.3
Merge 2.3
2 parents 7094bca + 12a2114 commit aa74412

File tree

33 files changed

+595
-334
lines changed

33 files changed

+595
-334
lines changed

CHANGELOG.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,56 @@
1+
## v2.3.0
2+
Tue 3 Nov 2020 14:20:11 GMT
3+
4+
* [081d5c8](https://github.com/hyperledger/fabric-chaincode-java/commit/081d5c8) Bump version to 2.2.2
5+
* [b494824](https://github.com/hyperledger/fabric-chaincode-java/commit/b494824) [FABCJ-290](https://jira.hyperledger.org/browse/FABCJ-290) Add release guide
6+
7+
## v2.2.1
8+
Wed 7 Oct 2020 16:21:53 BST
9+
10+
* [cef231c](https://github.com/hyperledger/fabric-chaincode-java/commit/cef231c) [FABCJ-293](https://jira.hyperledger.org/browse/FABCJ-293) Remove gradle from image
11+
* [d2643ef](https://github.com/hyperledger/fabric-chaincode-java/commit/d2643ef) Minor Performance Improvements
12+
* [703558c](https://github.com/hyperledger/fabric-chaincode-java/commit/703558c) [FABCJ-291](https://jira.hyperledger.org/browse/FABCJ-291) Startkey needs additional checks For the open ended query, the start and empty keys are empty from the chaincode. However, in the shim, if the start key is an empty key, it is replaced with 0x01 which is nothing but a namespace for the non-composite key.
13+
* [f35ae08](https://github.com/hyperledger/fabric-chaincode-java/commit/f35ae08) Fix tagging of fabric-javaenv image
14+
* [cb31d36](https://github.com/hyperledger/fabric-chaincode-java/commit/cb31d36) Bump version to 2.2.1
15+
16+
## v2.2.0
17+
Thu 2 Jul 11:28:13 BST 2020
18+
19+
* [32c8201](https://github.com/hyperledger/fabric-chaincode-java/commit/32c8201) [FABCJ-289](https://jira.hyperledger.org/browse/FABCJ-289) release: 2.2.0 LTS
20+
* [0948234](https://github.com/hyperledger/fabric-chaincode-java/commit/0948234) [FABCJ-288](https://jira.hyperledger.org/browse/FABCJ-288) fix: simple key end of range
21+
* [8b06be2](https://github.com/hyperledger/fabric-chaincode-java/commit/8b06be2) [FABCJ-286](https://jira.hyperledger.org/browse/FABCJ-286) Prepare 2.1.2
22+
23+
## v2.1.1
24+
Mon 18 May 09:09:24 BST 2020
25+
26+
* [f0f958e](https://github.com/hyperledger/fabric-chaincode-java/commit/f0f958e) [FABCJ-284](https://jira.hyperledger.org/browse/FABCJ-284) Broken docs link
27+
* [b89c464](https://github.com/hyperledger/fabric-chaincode-java/commit/b89c464) [FABCJ-285](https://jira.hyperledger.org/browse/FABCJ-285) Remove incorrect log point
28+
* [93ff6bb](https://github.com/hyperledger/fabric-chaincode-java/commit/93ff6bb) [FABCJ-283](https://jira.hyperledger.org/browse/FABCJ-283) Bump version number to 2.1.1
29+
30+
## v2.1.0
31+
Thu 9 Apr 2020 14:13:36 BST
32+
33+
* [72e6f78](https://github.com/hyperledger/fabric-chaincode-java/commit/72e6f78) [FABCJ-283](https://jira.hyperledger.org/browse/FABCJ-283) Update docker image version
34+
* [54606f8](https://github.com/hyperledger/fabric-chaincode-java/commit/54606f8) [FABCJ-269](https://jira.hyperledger.org/browse/FABCJ-269) Compatibility Matrix
35+
36+
## v2.0.1
37+
Wed 4 Mar 16:38:58 GMT 2020
38+
39+
* [8cb6a25](https://github.com/hyperledger/fabric-chaincode-java/commit/8cb6a25) [FAB-16136](https://jira.hyperledger.org/browse/FAB-16136) Do not run tests in chaincode container
40+
* [3710641](https://github.com/hyperledger/fabric-chaincode-java/commit/3710641) [FABCJ-280](https://jira.hyperledger.org/browse/FABCJ-280) Copy chaincode into temporary directory before building
41+
* [a25a7d6](https://github.com/hyperledger/fabric-chaincode-java/commit/a25a7d6) [FABCJ-276](https://jira.hyperledger.org/browse/FABCJ-276) Access localmspid
42+
43+
## v2.0.0
44+
Fri 24 Jan 10:26:03 GMT 2020
45+
46+
* [659a1c4](https://github.com/hyperledger/fabric-chaincode-java/commit/659a1c4) Port fixes from master branch for Coverage & typos
47+
* [9cf1e6a](https://github.com/hyperledger/fabric-chaincode-java/commit/9cf1e6a) [FABCI-482](https://jira.hyperledger.org/browse/FABCI-482) Update Nexus URL's to Artifactory
48+
* [7ab7145](https://github.com/hyperledger/fabric-chaincode-java/commit/7ab7145) Fix typos in README.md
49+
* [67fdc40](https://github.com/hyperledger/fabric-chaincode-java/commit/67fdc40) [FABCJ-259](https://jira.hyperledger.org/browse/FABCJ-259) Pagination Fix
50+
* [1609425](https://github.com/hyperledger/fabric-chaincode-java/commit/1609425) Update maintainers list
51+
* [1a45e3d](https://github.com/hyperledger/fabric-chaincode-java/commit/1a45e3d) [FABCJ-95](https://jira.hyperledger.org/browse/FABCJ-95) Checkstyle
52+
53+
154
## v2.0.0-beta
255
Thu 12 Dec 12:45:44 GMT 2019
356

COMPATIBILITY.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ Github is used for code base management, issues should reported in the [FABCJ](h
55

66
## Summary of Compatibility
77

8-
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.
8+
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.
99

10-
| | Fabric Peer v1.4 connectivity | Java 8 VM | Fabric Peer v2.0 Connectivity | Java 11 VM |
10+
| | Fabric Peer v1.4 connectivity | Java 8 VM | Fabric Peer v2.1 Connectivity | Java 11 VM |
1111
| ----------------------- | ----------------------------- | --------- | ----------------------------- | ---------- |
1212
| Java libraries **v1.4** | Yes | Yes | Yes | Yes |
13-
| Java libraries **v2.0** | Yes | No | Yes | Yes |
13+
| Java libraries **v2.1** | Yes | No | Yes | Yes |
1414

1515
Testing is performed with
1616
- Java v8: Openjdk version 1.8.0_222
1717
- Java v11: Openjdk version 11.04_11
1818

19-
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`
19+
By default a Fabric Peer v1.4 will create a Java 8 VM, and a Fabric Peer v2.x 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`
2020

21-
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.
21+
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.
2222

2323
## Compatibility
2424

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

31-
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.
31+
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.
3232

33-
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.
33+
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.
3434

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

3737
### Supported JVMs
3838

39-
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.
39+
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.
4040

4141
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.
4242

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

4545
### Default Peer Runtime selection
4646

47-
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*
47+
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*
4848

4949
With the default docker image used by Fabric 2.1.0. should the packaged Java code contain 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; note that the version of Gradle in the docker image is a copy of the Gradle Wrapper, not the full Gradle install. Therefore if there is limited Internet acccess in your production environment, do not use Gradle). Alternatively it is recommended to package prebuilt jar files, including the contract and all dependencies, in which case no build or Internet access is required when installing Java chaincode.
5050

5151
### Supported Runtime communication with the Peer
5252

53-
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. 
53+
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. 

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
apply plugin: 'idea'
88
apply plugin: 'eclipse-wtp'
9-
version = '3.0.0'
9+
version = '2.3.1'
1010
allprojects {
1111
repositories {
1212
mavenCentral()

ci/azure-pipelines.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ stages:
144144
mkdir -p $(javadoc_release)/api
145145
rm -rf $(javadoc_release)/api/*
146146
cp -r fabric-chaincode-shim/build/docs/javadoc/* $(javadoc_release)/api
147+
148+
# if the gh-pages is present from the previous script, then copy across the files across.
147149
if [ -d gh-pages ]; then
148150
find . -maxdepth 1 ! \( -name [.]* -o -name 'gh-pages' -o -name 'master' -o -name 'release-*' \) -exec rm -rf {} \;
149151
cp -r gh-pages/* .
@@ -163,17 +165,13 @@ stages:
163165
- stage: Publish_tag
164166
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
165167
jobs:
166-
- job: publish_release
168+
- job: docker_publish
167169
steps:
168170
- template: templates/build-data.yml
169171
- task: DownloadPipelineArtifact@2
170172
inputs:
171173
artifact: javaenv-docker-image
172174
path: $(Build.SourcesDirectory)/build
173-
- task: DownloadSecureFile@1
174-
name: keyring
175-
inputs:
176-
secureFile: secring.gpg
177175
- script: |
178176
wget -qO "$PWD/manifest-tool" https://github.com/estesp/manifest-tool/releases/download/v1.0.0/manifest-tool-linux-amd64
179177
chmod +x ./manifest-tool
@@ -183,14 +181,21 @@ stages:
183181
docker login ${DOCKER_REGISTRY_URL} --username=${DOCKER_REGISTRY_USERNAME} --password=${DOCKER_REGISTRY_PASSWORD}
184182
echo "Logged in to docker registry"
185183
# tag javaenv image to PACKAGE_VERSION
186-
docker tag hyperledger/fabric-javaenv fabric-javaenv:amd64-$(BuildData.PACKAGE_VERSION)-beta
184+
docker tag hyperledger/fabric-javaenv hyperledger/fabric-javaenv:amd64-$(BuildData.PACKAGE_VERSION)
187185
# push javaenv to repository
188186
docker push hyperledger/fabric-javaenv:amd64-$(BuildData.PACKAGE_VERSION)
189-
./manifest-tool push from-args --platforms linux/amd64 --template "hyperledger/fabric-javaenv:amd64-$(BuildData.PACKAGE_VERSION)-beta" --target "hyperledger/fabric-javaenv:$(BuildData.PACKAGE_VERSION)-beta"
190-
./manifest-tool push from-args --platforms linux/amd64 --template "hyperledger/fabric-javaenv:amd64-$(BuildData.PACKAGE_VERSION)-beta" --target "hyperledger/fabric-javaenv:2.0"
187+
./manifest-tool push from-args --platforms linux/amd64 --template "hyperledger/fabric-javaenv:amd64-$(BuildData.PACKAGE_VERSION)" --target "hyperledger/fabric-javaenv:$(BuildData.PACKAGE_VERSION)"
188+
./manifest-tool push from-args --platforms linux/amd64 --template "hyperledger/fabric-javaenv:amd64-$(BuildData.PACKAGE_VERSION)" --target "hyperledger/fabric-javaenv:$(BuildData.MINOR_PACKAGE_VERSION)"
191189
env:
192190
DOCKER_REGISTRY_USERNAME: $(DockerHub-Username)
193191
DOCKER_REGISTRY_PASSWORD: $(DockerHub-Password)
192+
- job: jar_publish
193+
steps:
194+
- template: templates/build-data.yml
195+
- task: DownloadSecureFile@1
196+
name: keyring
197+
inputs:
198+
secureFile: secring.gpg
194199
- script: |
195200
./gradlew -Psigning.keyId=${SIGNING_ID} -Psigning.password=${SIGNING_PASSWORD} -Psigning.secretKeyRingFile=${KEYRING_FILE} -PossrhUsername=${OSSRH_USER} -PossrhPassword=${OSSRH_PASSWORD} uploadArchives
196201
env:

examples/fabric-contract-example-gradle-kotlin/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ java {
1919

2020

2121
dependencies {
22-
implementation("org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:1.4.4")
22+
implementation("org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.3.1")
2323
implementation("org.json:json:20180813")
2424
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
2525

examples/fabric-contract-example-gradle/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repositories {
2020
}
2121

2222
dependencies {
23-
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.4.5'
23+
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '2.3.1'
2424
compile group: 'org.json', name: 'json', version: '20180813'
2525
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.2'
2626
testImplementation 'org.assertj:assertj-core:3.11.1'

examples/fabric-contract-example-maven/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1313

1414
<!-- fabric-chaincode-java -->
15-
<fabric-chaincode-java.version>1.4.5</fabric-chaincode-java.version>
15+
<fabric-chaincode-java.version>2.3.1</fabric-chaincode-java.version>
1616

1717
<!-- Logging -->
1818
<logback.version>1.0.13</logback.version>

fabric-chaincode-docker/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ RUN gradle \
4040
fabric-chaincode-shim:publishToMavenLocal \
4141
-x javadoc \
4242
-x test \
43-
-x checkstyleMain -x checkstyleTest -x dependencyCheckAnalyze
43+
-x checkstyleMain \
44+
-x checkstyleTest \
45+
-x dependencyCheckAnalyze
4446

4547
# Installing all protos jar dependencies to maven local
4648
WORKDIR /root/chaincode-java/shim-src/fabric-chaincode-protos/build/publications/protosJar/

fabric-chaincode-docker/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@ task copyAllDeps(type: Copy) {
7171
task buildImage(type: DockerBuildImage) {
7272
dependsOn copyAllDeps
7373
inputDir = project.file('Dockerfile').parentFile
74-
tags = ['hyperledger/fabric-javaenv', 'hyperledger/fabric-javaenv:amd64-3.0.0', 'hyperledger/fabric-javaenv:amd64-latest']
74+
tags = ['hyperledger/fabric-javaenv', 'hyperledger/fabric-javaenv:amd64-2.3.1', 'hyperledger/fabric-javaenv:amd64-latest']
7575
}
7676

fabric-chaincode-docker/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ buildGradle() {
1515
echo "Gradle build"
1616
if [ -f ./gradlew ]; then
1717
chmod +x ./gradlew
18-
./gradlew build shadowJar
18+
./gradlew build shadowJar -x test
1919
else
2020
/root/chaincode-java/gradlew build shadowJar -x test
2121
fi
@@ -38,7 +38,7 @@ buildMaven() {
3838
tar cf - . | (cd ${TMP_DIR}; tar xf -)
3939
cd ${TMP_DIR}
4040
echo "Maven build"
41-
mvn compile package
41+
mvn compile package -DskipTests -Dmaven.test.skip=true
4242
retval=$?
4343
if [ $retval -ne 0 ]; then
4444
exit $retval

0 commit comments

Comments
 (0)