<commit_before><?xml version="1.1"?>

<!-- 

Copyright (C) 2016 - <NAME> / Rapid Information Systems

<EMAIL>


This file is part of the Rapid Application Platform

Rapid is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as 
published by the Free Software Foundation, either version 3 of the 
License, or (at your option) any later version. The terms require you 
to include the original copyright, and the license notice in all redistributions.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
in a file named "COPYING".  If not, see <http://www.gnu.org/licenses/>.

 -->

<!-- 

How to use this file in Eclipse

Import the Rapid source into Eclipse as a Dynamic Web Project

Create a new, custom, Dynamic Web Project and copy the WebContent/WEB-INF/build folder into your new project

Edit the build.properties file that you just coped over in your new project and set rapid_base to the directory of the imported Rapid sources project above.
(Windows paths need the back slashes escaped i.e. c:\\users\\)

View the properties of your new Dynamic Web Project, select "Builders", and click "New...". 
Choose "Ant Builder".
In the "Main" tab give it a useful name (like Custom build) and choose the "Browse Workspace..." button to set the "Buildfile" to this file.
In the "Targets" tab empty "After a 'Clean'" and "Manual Build". For "Auto Build" click the "Set Targets..." button and choose compile. 

-->

<project name="Custom Rapid instance builder" default="info">

	<property file="build.properties" />

	<target name="info">
		<echo>Custom Rapid builder v 1.1</echo>
	</target>

	<target name="clean">
		<echo>Cleaning custom Rapid instance</echo>
		<echo>not implemented yet...</echo>
	</target>

	<target name="rapid_base-check">
		<available file="${rapid_base}" property="rapid_base.present" />
	</target>

	<target name="rapid_base-check_fail" unless="rapid_base.present">
		<echo>rapid_base directory ${rapid)base} does not exist</echo>
	</target>

	<target name="compile" depends="rapid_base-check,rapid_base-check_fail" if="rapid_base.present">
		<echo>Compiling custom Rapid instance</echo>
		<echo>basedir is ${basedir}</echo>
		<echo>rapid_base is ${rapid_base}</echo>
		<echo>Copying WebContent</echo>
		<copy todir="${basedir}/../../../WebContent" includeEmptyDirs="true" verbose="true">
			<fileset dir="${rapid_base}/WebContent" defaultexcludes="no">
				<exclude name="**/custombuild/build.properties" />  <!-- don't overwrite our own properties -->
				<exclude name="**/scripts/propertiescustom.js" /> <!-- don't overwrite the custom properties file -->
				<exclude name="**/database/databaseDrivers.xml" /> <!-- don't overwrite the database drivers.xml file -->
				<exclude name="**/logs/Rapid*.log" /> <!-- exclude all log files -->
				<exclude name="**/web.xml" /> <!-- don't overwrite user web.xml -->
				<exclude name="**/applications/**" /> <!-- exclude all applications -->
			</fileset>
			<fileset dir="${rapid_base}/WebContent">
			    <exclude name="**/rapid/*/security.xml" />  <!-- don't overwrite user security.xml for Rapid Admin and Rapid Design -->
			    <include name="**/applications/rapid/**" /> <!-- include both rapid web and application folders -->
			</fileset>
		</copy>
		<echo>Copying source</echo>
		<copy todir="${basedir}/../../../src" includeEmptyDirs="true" verbose="true">
			<fileset dir="${rapid_base}/src" />
		</copy>
		<!-- delete the annoying ${web:rootDir} if logging was not properly initialised -->
		<delete includeEmptyDirs="true"  failonerror="false">
    		<fileset dir="${basedir}/../../../${web:rootDir}"/>
  		</delete>
	</target>

</project><commit_msg>Exclude all _backups folders from Custom build<commit_after><?xml version="1.1"?>

<!-- 

Copyright (C) 2017 - <NAME> / Rapid Information Systems

<EMAIL>


This file is part of the Rapid Application Platform

