Skip to content

Commit

Permalink
[FAB-13097] Getting correct jar
Browse files Browse the repository at this point in the history
Instead using mvn dependency:get we use wget from
hyperledger nexus and mvn install:install-file

Change-Id: Ia47cca2c6aa22f28777ed410a5fbce07511d2e73
Signed-off-by: gennady <[email protected]>
  • Loading branch information
gennadylaventman committed Jan 9, 2019
1 parent cc76d2f commit c3e342a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions fabric-chaincode-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,16 @@ RUN mvn compile package
WORKDIR /root/chaincode-java

# Adding shim 1.3.0 jar
RUN source /root/.sdkman/bin/sdkman-init.sh; mvn dependency:get -DgroupId=org.hyperledger.fabric-chaincode-java -DartifactId=fabric-chaincode-shim -Dversion=1.3.0 -DremoteRepositoriescentral::default::https://nexus.hyperledger.org/content/repositories/releases
WORKDIR /tmp
RUN wget https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/1.3.0/fabric-chaincode-shim-1.3.0.pom
RUN wget https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/1.3.0/fabric-chaincode-shim-1.3.0.jar
RUN wget https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric-chaincode-java/fabric-chaincode-protos/1.3.0/fabric-chaincode-protos-1.3.0.pom
RUN wget https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric-chaincode-java/fabric-chaincode-protos/1.3.0/fabric-chaincode-protos-1.3.0.jar
RUN mvn install::install-file -Dfile=fabric-chaincode-protos-1.3.0.jar -DpomFile=fabric-chaincode-protos-1.3.0.pom
RUN mvn install::install-file -Dfile=fabric-chaincode-shim-1.3.0.jar -DpomFile=fabric-chaincode-shim-1.3.0.pom

#Removing non-needed sources
RUN rm -rf example-src
WORKDIR /root/chaincode-javaRUN rm -rf example-src
RUN rm -rf shim-src

# Creating final javaenv image which will include all required
Expand Down

0 comments on commit c3e342a

Please sign in to comment.