Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
Combine FAQ with readme and ensure information is up-to-date

Signed-off-by: James Taylor <[email protected]>
  • Loading branch information
jt-nti authored and mbwhite committed Nov 8, 2019
1 parent 3b029a8 commit 6553ffc
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 435 deletions.
46 changes: 0 additions & 46 deletions FAQ.md

This file was deleted.

83 changes: 64 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,75 @@
# Hyperledger Fabric Shim for Java chaincode
# Hyperledger Fabric Chaincode Java

This is a Java based implementation of Hyprledger Fabric chaincode shim APIs, which enables development of chaincodes using Java language.
[![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)
[![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)
[![Rocket.Chat](https://chat.hyperledger.org/images/join-chat.svg)](https://chat.hyperledger.org/channel/fabric-java-chaincode)

Application developers interested in developing smart contracts (what we call chaincode) for Hyperledger Fabric should
read the tutorial in TUTORIAL.md file and visit
[Chaincode for developers](https://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html).

Contributors or early adopters who need to be able to build and test recent Java chaincode shim, should reference [FAQ.md](FAQ.md) file.
This is a Java based implementation of Hyprledger Fabric chaincode shim APIs, which enables development of smart contracts using the Java language.

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

## Folder structure
## Getting Started

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.

## Project structure

### fabric-chaincode-protos

Contains the protobuf definition files used by Java shim to communicate with Fabric peers.

### fabric-chaincode-shim

Contains the java shim classes that define Java chaincode API and way to communicate with Fabric peers.

### fabric-chaincode-docker

Contains instructions to build the `hyperledger/fabric-javaenv` docker image.

### fabric-chaincode-integration-test

Contains higher level tests for Java chaincode.

> **Note:** in the future these should be replaced with a separate suite of [Cucumber](https://cucumber.io) tests which run against all chaincode implementations.
### fabric-chaincode-example-gradle

Contains an example java chaincode gradle project that includes sample chaincode and basic gradle build instructions.

## Building and testing

Make sure you have the following prereqs installed:

- [Docker](https://www.docker.com/get-docker)
- [Docker Compose](https://docs.docker.com/compose/install/)
- [Java 8](https://www.java.com)

> **Note:** Java can be installed using [sdkman](https://sdkman.io/).
Clone the repository if you haven't already.

```
git clone https://github.com/hyperledger/fabric-chaincode-java.git
```

Build java shim jars (proto and shim jars) and install them to local maven repository.

```
cd fabric-chaincode-java
./gradlew clean build install
```

The "fabric-chaincode-protos" folder contains the protobuf definition files used by
Java shim to communicate with Fabric peer.
> **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.
The "fabric-chaincode-shim" folder contains the java shim classes that define Java
chaincode API and way to communicate with Fabric peer.
Build javaenv docker image, to have it locally.

The "fabric-chaincode-docker" folder contains instructions to the build
`hyperledger/fabric-javaenv` docker image.
```
./gradlew buildImage
```

The "fabric-chaincode-example-gradle" contains an example java chaincode gradle
project that includes sample chaincode and basic gradle build instructions.
---

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

0 comments on commit 6553ffc

Please sign in to comment.