Rapid is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as 
published by the Free Software Foundation, either version 3 of the 
License, or (at your option) any later version. The terms require you 
to include the original copyright, and the license notice in all redistributions.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
in a file named "COPYING".  If not, see <http://www.gnu.org/licenses/>.

 -->

<!-- 

How to use this file in Eclipse

Import the Rapid source into Eclipse as a Dynamic Web Project

Create a new, custom, Dynamic Web Project and copy the WebContent/WEB-INF/build folder into your new project

Edit the build.properties file that you just coped over in your new project and set rapid_base to the directory of the imported Rapid sources project above.
(Windows paths need the back slashes escaped i.e. c:\\users\\)

View the properties of your new Dynamic Web Project, select "Builders", and click "New...". 
Choose "Ant Builder".
In the "Main" tab give it a useful name (like Custom build) and choose the "Browse Workspace..." button to set the "Buildfile" to this file.
In the "Targets" tab empty "After a 'Clean'" and "Manual Build". For "Auto Build" click the "Set Targets..." button and choose compile. 

-->

<project name="Custom Rapid instance builder" default="info">

	<property file="build.properties" />

	<target name="info">
		<echo>Custom Rapid builder v 1.2</echo>
	</target>

	<target name="clean">
		<echo>Cleaning custom Rapid instance</echo>
		<echo>not implemented yet...</echo>
	</target>

	<target name="rapid_base-check">
		<available file="${rapid_base}" property="rapid_base.present" />
	</target>

	<target name="rapid_base-check_fail" unless="rapid_base.present">
		<echo>rapid_base directory ${rapid)base} does not exist</echo>
	</target>

	<target name="compile" depends="rapid_base-check,rapid_base-check_fail" if="rapid_base.present">
		<echo>Compiling custom Rapid instance</echo>
		<echo>basedir is ${basedir}</echo>
		<echo>rapid_base is ${rapid_base}</echo>
		<echo>Copying WebContent</echo>
		<copy todir="${basedir}/../../../WebContent" includeEmptyDirs="true" verbose="true">
			<fileset dir="${rapid_base}/WebContent" defaultexcludes="no">
				<exclude name="**/custombuild/build.properties" />  <!-- don't overwrite our own properties -->
				<exclude name="**/scripts/propertiescustom.js" /> <!-- don't overwrite the custom properties file -->
				<exclude name="**/database/databaseDrivers.xml" /> <!-- don't overwrite the database drivers.xml file -->
				<exclude name="**/logs/Rapid*.log" /> <!-- exclude all log files -->
				<exclude name="**/web.xml" /> <!-- don't overwrite user web.xml -->
				<exclude name="**/applications/**" /> <!-- exclude all applications -->
				<exclude name="**/_backups/**" /> <!-- exclude all backups -->
			</fileset>
			<fileset dir="${rapid_base}/WebContent">
			    <exclude name="**/rapid/*/security.xml" />  <!-- don't overwrite user security.xml for Rapid Admin and Rapid Design -->
			    <include name="**/applications/rapid/**" /> <!-- include both rapid web and application folders -->
			</fileset>
		</copy>
		<echo>Copying source</echo>
		<copy todir="${basedir}/../../../src" includeEmptyDirs="true" verbose="true">
			<fileset dir="${rapid_base}/src" />
		</copy>
		<!-- delete the annoying ${web:rootDir} if logging was not properly initialised -->
		<delete includeEmptyDirs="true"  failonerror="false">
    		<fileset dir="${basedir}/../../../${web:rootDir}"/>
  		</delete>
	</target>

</project>
{'fraction_non_alphanumeric': 0.1410958904109589, 'fraction_numerical': 0.00224159402241594, 'mean_word_length': 3.982009925558313, 'pattern_counts': {'":': 0, '<': 139, '<?xml version=': 2, '>': 139, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 14}, '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': '398442', 'n_tokens_mistral': 2487, 'n_tokens_neox': 2277, 'n_words': 866}