<commit_before><?xml version="1.0" encoding="UTF-8"?>

<!-- $Revision: 1.6 $ $Date: 2003/08/16 15:42:03 $ -->

<project default="default"
  xmlns:j="jelly:core"
  xmlns:u="jelly:util"
  xmlns:ant="jelly:ant">
  
  <!-- ================= -->
  <!-- Global Properties -->
  <!-- ================= -->
  
  <!-- Determine what the top-level project root is -->
  <j:set var="project.root" value="${pom.parentBasedir().getParentFile().getCanonicalFile()}"/>
  
  <!-- Load the global properties -->
  <ant:property file="${project.root}/etc/global.properties"/>
  
  
  <!-- ==================== -->
  <!-- Default Global Goals -->
  <!-- ==================== -->
  
  <goal name="default">
    <attainGoal name="jar:install"/>
  </goal>
  
  <goal name="build">
    <attainGoal name="default"/>
  </goal>
  
  <goal name="rebuild">
    <attainGoal name="clean"/>
    <attainGoal name="build"/>
  </goal>
  
  <!-- For testing -->
  <goal name="hello">
    <ant:echo>H E L L O</ant:echo>
  </goal>
  
  <!-- Remove classes which depend on changed files, so they will rebuild. -->
  <preGoal name="java:compile">
    <j:if test="${sourcesPresent}">
      <ant:depend srcdir="${maven.compile.source}"
                  destdir="${maven.build.dest}"
                  dump="false"
                  closure="false">
        <j:forEach var="sm" items="${pom.build.sourceModifications}">
          <ant:available property="classPresent" classname="${sm.className}"/>
          <j:if test="${classPresent != 'true'}">
            <j:forEach var="exclude" items="${sm.excludes}">
              <ant:exclude name="${exclude}"/>
            </j:forEach>
            <j:forEach var="include" items="${sm.includes}">
              <ant:include name="${include}"/>
            </j:forEach>
          </j:if>
        </j:forEach>
      </ant:depend>
    </j:if>
  </preGoal>
  
</project><commit_msg> o added cleanse-sources goal to help deal with tab & CRLF issues PR: Obtained from: Submitted by: Reviewed by:<commit_after><?xml version="1.0" encoding="UTF-8"?>

<!-- $Revision: 1.7 $ $Date: 2003/08/17 08:29:20 $ -->

<project default="default"
  xmlns:j="jelly:core"
  xmlns:u="jelly:util"
  xmlns:ant="jelly:ant">
  
  <!-- ================= -->
  <!-- Global Properties -->
  <!-- ================= -->
  
  <!-- Determine what the top-level project root is -->
  <j:set var="project.root" value="${pom.parentBasedir().getParentFile().getCanonicalFile()}"/>
  
  <!-- Load the global properties -->
  <ant:property file="${project.root}/etc/global.properties"/>
  
  
  <!-- ==================== -->
  <!-- Default Global Goals -->
  <!-- ==================== -->
  
  <goal name="default">
    <attainGoal name="jar:install"/>
  </goal>
  
  <goal name="build">
    <attainGoal name="default"/>
  </goal>
  
  <goal name="rebuild">
    <attainGoal name="clean"/>
    <attainGoal name="build"/>
  </goal>
  
  <!-- For testing -->
  <goal name="hello">
    <ant:echo>
      H E L L O
      ---------
      Module Name: ${pom.name}
    </ant:echo>
  </goal>
  
  <!-- Remove classes which depend on changed files, so they will rebuild. -->
  <preGoal name="java:compile">
    <j:if test="${sourcesPresent}">
      <ant:depend srcdir="${maven.compile.source}"
                  destdir="${maven.build.dest}"
                  dump="false"
                  closure="false">
        <j:forEach var="sm" items="${pom.build.sourceModifications}">
          <ant:available property="classPresent" classname="${sm.className}"/>
          <j:if test="${classPresent != 'true'}">
            <j:forEach var="exclude" items="${sm.excludes}">
              <ant:exclude name="${exclude}"/>
            </j:forEach>
            <j:forEach var="include" items="${sm.includes}">
              <ant:include name="${include}"/>
            </j:forEach>
          </j:if>
        </j:forEach>
      </ant:depend>
    </j:if>
  </preGoal>
  
  <!-- TODO: add same thing for test:compile -->
  
  <!-- Cleanse source files -->
  <goal name="cleanse-sources"
        description="Cleanse source files, removing tabs and translating CRLF -> LF">
        
    <j:scope xmlns="jelly:ant">
      
      <!-- Cleanse sources -->
      <j:set var="srcdir" value="${basedir}/src/java"/>
      <u:available file="">
      <fixcrlf srcdir="${srcdir}" eol="lf" eof="remove" tab="remove" tablength="4">
        <include name="**/*.java"/>
      </fixcrlf>
      <fixcrlf srcdir="${basedir}" eol="lf" eof="remove" tab="remove" tablength="2">
        <include name="**/*.xml"/>
        <include name="**/*.html"/>
      </fixcrlf>
      </u:available>
      
      <!-- Cleanse test sources -->
      <j:set var="srcdir" value="${basedir}/src/test"/>
      <u:available file="${srcdir}">
        <fixcrlf srcdir="${srcdir}" eol="lf" eof="remove" tab="remove" tablength="4">
          <include name="**/*.java"/>
          <include name="**/*.xml"/>
          <include name="**/*.html"/>
        </fixcrlf>
        <fixcrlf srcdir="${srcdir}" eol="lf" eof="remove" tab="remove" tablength="2">
          <include name="**/*.xml"/>
          <include name="**/*.html"/>
        </fixcrlf>
      </u:available>
      
      <!-- Cleanse xdocs -->
      <j:set var="srcdir" value="${basedir}/src/xdocs"/>
      <u:available file="${srcdir}">
        <fixcrlf srcdir="${srcdir}" eol="lf" eof="remove" tab="remove" tablength="2">
          <include name="**/*.xml"/>
          <include name="**/*.html"/>
        </fixcrlf>
      </u:available>
      
      <!-- Cleanse build files -->
      <fixcrlf srcdir="." eol="lf" tab="remove" eof="remove" tablength="2">
        <include name="project.xml"/>
        <include name="maven.xml"/>
      </fixcrlf>
      
    </j:scope>
    
  </goal>
  
</project>
{'fraction_non_alphanumeric': 0.23413871023813662, 'fraction_numerical': 0.0076481835564053535, 'mean_word_length': 2.4331742243436754, 'pattern_counts': {'":': 0, '<': 140, '<?xml version=': 2, '>': 141, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 15}, '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': '7409367', 'n_tokens_mistral': 1912, 'n_tokens_neox': 1841, 'n_words': 356}