@@ -34,9 +34,7 @@ RUN gradle \
3434 clean \
3535 fabric-chaincode-protos:build \
3636 fabric-chaincode-protos:publishToMavenLocal \
37- # Wfabric-chaincode-protos:publishProtosJarPublicationToMavenLocal \
3837 fabric-chaincode-shim:build \
39- # fabric-chaincode-shim:publishShimJarPublicationToMavenLocal \
4038 fabric-chaincode-shim:publishToMavenLocal \
4139 -x javadoc \
4240 -x test \
@@ -52,10 +50,8 @@ RUN mvn -f pom-default.xml compile
5250WORKDIR /root/chaincode-java/shim-src/fabric-chaincode-shim/build/publications/shimJar/
5351RUN mvn -f pom-default.xml compile
5452
55- # Removing non-needed sources
56- WORKDIR /root/chaincode-java
57- RUN rm -rf shim-src
58-
53+ # Run the Gradle and Maven commands to generate the wrapper variants
54+ # of each tool
5955# Gradle doesn't run without settings.gradle file, so create one
6056RUN touch settings.gradle
6157RUN gradle wrapper
@@ -67,8 +63,8 @@ FROM adoptopenjdk/openjdk11:jdk-11.0.4_11-alpine
6763RUN apk add --no-cache bash
6864
6965SHELL ["/bin/bash" , "-c" ]
70- ENV PATH="/usr/bin/maven/bin:/usr/bin/maven/:/usr/bin/gradle:/usr/bin/gradle/bin:${PATH}"
7166
67+ # Copy setup scripts, and the cached dependeices
7268COPY --from=dependencies /root/chaincode-java /root/chaincode-java
7369COPY --from=dependencies /root/.m2 /root/.m2
7470
0 commit comments