<commit_before>VERSION=0.0.3
PEGASUS_MOD=pegasus
PEGASUS_PACKAGE_NAME=policy-pegasus
ADAPT_MOD=adapt
ADAPT_PACKAGE_NAME=policy-adapt
DIST_DIR=dist
BUILD_DIR=build

dist_pegasus: build_pegasus
	cd ${PEGASUS_MOD}/target && tar -czf ../../${DIST_DIR}/${PEGASUS_PACKAGE_NAME}-${VERSION}.tar.gz ${PEGASUS_PACKAGE_NAME}-${VERSION}.war

dist_adapt: build_adapt
	cd ${BUILD_DIR} && tar -czf ../${DIST_DIR}/${ADAPT_PACKAGE_NAME}-${VERSION}.tar.gz ${ADAPT_PACKAGE_NAME}
	
build_pegasus: prepare
	mvn install --projects pegasus -Dmaven.test.skip=true

build_adapt: prepare
	mvn install --projects adapt -Dmaven.test.skip=true
	mkdir -p ${BUILD_DIR}/${ADAPT_PACKAGE_NAME}/lib
	cp -f ${ADAPT_MOD}/target/*.jar ${BUILD_DIR}/${ADAPT_PACKAGE_NAME}/lib
	#rm -f ${BUILD_DIR}/${ADAPT_PACKAGE_NAME}/lib/junit*.jar
	#rm -f ${BUILD_DIR}/${ADAPT_PACKAGE_NAME}/lib/ptm*.jar
	#rm -f ${BUILD_DIR}/${ADAPT_PACKAGE_NAME}/lib/bestman2-client*.jar
	#rm -f ${BUILD_DIR}/${ADAPT_PACKAGE_NAME}/lib/log4j*.jar
	cp -f ${ADAPT_MOD}/src/main/java/edu/isi/policy/adapt/DemoAdaptClient.java ${BUILD_DIR}/${ADAPT_PACKAGE_NAME}
	cp -f ${ADAPT_MOD}/src/main/resources/* ${BUILD_DIR}/${ADAPT_PACKAGE_NAME}
	cp -f ${ADAPT_MOD}/scripts/* ${BUILD_DIR}/${ADAPT_PACKAGE_NAME}

prepare:
	mkdir -p ${DIST_DIR}
	mkdir -p ${BUILD_DIR}

clean:
	mvn clean
	rm -rf ${DIST_DIR}
	rm -rf ${BUILD_DIR}

<commit_msg>make all rule to simplify mvn call<commit_after>VERSION=0.0.3
PEGASUS_MOD=pegasus
PEGASUS_PACKAGE_NAME=policy-pegasus
ADAPT_MOD=adapt
ADAPT_PACKAGE_NAME=policy-adapt
DIST_DIR=dist
BUILD_DIR=build

all:
	mvn install -Dmaven.test.skip=true

dist_pegasus: build_pegasus
	cd ${PEGASUS_MOD}/target && tar -czf ../../${DIST_DIR}/${PEGASUS_PACKAGE_NAME}-${VERSION}.tar.gz ${PEGASUS_PACKAGE_NAME}-${VERSION}.war

dist_adapt: build_adapt
	cd ${BUILD_DIR} && tar -czf ../${DIST_DIR}/${ADAPT_PACKAGE_NAME}-${VERSION}.tar.gz ${ADAPT_PACKAGE_NAME}
	
build_pegasus: prepare
	mvn install --projects pegasus -Dmaven.test.skip=true

build_adapt: prepare
	mvn install --projects adapt -Dmaven.test.skip=true
	mkdir -p ${BUILD_DIR}/${ADAPT_PACKAGE_NAME}/lib
	cp -f ${ADAPT_MOD}/target/*.jar ${BUILD_DIR}/${ADAPT_PACKAGE_NAME}/lib
	#rm -f ${BUILD_DIR}/${ADAPT_PACKAGE_NAME}/lib/junit*.jar
	#rm -f ${BUILD_DIR}/${ADAPT_PACKAGE_NAME}/lib/ptm*.jar
	#rm -f ${BUILD_DIR}/${ADAPT_PACKAGE_NAME}/lib/bestman2-client*.jar
	#rm -f ${BUILD_DIR}/${ADAPT_PACKAGE_NAME}/lib/log4j*.jar
	cp -f ${ADAPT_MOD}/src/main/java/edu/isi/policy/adapt/DemoAdaptClient.java ${BUILD_DIR}/${ADAPT_PACKAGE_NAME}
	cp -f ${ADAPT_MOD}/src/main/resources/* ${BUILD_DIR}/${ADAPT_PACKAGE_NAME}
	cp -f ${ADAPT_MOD}/scripts/* ${BUILD_DIR}/${ADAPT_PACKAGE_NAME}

prepare:
	mkdir -p ${DIST_DIR}
	mkdir -p ${BUILD_DIR}

clean:
	mvn clean
	rm -rf ${DIST_DIR}
	rm -rf ${BUILD_DIR}


{'fraction_non_alphanumeric': 0.17117117117117117, 'fraction_numerical': 0.0036036036036036037, 'mean_word_length': 5.578199052132701, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '428504', 'n_tokens_mistral': 1213, 'n_tokens_neox': 1158, 'n_words': 178}