<commit_before><?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
  <modelVersion>4.0.0</modelVersion>
 <parent>
    <artifactId>base</artifactId>
    <groupId>org.sakaiproject</groupId>
    <version>M2</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <groupId>org.sakaiproject</groupId>
  <artifactId>pack-demo</artifactId>
  <packaging>pom</packaging>
  <name>Sakai Pack Demo</name>
  <version>M2</version>
  <organization>
    <name>Sakai Project</name>
    <url>http://sakaiproject.org/</url>
  </organization>
  <properties>
    <sakai.plugin.version>2.2</sakai.plugin.version>
    <sakai.tomcat.version>5.5.23</sakai.tomcat.version>
  </properties>
  <dependencies>
    <dependency>
      <groupId>tomcat.tomcat</groupId>
      <artifactId>tomcat</artifactId>
      <version>${sakai.tomcat.version}</version>
      <type>zip</type>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>pack-demo-clean</id>
            <phase>install</phase>
            <configuration>
              <tasks>
  		<!-- clear the deploy area -->
                <delete dir="${basedir}/target/unpack"/>
                <delete dir="${basedir}/target/pack"/>
                
                <!-- expand the tomcat 5.5.23 zip from the repo into the target -->
                <unzip src="${settings.localRepository}/tomcat/tomcat/tomcat/5.5.23/tomcat-5.5.23.zip"
                                        dest="${basedir}/target/unpack"
                                        overwrite="true" />
                <move file="${basedir}/target/unpack/apache-tomcat-5.5.23" tofile="${basedir}/target/pack" overwrite="true" />
                <delete dir="${basedir}/target/unpack"/>
                 <echo>Executing cd ../;mvn -Dmaven.tomcat.home=${basedir}/target/pack -Dmaven.test.skip=true clean install sakai:deploy</echo> 
                 <exec dir="../" executable="mvn" failonerror="true" >
    			<arg value="-Dmaven.tomcat.home=${basedir}/target/pack"/>
                        <arg value="-Dmaven.test.skip=true"/>
			<arg value="clean"/>
                        <arg value="install"/>
                        <arg value="sakai:deploy"/>
                 </exec>                       
                
                <!-- add in demo stuff -->
                <copy file="${basedir}/../reference/demo/sakai.properties" tofile="${basedir}/target/pack/sakai/sakai.properties" />
                <copy todir="${basedir}/target/pack/sakai/db">
                        <fileset dir="${basedir}/../reference/demo/db">
                                <include name="**/sakai.db.*" />
                        </fileset>
                </copy>
                <copy file="${basedir}/../reference/demo/readme.txt" tofile="${basedir}/target/pack/demo_readme.txt" />
                <copy file="${basedir}/../reference/docs/readme.txt" tofile="${basedir}/target/pack/sakai_readme.txt" />
                <copy todir="${basedir}/target/pack/licenses/">
                        <fileset dir="${basedir}/../reference/licenses">
                                <exclude name="CVS/**"/>
                        </fileset>
                </copy>

                <copy file="${basedir}/../reference/demo/start-sakai.bat" tofile="${basedir}/target/pack/start-sakai.bat" />
                <copy file="${basedir}/../reference/demo/start-sakai.sh" tofile="${basedir}/target/pack/start-sakai.sh" />
                <copy file="${basedir}/../reference/demo/stop-sakai.bat" tofile="${basedir}/target/pack/stop-sakai.bat" />
                <copy file="${basedir}/../reference/demo/stop-sakai.sh" tofile="${basedir}/target/pack/stop-sakai.sh" />

                <!-- Replace the favorite icon from tomcat -->
                <copy file="${basedir}/../reference/library/src/webapp/icon/favicon.ico" tofile="${basedir}/target/pack/webapps/ROOT/favicon.ico" overwrite="true" />

                <copy file="${basedir}/../ECLv1.txt" tofile="${basedir}/target/pack/ECLv1.txt" overwrite="true" />

                <!-- custom Tomcat mods -->
                <copy file="${basedir}/../reference/demo/index.html" tofile="${basedir}/target/pack/webapps/ROOT/index.html" />
                <copy overwrite="true"
                                file="${basedir}/target/pack/conf/server.xml"
                                tofile="${basedir}/target/pack/conf/server-orig.xml" />
                <copy overwrite="true"
                                file="${basedir}/target/pack/conf/server-orig.xml"
                                tofile="${basedir}/target/pack/conf/server.xml" >
                        <filterset
                                        begintoken="<PASSWORD>"
                                        endtoken="&quot;8192&quot;" recurse="false" >
                                <filter token="=" value="maxHttpHeaderSize=&quot;8192&quot; URIEncoding=&quot;UTF-8&quot;"/>
                        </filterset>
                </copy>

                <!-- makes all ".sh" files readable and executable for anyone on a UNIX system  -->
                <chmod dir="${basedir}/target/pack/" perm="ugo+rx" includes="**/*.sh"/>

                <!-- zip it -->
                <delete file="sakai-demo-${sakai.version}.zip" />
                <zip destfile="sakai-demo-${sakai.version}.zip" compress="yes" >
                        <zipfileset dir="${basedir}/target/pack/" prefix="sakai-demoi-${sakai.version}" />
                </zip>
                <echo>* * * sakai-demo-${sakai.version}.zip</echo>

                <!-- tar it -->
                <delete file="sakai-demo-${sakai.version}.tar.gz" />
                <tar destfile="sakai-demo-${sakai.version}.tar.gz" longfile="gnu" compression="gzip">
                        <tarfileset dir="${basedir}/target/pack/" mode="755" prefix="sakai-demo">
                                <include name="**/*.sh"/>
                        </tarfileset>
                        <tarfileset dir="${basedir}/target/pack/" prefix="sakai-demo-${sakai.version}">
                                <exclude name="**/*.sh"/>
                        </tarfileset><commit_msg>http://bugs.sakaiproject.org/jira/browse/SAK-10843 Fixing up the pack-demo goal.<commit_after><?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
  <modelVersion>4.0.0</modelVersion>
 <parent>
    <artifactId>base</artifactId>
    <groupId>org.sakaiproject</groupId>
    <version>M2</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <groupId>org.sakaiproject</groupId>
  <artifactId>pack-demo</artifactId>
  <packaging>pom</packaging>
  <name>Sakai Pack Demo</name>
  <version>M2</version>
  <organization>
    <name>Sakai Project</name>
    <url>http://sakaiproject.org/</url>
  </organization>
  <properties>
    <sakai.plugin.version>2.2</sakai.plugin.version>
    <sakai.tomcat.version>5.5.23</sakai.tomcat.version>
  </properties>
  <dependencies>
    <dependency>
      <groupId>tomcat.tomcat</groupId>
      <artifactId>tomcat</artifactId>
      <version>${sakai.tomcat.version}</version>
      <type>zip</type>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>pack-demo-clean</id>
            <phase>install</phase>
            <configuration>
              <tasks>
  		<!-- clear the deploy area -->
                <delete dir="${basedir}/target/unpack"/>
                <delete dir="${basedir}/target/pack"/>
                
                <!-- expand the tomcat 5.5.23 zip from the repo into the target -->
                <unzip src="${settings.localRepository}/tomcat/tomcat/tomcat/5.5.23/tomcat-5.5.23.zip"
                                        dest="${basedir}/target/unpack"
                                        overwrite="true" />
                <move file="${basedir}/target/unpack/apache-tomcat-5.5.23" tofile="${basedir}/target/pack" overwrite="true" />
                <delete dir="${basedir}/target/unpack"/>
                 <echo>Executing cd ../;mvn -Dmaven.tomcat.home=${basedir}/target/pack -Dmaven.test.skip=true clean install sakai:deploy</echo> 
                 <exec dir="../" executable="mvn" failonerror="true" >
    			<arg value="-Dmaven.tomcat.home=${basedir}/target/pack"/>
                        <arg value="-Dmaven.test.skip=true"/>
			<arg value="clean"/>
                        <arg value="install"/>
                        <arg value="sakai:deploy"/>
                 </exec>                       
                
                <!-- add in demo stuff -->
                <copy file="${basedir}/../reference/demo/sakai.properties" tofile="${basedir}/target/pack/sakai/sakai.properties" />
                <copy todir="${basedir}/target/pack/sakai/db">
                        <fileset dir="${basedir}/../reference/demo/db">
                                <include name="**/sakai.db.*" />
                        </fileset>
                </copy>
                <copy file="${basedir}/../reference/demo/readme.txt" tofile="${basedir}/target/pack/demo_readme.txt" />
                <copy file="${basedir}/../reference/docs/readme.txt" tofile="${basedir}/target/pack/sakai_readme.txt" />
                <copy todir="${basedir}/target/pack/licenses/">
                        <fileset dir="${basedir}/../reference/licenses">
                                <exclude name="CVS/**"/>
                        </fileset>
                </copy>

                <copy file="${basedir}/../reference/demo/start-sakai.bat" tofile="${basedir}/target/pack/start-sakai.bat" />
                <copy file="${basedir}/../reference/demo/start-sakai.sh" tofile="${basedir}/target/pack/start-sakai.sh" />
                <copy file="${basedir}/../reference/demo/stop-sakai.bat" tofile="${basedir}/target/pack/stop-sakai.bat" />
                <copy file="${basedir}/../reference/demo/stop-sakai.sh" tofile="${basedir}/target/pack/stop-sakai.sh" />

                <!-- Replace the favorite icon from tomcat -->
                <copy file="${basedir}/../reference/library/src/webapp/icon/favicon.ico" tofile="${basedir}/target/pack/webapps/ROOT/favicon.ico" overwrite="true" />

                <copy file="${basedir}/../ECLv1.txt" tofile="${basedir}/target/pack/ECLv1.txt" overwrite="true" />

                <!-- custom Tomcat mods -->
                <copy file="${basedir}/../reference/demo/index.html" tofile="${basedir}/target/pack/webapps/ROOT/index.html" />
                <copy overwrite="true"
                                file="${basedir}/target/pack/conf/server.xml"
                                tofile="${basedir}/target/pack/conf/server-orig.xml" />
                <copy overwrite="true"
                                file="${basedir}/target/pack/conf/server-orig.xml"
                                tofile="${basedir}/target/pack/conf/server.xml" >
                        <filterset
                                        begintoken="<PASSWORD>"
                                        endtoken="&quot;8192&quot;" recurse="false" >
                                <filter token="=" value="maxHttpHeaderSize=&quot;8192&quot; URIEncoding=&quot;UTF-8&quot;"/>
                        </filterset>
                </copy>

                <!-- makes all ".sh" files readable and executable for anyone on a UNIX system  -->
                <chmod dir="${basedir}/target/pack/" perm="ugo+rx" includes="**/*.sh"/>

                <!-- zip it -->
                <delete file="sakai-demo-${sakai.version}.zip" />
                <zip destfile="sakai-demo-${sakai.version}.zip" compress="yes" >
                        <zipfileset dir="${basedir}/target/pack/" prefix="sakai-demo-${sakai.version}" />
                </zip>
                <echo>* * * sakai-demo-${sakai.version}.zip</echo>

                <!-- tar it -->
                <delete file="sakai-demo-${sakai.version}.tar.gz" />
                <tar destfile="sakai-demo-${sakai.version}.tar.gz" longfile="gnu" compression="gzip">
                        <tarfileset dir="${basedir}/target/pack/" mode="755" prefix="sakai-demo-${sakai.version}">
                                <include name="**/*.sh"/>
                        </tarfileset>
                        <tarfileset dir="${basedir}/target/pack/" prefix="sakai-demo-${sakai.version}">
                                <exclude name="**/*.sh"/>
                        </tarfileset>
{'fraction_non_alphanumeric': 0.17497424518583088, 'fraction_numerical': 0.0076868214597036215, 'mean_word_length': 1.6782682512733447, 'pattern_counts': {'":': 0, '<': 253, '<?xml version=': 2, '>': 253, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5128774', 'n_tokens_mistral': 3872, 'n_tokens_neox': 3579, 'n_words': 458}