Skip to content

Commit 3461258

Browse files
committed
[FAB-16136] Do not run tests in chaincode container
Set the gradle and maven rebuilds of the Java code when creating the chaincode container to not do the tests. These would have been run before deployment by the deverlopers. Doing so in Java slows down deployment quite a bit. Change-Id: Id3ffc2dc9a36c11c7cfe7f41e98aaeb234c478ad Signed-off-by: Matthew B. White <[email protected]>
1 parent 8ae8b6f commit 3461258

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

fabric-chaincode-docker/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
buildGradle() {
44
cd "$1" > /dev/null
55
echo "Gradle build"
6-
gradle build shadowJar
6+
gradle build shadowJar -x test
77
retval=$?
88
if [ $retval -ne 0 ]; then
99
exit $retval
@@ -19,7 +19,7 @@ buildGradle() {
1919
buildMaven() {
2020
cd "$1" > /dev/null
2121
echo "Maven build"
22-
mvn compile package
22+
mvn compile package -DskipTests -Dmaven.test.skip=true
2323
retval=$?
2424
if [ $retval -ne 0 ]; then
2525
exit $retval

fabric-contract-example/maven/src/main/java/org/example/MyAssetContract.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
import org.hyperledger.fabric.contract.annotation.Default;
1010
import org.hyperledger.fabric.contract.annotation.Transaction;
1111

12-
import io.swagger.v3.oas.annotations.info.Contact;
13-
import io.swagger.v3.oas.annotations.info.Info;
14-
import io.swagger.v3.oas.annotations.info.License;
12+
import org.hyperledger.fabric.contract.annotation.Contact;
13+
import org.hyperledger.fabric.contract.annotation.Info;
14+
import org.hyperledger.fabric.contract.annotation.License;
1515
import static java.nio.charset.StandardCharsets.UTF_8;
1616

1717
@Contract(name = "MyAssetContract",

0 commit comments

Comments
 (0)