<commit_before>#!/bin/bash

# set -x

BACKEND=mem
# uncomment the next line if you want to use an already running Cassandra server for the backend.
# BACKEND=cass

WFLY_VERSION=`grep "<version.wildfly>" pom.xml | sed -E 's/^.*y>(8.*l)<.*$/\1/'`

if [ ! -e core-api/target/rhq-metrics-api*.jar ]
then
    cd core-api
    mvn install
    cd ..
fi

if [ ! -e dummy-ui/target/dummy-ui*.war ]
then
    cd dummy-ui
    mvn install
    cd ..
fi

if [ ! -e rest-servlet/target/rhq-metric-rest*.war ]
then
    cd rest-servlet
    mvn install
    cd ..
fi

if [ ! -e target ]
then
    mkdir target
fi

if [ ! -e $HOME/.m2/repository/org/wildfly/wildfly-dist/8.0.0.Final/wildfly-dist-$WFLY_VERSION.zip ]
then
    echo "Downloading WildFly $WFLY_VERSION into local maven repository"
    mvn -P download_wildfly -DskipTests install
fi

if [ ! -e target/wild* ]
then
    cd target
    unzip $HOME/.m2/repository/org/wildfly/wildfly-dist/8.0.0.Final/wildfly-dist-$WFLY_VERSION.zip
    cd ..
fi

cp rest-servlet/target/rhq-metric-rest*.war target/wildfly-$WFLY_VERSION/standalone/deployments/
cp dummy-ui/target/dummy-ui*.war target/wildfly-$WFLY_VERSION/standalone/deployments/
target/wildfly-$WFLY_VERSION/bin/standalone.sh -Drhq-metrics.backend=$BACKEND --debug 8787<commit_msg>The directory needs to use the variable version as well.<commit_after>#!/bin/bash

# set -x

BACKEND=mem
# uncomment the next line if you want to use an already running Cassandra server for the backend.
# BACKEND=cass

WFLY_VERSION=`grep "<version.wildfly>" pom.xml | sed -E 's/^.*y>(8.*l)<.*$/\1/'`

if [ ! -e core-api/target/rhq-metrics-api*.jar ]
then
    cd core-api
    mvn install
    cd ..
fi

if [ ! -e dummy-ui/target/dummy-ui*.war ]
then
    cd dummy-ui
    mvn install
    cd ..
fi

if [ ! -e rest-servlet/target/rhq-metric-rest*.war ]
then
    cd rest-servlet
    mvn install
    cd ..
fi

if [ ! -e target ]
then
    mkdir target
fi

if [ ! -e $HOME/.m2/repository/org/wildfly/wildfly-dist/$WFLY_VERSION/wildfly-dist-$WFLY_VERSION.zip ]
then
    echo "Downloading WildFly $WFLY_VERSION into local maven repository"
    mvn -P download_wildfly -DskipTests install
fi

if [ ! -e target/wild* ]
then
    cd target
    unzip $HOME/.m2/repository/org/wildfly/wildfly-dist/$WFLY_VERSION/wildfly-dist-$WFLY_VERSION.zip
    cd ..
fi

cp rest-servlet/target/rhq-metric-rest*.war target/wildfly-$WFLY_VERSION/standalone/deployments/
cp dummy-ui/target/dummy-ui*.war target/wildfly-$WFLY_VERSION/standalone/deployments/
target/wildfly-$WFLY_VERSION/bin/standalone.sh -Drhq-metrics.backend=$BACKEND --debug 8787
{'fraction_non_alphanumeric': 0.1362048894062864, 'fraction_numerical': 0.008537058595265812, 'mean_word_length': 3.1248, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3882051', 'n_tokens_mistral': 1020, 'n_tokens_neox': 963, 'n_words': 214}