I. Introduction to Apollo
Apache Apollo is a proxy server, developed on the basis of ACTIVEMQ, can support stomp, AMQP, MQTT, Openwire, SSL, and WebSockets and many other protocols.
Website link
Using Apollo on its own is primarily used as an MQTT server.
Two. Source code download
Code Download compilation Official Guide
Using the SVN Checkout code:
SVN Co http://svn.apache.org/repos/asf/activemq/activemq-apollo/trunk Apollo
Three. Environmental preparedness
JDK1.7
Download the JDK website
Scala 2.12.2
Scala Installation Tutorials
Download the Scala website
mvn3.5.0
MAVEN official website
Four. Compiling
1. Go to the source code directory
2. Increase the memory configuration because the Apollo compilation consumes memory export maven_opts= "-xmx512m-xx:maxpermsize=128m"
3. Compile mvn-dtest=false Install skip test Step the test process is performed during the Apollo compilation process, such as:------------------------------------------------------T E s T s-------------------------------------------------------Running Org.apache.activemq.apollo.openwire.codec.BooleanStreamTestTests Run:4, failures:0, errors:0, skipped:0, time elapsed:0.825 secrunning Org.apache.activemq.apollo.openwire.test.OpenwireBDBParallelTestParallelJUnitRunner Using the up to 8 threads to execute parallel tests.
Official compilation Guidance Document
Five. Compiling the build directory
Apollo Source code/apollo-distro/target
Six. Problems with compilation:
1.jdk1.8 and Scala are not compatible
An is broken error occurred while compiling the Scala program, as follows:
/library/java/javavirtualmachines/jdk1.8.0_131.jdk/contents/home/jre/lib/rt.jar (java/lang/reflect/ Annotatedelement.class) ' is broken
You can change the JDK to 1.7 to compile.
2.Exception in thread "main" Java.lang.OutOfMemoryError:PermGen space
Execute before compiling
Export maven_opts= "-xmx512m-xx:maxpermsize=128m"
This article is from the "www.bogo.com" blog, make sure to keep this source http://483181.blog.51cto.com/473181/1950769
30.apollo source code is compiled under Mac