From c223ef7295614ea649043e3de6abc9d9b0880583 Mon Sep 17 00:00:00 2001 From: huanghaiquan Date: Wed, 18 Dec 2019 17:37:22 +0800 Subject: [PATCH] Fixed compilation errors of samples; --- pom.xml | 2 +- samples/contract-samples/pom.xml | 10 +++---- samples/pom.xml | 28 +++++++++++++++++ samples/sdk-samples/pom.xml | 9 ++---- .../SDK_GateWay_Participant_Regist_Test_.java | 29 +++++++++++++----- ...ateWay_Participant_State_Update_Test_.java | 30 ++++++++++++++----- 6 files changed, 81 insertions(+), 27 deletions(-) create mode 100644 samples/pom.xml diff --git a/pom.xml b/pom.xml index fd2fede6..0db59375 100644 --- a/pom.xml +++ b/pom.xml @@ -10,10 +10,10 @@ jdchain root project + project framework core deploy - project test sample diff --git a/samples/contract-samples/pom.xml b/samples/contract-samples/pom.xml index 15ac70d8..f542780b 100644 --- a/samples/contract-samples/pom.xml +++ b/samples/contract-samples/pom.xml @@ -2,12 +2,12 @@ - - contract - com.jd.blockchain - 1.1.2.RELEASE - 4.0.0 + + com.jd.blockchain + jdchain-samples + 1.2.0-SNAPSHOT + contract-samples diff --git a/samples/pom.xml b/samples/pom.xml new file mode 100644 index 00000000..26a33f96 --- /dev/null +++ b/samples/pom.xml @@ -0,0 +1,28 @@ + + 4.0.0 + + com.jd.blockchain + jdchain-parent + 1.1.1.RELEASE + ../project/parent + + + com.jd.blockchain + jdchain-samples + 1.2.0-SNAPSHOT + pom + + + 1.2.0-SNAPSHOT + + + + ../framework + sdk-samples + contract-samples + + + + diff --git a/samples/sdk-samples/pom.xml b/samples/sdk-samples/pom.xml index ece0c958..178d8d23 100644 --- a/samples/sdk-samples/pom.xml +++ b/samples/sdk-samples/pom.xml @@ -4,8 +4,8 @@ 4.0.0 com.jd.blockchain - sdk - 1.1.2.RELEASE + jdchain-samples + 1.2.0-SNAPSHOT sdk-samples @@ -20,11 +20,6 @@ ledger-model ${project.version} - - com.jd.blockchain - tools-initializer - ${project.version} - com.jd.blockchain contract-samples diff --git a/samples/sdk-samples/src/test/java/test/com/jd/blockchain/sdk/test/SDK_GateWay_Participant_Regist_Test_.java b/samples/sdk-samples/src/test/java/test/com/jd/blockchain/sdk/test/SDK_GateWay_Participant_Regist_Test_.java index 77157f0d..77c1e62e 100644 --- a/samples/sdk-samples/src/test/java/test/com/jd/blockchain/sdk/test/SDK_GateWay_Participant_Regist_Test_.java +++ b/samples/sdk-samples/src/test/java/test/com/jd/blockchain/sdk/test/SDK_GateWay_Participant_Regist_Test_.java @@ -1,17 +1,32 @@ package test.com.jd.blockchain.sdk.test; +import static org.junit.Assert.assertTrue; + +import org.junit.Before; +import org.junit.Test; + import com.jd.blockchain.binaryproto.DataContractRegistry; -import com.jd.blockchain.crypto.*; -import com.jd.blockchain.ledger.*; +import com.jd.blockchain.crypto.AddressEncoding; +import com.jd.blockchain.crypto.AsymmetricKeypair; +import com.jd.blockchain.crypto.HashDigest; +import com.jd.blockchain.crypto.KeyGenUtils; +import com.jd.blockchain.crypto.PrivKey; +import com.jd.blockchain.crypto.PubKey; +import com.jd.blockchain.ledger.BlockchainKeypair; +import com.jd.blockchain.ledger.EndpointRequest; +import com.jd.blockchain.ledger.NodeRequest; +import com.jd.blockchain.ledger.ParticipantRegisterOperation; +import com.jd.blockchain.ledger.ParticipantStateUpdateOperation; +import com.jd.blockchain.ledger.PreparedTransaction; +import com.jd.blockchain.ledger.TransactionContent; +import com.jd.blockchain.ledger.TransactionContentBody; +import com.jd.blockchain.ledger.TransactionRequest; +import com.jd.blockchain.ledger.TransactionResponse; +import com.jd.blockchain.ledger.TransactionTemplate; import com.jd.blockchain.sdk.BlockchainService; import com.jd.blockchain.sdk.client.GatewayServiceFactory; import com.jd.blockchain.sdk.samples.SDKDemo_Constant; -import com.jd.blockchain.tools.keygen.KeyGenCommand; import com.jd.blockchain.utils.net.NetworkAddress; -import org.junit.Before; -import org.junit.Test; - -import static org.junit.Assert.assertTrue; /** * 注册参与方测试 diff --git a/samples/sdk-samples/src/test/java/test/com/jd/blockchain/sdk/test/SDK_GateWay_Participant_State_Update_Test_.java b/samples/sdk-samples/src/test/java/test/com/jd/blockchain/sdk/test/SDK_GateWay_Participant_State_Update_Test_.java index 4fb229ce..d1ffb9e6 100644 --- a/samples/sdk-samples/src/test/java/test/com/jd/blockchain/sdk/test/SDK_GateWay_Participant_State_Update_Test_.java +++ b/samples/sdk-samples/src/test/java/test/com/jd/blockchain/sdk/test/SDK_GateWay_Participant_State_Update_Test_.java @@ -1,17 +1,33 @@ package test.com.jd.blockchain.sdk.test; +import static org.junit.Assert.assertTrue; + +import org.junit.Before; +import org.junit.Test; + import com.jd.blockchain.binaryproto.DataContractRegistry; -import com.jd.blockchain.crypto.*; -import com.jd.blockchain.ledger.*; +import com.jd.blockchain.crypto.AddressEncoding; +import com.jd.blockchain.crypto.AsymmetricKeypair; +import com.jd.blockchain.crypto.HashDigest; +import com.jd.blockchain.crypto.KeyGenUtils; +import com.jd.blockchain.crypto.PrivKey; +import com.jd.blockchain.crypto.PubKey; +import com.jd.blockchain.ledger.BlockchainKeypair; +import com.jd.blockchain.ledger.EndpointRequest; +import com.jd.blockchain.ledger.NodeRequest; +import com.jd.blockchain.ledger.ParticipantNodeState; +import com.jd.blockchain.ledger.ParticipantRegisterOperation; +import com.jd.blockchain.ledger.ParticipantStateUpdateOperation; +import com.jd.blockchain.ledger.PreparedTransaction; +import com.jd.blockchain.ledger.TransactionContent; +import com.jd.blockchain.ledger.TransactionContentBody; +import com.jd.blockchain.ledger.TransactionRequest; +import com.jd.blockchain.ledger.TransactionResponse; +import com.jd.blockchain.ledger.TransactionTemplate; import com.jd.blockchain.sdk.BlockchainService; import com.jd.blockchain.sdk.client.GatewayServiceFactory; import com.jd.blockchain.sdk.samples.SDKDemo_Constant; -import com.jd.blockchain.tools.keygen.KeyGenCommand; import com.jd.blockchain.utils.net.NetworkAddress; -import org.junit.Before; -import org.junit.Test; - -import static org.junit.Assert.assertTrue; /** * 参与方状态更新测试