runUimaClass.* scripts are currently copied from uimaj distribution during UIMA AS maven assembly. Both scripts check if ACTIVEMQ_HOME is set. If not, the scripts define ACTIVEMQ_HOME variable and set it to $UIMA_HOME/apache-activemq-4.1.1. Copy both scripts to uima-as-distr scripts folder, change them to point to apache-activemq-5.4.1 and finally exclude them (in bin.xml) from being copied from uimaj to uima-as/bin.