From 692bc1a8374a227a1a6efeb278e5602339185ebc Mon Sep 17 00:00:00 2001 From: "cedric.walter" Date: Sat, 8 Jul 2017 21:03:13 +0200 Subject: [PATCH] added dependency management for all bouncycastle dependencies, these jar are signed and can not be placed in shaded jar, copy them in a lib directory that will be use by shaded.jar classloader --- doc/build.md | 32 ++++---------------------------- gui/pom.xml | 51 +++++++++++++++++++++++++++++++++++++++++++++++---- pom.xml | 24 +++++++++++++++++++++--- 3 files changed, 72 insertions(+), 35 deletions(-) diff --git a/doc/build.md b/doc/build.md index bc9c6140b1..c4a370f786 100644 --- a/doc/build.md +++ b/doc/build.md @@ -112,31 +112,7 @@ It is not needed for a normal user to run such a "full node" but for the build i Prepare bisq build ----------------- -### 4. Get bisq source code and build a preliminary bisq version (don't run the jar, it wont work) - -We need to get the bisq dependencies resolved first as we need to copy the BouncyCastle jar to the JRE directory. - - $ git clone https://github.com/bitsquare/bitsquare.git - $ cd bisq - $ mvn clean package -DskipTests -Dmaven.javadoc.skip=true - -### 5. Copy the BouncyCastle provider jar file - -Copy the BountyCastle provider jar file from the local maven repository to the jre/lib/ext directory. -This prevents a "JCE cannot authenticate the provider BC" exception when starting the bisq client. - - $ sudo cp ~/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.53/bcprov-jdk15on-1.53.jar $JAVA_HOME/jre/lib/ext/ - -### 6. Edit the java.security file and add BouncyCastleProvider - -Add org.bouncycastle.jce.provider.BouncyCastleProvider as last entry at: List of providers and their preference orders -E.g.: -security.provider.10=org.bouncycastle.jce.provider.BouncyCastleProvider - - $ sudo gedit $JAVA_HOME/jre/lib/security/java.security - ... edit and save - -### 7. Enable unlimited Strength for cryptographic keys (only required for Oracle JDK) +### 1. Enable unlimited Strength for cryptographic keys (only required for Oracle JDK) If you are using Oracle JDK 8 you must **[enable strong cryptographic cyphers](https://github.com/jonathancross/jc-docs/blob/master/java-strong-crypto-test/README.md)**. If you use OpenJDK + OpenJFX you can skip this step. @@ -146,13 +122,13 @@ In Windows the new crypto files need to be copied to `Java/jdk1.8.0_xxx/jre/lib/ Build bisq ----------------- -### 8. Build final bisq jar +### 2. Build final bisq jar Now we have all prepared to build the correct bisq jar. $ mvn clean package verify -DskipTests -Dmaven.javadoc.skip=true -When the build completes, you will find an executable jar: `gui/target/shaded.jar`. +When the build completes, you will find an executable jar: `gui/target/shaded.jar` and a ./lib directory. To run it use: $ java -jar gui/target/shaded.jar @@ -160,7 +136,7 @@ To run it use: Build binaries ----------------- -If you want to build the binaries check out the build scripts under the package directory. +If you want to build the binaries check out the build scripts under the package directory. copy shaded.jar and the lib directory. DAO full node diff --git a/gui/pom.xml b/gui/pom.xml index af6168a0d8..7e50fdb4fe 100644 --- a/gui/pom.xml +++ b/gui/pom.xml @@ -49,19 +49,62 @@ + + + org.apache.maven.plugins + maven-dependency-plugin + 3.0.1 + + + copy-bouncycastle + package + + copy + + + true + + + org.bouncycastle + bcprov-jdk15on + true + ${project.build.directory}/lib + + + org.bouncycastle + bcpg-jdk15on + true + ${project.build.directory}/lib + + + + + + + org.apache.maven.plugins maven-shade-plugin 2.3 + + + org.bouncycastle:*:*:* + + false - - io.bisq.gui.app.BisqAppMain + + + io.bisq.gui.app.BisqAppMain + + lib/bcpg-jdk15on.jar lib/bcprov-jdk15on.jar + + true @@ -233,7 +276,7 @@ org.bitcoinj:orchid:1.1.1:jar:null:compile:7898329eae76ec6bfdf27081234bb222d5be09df - org.bouncycastle:bcprov-jdk15on:1.53:jar:null:compile:9d3def2fa5a0d2ed0c1146e9945df10d29eb4ccb + org.bouncycastle:bcprov-jdk15on:1.56:jar:null:compile:9d3def2fa5a0d2ed0c1146e9945df10d29eb4ccb org.controlsfx:controlsfx:8.0.6_20:jar:null:compile:5a4ca2765419fe12af0f0c7c5a8129c53bb661d9 diff --git a/pom.xml b/pom.xml index 30e5301b66..acb18638bf 100644 --- a/pom.xml +++ b/pom.xml @@ -131,19 +131,16 @@ org.bouncycastle bcprov-jdk15on - 1.56 org.bouncycastle bcpg-jdk15on - 1.56 org.bouncycastle bcpg-jdk16 - 1.46 @@ -264,4 +261,25 @@ + + + + + org.bouncycastle + bcprov-jdk15on + 1.56 + + + org.bouncycastle + bcpg-jdk15on + 1.56 + + + org.bouncycastle + bcpg-jdk16 + 1.46 + + + +