<commit_before>#!/bin/bash
###############################################################################
## Script to build Apache Knox on the Command Line
## Uses build.sh with options to
##  skip tests
##  skip integration tests
##  increase memory
##  increase permgen size
##  dump memory on crash dump
##  skip rat checks
## <NAME>
## M 17 Oct 2016
###############################################################################

if [[ -f ${HOME}/.bash_cysafa ]];then
    . ${HOME}/.bash_cysafa
else 
   echo "WARNING: No ${HOME}/.bash_cysafa file"
fi

# Allow heapdumps from Java
ulimit -c unlimited

# -t: skip tests
# -i: skip integration tests
# -m: increase memory
# -p: increase permgen size
# -p: dump memory on crash dump
# -r: skip rat checks
${ODSC_KNOX_LOCATION}/build.sh -t -i -m -p -r


#mvn -Ppackage install
<commit_msg>Cleaning specific files which are known to cause issue with the rat plugin<commit_after>#!/bin/bash
###############################################################################
## Script to build Apache Knox on the Command Line
## Uses build.sh with options to
##  skip tests
##  skip integration tests
##  increase memory
##  increase permgen size
##  dump memory on crash dump
## <NAME>
## M 17 Oct 2016
###############################################################################

if [[ -f ${HOME}/.bash_cysafa ]];then
    . ${HOME}/.bash_cysafa
else 
   echo "WARNING: No ${HOME}/.bash_cysafa file"
fi

# Allow heapdumps from Java
ulimit -c unlimited

# Remove these files which tend to cause the maven-rat-plugin to die
find . -type f -name 'hs_err_pid*.log' -exec rm {} \;
find . -type f -name build.log -exec rm {} \;
find . -type f -name core -exec rm {} \;

# -t: skip tests
# -i: skip integration tests
# -m: increase memory
# -p: increase permgen size
# -p: dump memory on crash dump
${ODSC_KNOX_LOCATION}/build.sh -t -i -m -p

{'fraction_non_alphanumeric': 0.2725344644750795, 'fraction_numerical': 0.006362672322375398, 'mean_word_length': 4.127717391304348, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1717750', 'n_tokens_mistral': 595, 'n_tokens_neox': 555, 'n_words': 213}