blob: c74ae6a3ad6732991f72838bcc27b14e669ab150 [file] [log] [blame]
Build instructions for Apache Commons Crypto
----------------------------------------------------------------------------------
Requirements:
* Unix System (Linux or Mac), or Windows with MinGW
* JDK 8 or above (environment variable JAVA_HOME must be set)
* Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy
Files (if running unit tests)
* export JAVA_HOME
* Maven 3.0 or above
* Make
* OpenSSL devel 1.1.1 or above (OpenSSL library header files are required)
* GCC
* G++
Profile win64 on Ubuntu 64-bit:
apt-get install mingw-w64
apt install x86_64-w64-mingw32-gcc
Profile win32 on Ubuntu 64-bit:
apt install gcc-mingw-w64-i686
Profile linux32 on Ubuntu 64-bit:
dpkg --add-architecture i386
apt-get update
apt-get install libssl-dev:i386
sudo apt-get install g++-multilib
----------------------------------------------------------------------------------
Install JCE Unlimited Strength Jurisdiction Policy Files:
Download the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files from Oracle:
For JDK 1.8: http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
Install JCE Unlimited Strength Jurisdiction Policy Files to JDK:
Copy downloaded local_policy.jar and US_export_policy.jar to <java-home>/jre/lib/security/
----------------------------------------------------------------------------------
Verify OpenSSL version:
Check OpenSSL version:
$ openssl version
If it is not 1.0.1c or above, upgrade OpenSSL version to 1.0.1c or above:
Upgrade OpenSSL in Linux:
You can follow your OS distribution instructions to upgrade OpenSSL to a proper version.
Upgrade OpenSSL in Mac:
$ brew install openssl101
$ brew link openssl --force
Get OpenSSL headers: sudo apt -y install libssl-dev
Cross compile to 32-bit from Linux 64-bit: sudo apt-get install gcc-multilib
----------------------------------------------------------------------------------
Maven build goals:
* Clean : mvn clean
* Compile : mvn compile
* Run tests : mvn test
* Run Release Audit Check : mvn apache-rat:check
* Run API Compatibility Check : mvn japicmp:cmp
* Build the site : mvn site
* Build Javadocs : mvn javadoc:javadoc -Ddoclint=all
* Run benchmarks : mvn clean test -Pbenchmark
* Run test; no JNI build : mvn clean test -Dmaven.antrun.skip
* Create JAR : mvn package
* Run SpotBugs Check : mvn compile spotbugs:check
* Run Checkstyle Check : mvn compile checkstyle:check
* Install JAR in M2 cache : mvn install
* Deploy JAR to Maven repo : mvn deploy
* Change version : mvn versions:set -DnewVersion=NEWVERSION
----------------------------------------------------------------------------------
Importing projects to eclipse
File menu: Choose Import..., select "Existing Maven Project".
----------------------------------------------------------------------------------
Building distributions:
Please read http://commons.apache.org/releases/index.html