mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-22 14:42:37 +01:00
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
This commit is contained in:
parent
5d05326991
commit
692bc1a837
3 changed files with 72 additions and 35 deletions
32
doc/build.md
32
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
|
Prepare bisq build
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
### 4. Get bisq source code and build a preliminary bisq version (don't run the jar, it wont work)
|
### 1. Enable unlimited Strength for cryptographic keys (only required for Oracle JDK)
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
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.
|
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
|
Build bisq
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
### 8. Build final bisq jar
|
### 2. Build final bisq jar
|
||||||
|
|
||||||
Now we have all prepared to build the correct bisq jar.
|
Now we have all prepared to build the correct bisq jar.
|
||||||
|
|
||||||
$ mvn clean package verify -DskipTests -Dmaven.javadoc.skip=true
|
$ 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:
|
To run it use:
|
||||||
|
|
||||||
$ java -jar gui/target/shaded.jar
|
$ java -jar gui/target/shaded.jar
|
||||||
|
@ -160,7 +136,7 @@ To run it use:
|
||||||
Build binaries
|
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
|
DAO full node
|
||||||
|
|
51
gui/pom.xml
51
gui/pom.xml
|
@ -49,19 +49,62 @@
|
||||||
</resources>
|
</resources>
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<!-- Bouncycastle jars are signed and cannot be placed inside shaded jar.
|
||||||
|
we ship them beside our app in /lib -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<version>3.0.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>copy-bouncycastle</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<stripVersion>true</stripVersion>
|
||||||
|
<artifactItems>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.bouncycastle</groupId>
|
||||||
|
<artifactId>bcprov-jdk15on</artifactId>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
||||||
|
</artifactItem>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.bouncycastle</groupId>
|
||||||
|
<artifactId>bcpg-jdk15on</artifactId>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
||||||
|
</artifactItem>
|
||||||
|
</artifactItems>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>2.3</version>
|
<version>2.3</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<artifactSet>
|
||||||
|
<excludes>
|
||||||
|
<exclude>org.bouncycastle:*:*:*</exclude>
|
||||||
|
</excludes>
|
||||||
|
</artifactSet>
|
||||||
<!-- broken with Java 8 (MSHADE-174), using ProGuard instead. -->
|
<!-- broken with Java 8 (MSHADE-174), using ProGuard instead. -->
|
||||||
<minimizeJar>false</minimizeJar>
|
<minimizeJar>false</minimizeJar>
|
||||||
<transformers>
|
<transformers>
|
||||||
<transformer
|
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
<manifestEntries>
|
||||||
<mainClass>io.bisq.gui.app.BisqAppMain</mainClass>
|
<Main-Class>io.bisq.gui.app.BisqAppMain</Main-Class>
|
||||||
|
<!-- the specified bouncy castle jar classes -->
|
||||||
|
<Class-Path>lib/bcpg-jdk15on.jar lib/bcprov-jdk15on.jar</Class-Path>
|
||||||
|
</manifestEntries>
|
||||||
</transformer>
|
</transformer>
|
||||||
</transformers>
|
</transformers>
|
||||||
|
<shadedArtifactAttached>true</shadedArtifactAttached>
|
||||||
<filters>
|
<filters>
|
||||||
<filter>
|
<filter>
|
||||||
<!-- exclude signatures, the bundling process breaks them for some reason -->
|
<!-- exclude signatures, the bundling process breaks them for some reason -->
|
||||||
|
@ -233,7 +276,7 @@
|
||||||
org.bitcoinj:orchid:1.1.1:jar:null:compile:7898329eae76ec6bfdf27081234bb222d5be09df
|
org.bitcoinj:orchid:1.1.1:jar:null:compile:7898329eae76ec6bfdf27081234bb222d5be09df
|
||||||
</urn>
|
</urn>
|
||||||
<urn>
|
<urn>
|
||||||
org.bouncycastle:bcprov-jdk15on:1.53:jar:null:compile:9d3def2fa5a0d2ed0c1146e9945df10d29eb4ccb
|
org.bouncycastle:bcprov-jdk15on:1.56:jar:null:compile:9d3def2fa5a0d2ed0c1146e9945df10d29eb4ccb
|
||||||
</urn>
|
</urn>
|
||||||
<urn>
|
<urn>
|
||||||
org.controlsfx:controlsfx:8.0.6_20:jar:null:compile:5a4ca2765419fe12af0f0c7c5a8129c53bb661d9
|
org.controlsfx:controlsfx:8.0.6_20:jar:null:compile:5a4ca2765419fe12af0f0c7c5a8129c53bb661d9
|
||||||
|
|
24
pom.xml
24
pom.xml
|
@ -131,19 +131,16 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bouncycastle</groupId>
|
<groupId>org.bouncycastle</groupId>
|
||||||
<artifactId>bcprov-jdk15on</artifactId>
|
<artifactId>bcprov-jdk15on</artifactId>
|
||||||
<version>1.56</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- We need both bcpg-jdk15on and bcpg-jdk16 -->
|
<!-- We need both bcpg-jdk15on and bcpg-jdk16 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bouncycastle</groupId>
|
<groupId>org.bouncycastle</groupId>
|
||||||
<artifactId>bcpg-jdk15on</artifactId>
|
<artifactId>bcpg-jdk15on</artifactId>
|
||||||
<version>1.56</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bouncycastle</groupId>
|
<groupId>org.bouncycastle</groupId>
|
||||||
<artifactId>bcpg-jdk16</artifactId>
|
<artifactId>bcpg-jdk16</artifactId>
|
||||||
<version>1.46</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--utils-->
|
<!--utils-->
|
||||||
|
@ -264,4 +261,25 @@
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
|
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.bouncycastle</groupId>
|
||||||
|
<artifactId>bcprov-jdk15on</artifactId>
|
||||||
|
<version>1.56</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.bouncycastle</groupId>
|
||||||
|
<artifactId>bcpg-jdk15on</artifactId>
|
||||||
|
<version>1.56</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.bouncycastle</groupId>
|
||||||
|
<artifactId>bcpg-jdk16</artifactId>
|
||||||
|
<version>1.46</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Add table
Reference in a new issue