1. Download the source code through git
Https://github.com/hyperledger/fabric-sdk-java
2. Extract and import into Eclipse
Attention to environmental needs: Jdk1.8,eclipse try to use the latest version
If you import, there is a bomb box error: Failed to read the project description file (. Project) for ' Fabric-sdk-java-master '. The file has been changed on disk, and it now contains invalid information. The project won't function properly until the description file is restored to a valid state.
Remove the. project file from the unpacked project file.
the first pom error after 3.maven update com.google.protobuf:protoc:exe:${os.detected.classifier}:3.0.0
Solution Method:
Simply write a main method in a Java project and enter the following code
System.out.println (System.getproperty ("Os.name"));
System.out.println (System.getproperty ("Os.arch"));
View the return value, such as returning Windows 7 AMD64 need to be converted to: windows-x86_64
Add <os.detected.classifier>windows-x86_64</os.detected.classifier> to Pom properties
Other return values in the Https://github.com/trustin/os-maven-plugin link to find the corresponding value in the conversion and write in the corresponding parameters of <os.detected.classifier>.
4. Second POM Error plugins partial label error
Solution: Use <pluginManagement> label on plugins to wrap it up
5. Classes in the third project that are partially grpc suffixes are not found
Workaround: Introduced in the Pom.xml file, the jar bundle dependency of the project itself can be
<dependency>
<groupId>org.hyperledger.fabric-sdk-java</groupId>
<artifactId> fabric-sdk-java</artifactid>
<version>1.0.1</version>
</dependency>
Import this jar package that might not load in the Fabric-sdk-java in the project's MAVEN dependencies, causing the class in the project to import the class in the jar package. This is because the groupid of the project's Pom file is consistent with the groupid you introduced, and then change the groupid of the project to a different name.