Skip to content

Commit 7645bb9

Browse files
committed
Move to use Maven Wrapper
Update the versions of Gradle and Maven Move to use the Maven wrapper for all new builds Signed-off-by: Matthew B White <[email protected]>
1 parent 9690e4d commit 7645bb9

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

fabric-chaincode-docker/Dockerfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,13 @@ RUN rm -rf shim-src
5959
#Gradle doesn't run without settings.gradle file, so create one
6060
RUN touch settings.gradle
6161
RUN gradle wrapper
62+
RUN mvn -N io.takari:maven:wrapper
6263

6364
# Creating final javaenv image which will include all required
6465
# dependencies to build and compile java chaincode
6566
FROM adoptopenjdk/openjdk11:jdk-11.0.4_11-alpine
6667
RUN apk add --no-cache bash
6768

68-
COPY --from=dependencies /root/chaincode-java/gradle /root/chaincode-java/
69-
COPY --from=dependencies /root/chaincode-java/gradlew /root/chaincode-java/gradlew
70-
COPY --from=builder /root/.sdkman/candidates/maven/current /usr/bin/maven
71-
7269
SHELL ["/bin/bash", "-c"]
7370
ENV PATH="/usr/bin/maven/bin:/usr/bin/maven/:/usr/bin/gradle:/usr/bin/gradle/bin:${PATH}"
7471

fabric-chaincode-docker/build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ buildMaven() {
3838
tar cf - . | (cd ${TMP_DIR}; tar xf -)
3939
cd ${TMP_DIR}
4040
echo "Maven build"
41-
mvn compile package -DskipTests -Dmaven.test.skip=true
41+
42+
./mvnw compile package -DskipTests -Dmaven.test.skip=true
43+
4244
retval=$?
4345
if [ $retval -ne 0 ]; then
4446
exit $retval

0 commit comments

Comments
 (0)