Skip to content

Commit 6553ffc

Browse files
jt-ntimbwhite
authored andcommitted
Update readme
Combine FAQ with readme and ensure information is up-to-date Signed-off-by: James Taylor <[email protected]>
1 parent 3b029a8 commit 6553ffc

File tree

3 files changed

+64
-435
lines changed

3 files changed

+64
-435
lines changed

FAQ.md

Lines changed: 0 additions & 46 deletions
This file was deleted.

README.md

Lines changed: 64 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,75 @@
1-
# Hyperledger Fabric Shim for Java chaincode
1+
# Hyperledger Fabric Chaincode Java
22

3-
This is a Java based implementation of Hyprledger Fabric chaincode shim APIs, which enables development of chaincodes using Java language.
3+
[![Build Status](https://dev.azure.com/Hyperledger/Fabric-Chaincode-Java/_apis/build/status/Fabric-Chaincode-Java?branchName=master)](https://dev.azure.com/Hyperledger/Fabric-Chaincode-Java/_build/latest?definitionId=39&branchName=master)
4+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.hyperledger.fabric-chaincode-java/fabric-chaincode-shim/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.hyperledger.fabric-chaincode-java/fabric-chaincode-shim)
5+
[![Rocket.Chat](https://chat.hyperledger.org/images/join-chat.svg)](https://chat.hyperledger.org/channel/fabric-java-chaincode)
46

5-
Application developers interested in developing smart contracts (what we call chaincode) for Hyperledger Fabric should
6-
read the tutorial in TUTORIAL.md file and visit
7-
[Chaincode for developers](https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html).
8-
9-
Contributors or early adopters who need to be able to build and test recent Java chaincode shim, should reference [FAQ.md](FAQ.md) file.
7+
This is a Java based implementation of Hyprledger Fabric chaincode shim APIs, which enables development of smart contracts using the Java language.
108

119
This project creates `fabric-chaincode-protos` and `fabric-chaincode-shim` jar
12-
files for developers consumption and the `hyperledger/fabric-javaenv` docker image
10+
files for developers' consumption and the `hyperledger/fabric-javaenv` docker image
1311
to run Java chaincode.
1412

15-
## Folder structure
13+
## Getting Started
14+
15+
Application developers interested in developing Java smart contracts for Hyperledger Fabric should read the [JavaDoc](https://fabric-chaincode-java.github.io/) which inludes download information, and links to documentation and samples.
16+
17+
## Project structure
18+
19+
### fabric-chaincode-protos
20+
21+
Contains the protobuf definition files used by Java shim to communicate with Fabric peers.
22+
23+
### fabric-chaincode-shim
24+
25+
Contains the java shim classes that define Java chaincode API and way to communicate with Fabric peers.
26+
27+
### fabric-chaincode-docker
28+
29+
Contains instructions to build the `hyperledger/fabric-javaenv` docker image.
30+
31+
### fabric-chaincode-integration-test
32+
33+
Contains higher level tests for Java chaincode.
34+
35+
> **Note:** in the future these should be replaced with a separate suite of [Cucumber](https://cucumber.io) tests which run against all chaincode implementations.
36+
37+
### fabric-chaincode-example-gradle
38+
39+
Contains an example java chaincode gradle project that includes sample chaincode and basic gradle build instructions.
40+
41+
## Building and testing
42+
43+
Make sure you have the following prereqs installed:
44+
45+
- [Docker](https://www.docker.com/get-docker)
46+
- [Docker Compose](https://docs.docker.com/compose/install/)
47+
- [Java 8](https://www.java.com)
48+
49+
> **Note:** Java can be installed using [sdkman](https://sdkman.io/).
50+
51+
Clone the repository if you haven't already.
52+
53+
```
54+
git clone https://github.com/hyperledger/fabric-chaincode-java.git
55+
```
56+
57+
Build java shim jars (proto and shim jars) and install them to local maven repository.
58+
59+
```
60+
cd fabric-chaincode-java
61+
./gradlew clean build install
62+
```
1663

17-
The "fabric-chaincode-protos" folder contains the protobuf definition files used by
18-
Java shim to communicate with Fabric peer.
64+
> **Note:** `./gradlew clean build classes` can be used instead to reduce the binaries that are built. This should be sufficient for using the local repository.
1965
20-
The "fabric-chaincode-shim" folder contains the java shim classes that define Java
21-
chaincode API and way to communicate with Fabric peer.
66+
Build javaenv docker image, to have it locally.
2267

23-
The "fabric-chaincode-docker" folder contains instructions to the build
24-
`hyperledger/fabric-javaenv` docker image.
68+
```
69+
./gradlew buildImage
70+
```
2571

26-
The "fabric-chaincode-example-gradle" contains an example java chaincode gradle
27-
project that includes sample chaincode and basic gradle build instructions.
72+
---
2873

29-
# Compatibility
30-
Java SDK 8 or above
74+
[![Creative Commons License](https://i.creativecommons.org/l/by/4.0/88x31.png)](http://creativecommons.org/licenses/by/4.0/)
75+
This work is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/)

0 commit comments

Comments
 (0)