Author: srowen
Date: Tue Jan 20 14:33:11 2009
New Revision: 736145

URL: http://svn.apache.org/viewvc?rev=736145&view=rev
Log:
Move more out of taste-build.xml, update instructions

Modified:
    lucene/mahout/site/src/documentation/content/xdocs/taste.xml
    
lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java
    lucene/mahout/trunk/core/taste-build.xml

Modified: lucene/mahout/site/src/documentation/content/xdocs/taste.xml
URL: 
http://svn.apache.org/viewvc/lucene/mahout/site/src/documentation/content/xdocs/taste.xml?rev=736145&r1=736144&r2=736145&view=diff
==============================================================================
--- lucene/mahout/site/src/documentation/content/xdocs/taste.xml (original)
+++ lucene/mahout/site/src/documentation/content/xdocs/taste.xml Tue Jan 20 
14:33:11 2009
@@ -128,10 +128,10 @@
   <li>Unpack the archive and copy <code>movies.dat</code> and 
<code>ratings.dat</code> to
    <code>src/main/examples/org/apache/mahout/cf/taste/example/grouplens</code> 
under the Taste distribution
    directory.</li>
-  <li>Build the example web application by executing <code>ant 
build-grouplens-example</code> in the directory
-    where you unpacked the Taste distribution. This produces 
<code>taste.war</code>.</li>
-
-  <li><a href="http://tomcat.apache.org/download-55.cgi";>Download</a> and 
install Tomcat.</li>
+  <li>Navigate to the directory where you unpacked the Mahout distribution, 
and navigate to <code>trunk/core</code>.</li>
+  <li>Build Mahout with <code>ant</code>.</li>
+  <li>Build the example web application with <code>ant -f taste-build.xml 
build-grouplens-example</code>.</li>
+  <li><a href="http://tomcat.apache.org/download-60.cgi";>Download</a> and 
install Tomcat.</li>
   <li>Copy <code>taste.war</code> to the <code>webapps</code> directory under 
the Tomcat installation directory.</li>
   <li>Increase the heap space that is given to Tomcat by setting the 
<code>JAVA_OPTS</code>
       environment variable to "<code>-server -da -dsa -Xms1024m 
-Xmx1024m</code>", to allow 1024MB of heap space and

Modified: 
lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java
URL: 
http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java?rev=736145&r1=736144&r2=736145&view=diff
==============================================================================
--- 
lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java
 (original)
+++ 
lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java
 Tue Jan 20 14:33:11 2009
@@ -124,10 +124,13 @@
   }
 
   private Iterable<File> findUpdateFiles() {
+    String dataFileName = dataFile.getName();
+    int period = dataFileName.indexOf('.');
+    String startName = period < 0 ? dataFileName : dataFileName.substring(0, 
period);
     File parentDir = dataFile.getParentFile();
     List<File> updateFiles = new ArrayList<File>();
     for (File updateFile : parentDir.listFiles()) {
-      if (!updateFile.getName().equals(dataFile.getName())) {
+      if (!updateFile.getName().startsWith(startName)) {
         updateFiles.add(updateFile);
       }
     }

Modified: lucene/mahout/trunk/core/taste-build.xml
URL: 
http://svn.apache.org/viewvc/lucene/mahout/trunk/core/taste-build.xml?rev=736145&r1=736144&r2=736145&view=diff
==============================================================================
--- lucene/mahout/trunk/core/taste-build.xml (original)
+++ lucene/mahout/trunk/core/taste-build.xml Tue Jan 20 14:33:11 2009
@@ -20,7 +20,7 @@
 <!-- Temporarily, this ex-Taste build file is separate.
   Next step is to integrate it. -->
 
-<project basedir="." default="build" name="mahout-taste">
+<project basedir="." name="mahout-taste">
 
   <property file="build.properties"/>
 
@@ -28,7 +28,6 @@
   <property name="dbcp.jar" location="lib/commons-dbcp-1.2.2.jar"/>
   <property name="junit.jar" location="../lib/junit-3.8.2.jar"/>
   <property name="pool.jar" location="lib/commons-pool-1.4.jar"/>
-  <property name="proguard.jar" location="lib/proguard.jar"/>
   <property name="servlet.jar" location="lib/servlet-api.jar"/>
   <property name="hadoop.jar" location="lib/hadoop-0.18.1-core.jar"/>
   <property name="slf4j-api.jar" location="lib/slf4j-api-1.5.5.jar"/>
@@ -38,90 +37,15 @@
 
   <property environment="env"/>
   <property name="name" value="${ant.project.name}"/>
-  <property name="release-jar" value="${name}.jar"/>
+  <property name="release-jar" value="dist/apache-mahout-core-0.1-dev.jar"/>
   <property name="release-war" value="${name}.war"/>
 
   <target name="init">
     <tstamp/>
-    <available file="${proguard.jar}" property="proguard.jar.present"/>
     <available type="dir" file="${axis.jars}" property="axis.jars.present"/>
   </target>
 
-  <target depends="init" name="build" description="Compiles all code">
-    <mkdir dir="build"/>
-    <javac source="6"
-           target="6"
-           deprecation="true"
-           destdir="build"
-           debug="true"
-           optimize="true"
-           srcdir="src/main/java">
-      <compilerarg value="-Xlint:all,-serial,-unchecked"/>
-      <classpath>
-        <pathelement location="${servlet.jar}"/>
-        <pathelement location="${dbcp.jar}"/>
-        <pathelement location="${pool.jar}"/>
-        <pathelement location="${hadoop.jar}"/>
-        <pathelement location="${slf4j-api.jar}"/>
-        <pathelement location="${uncommons-math.jar}"/>
-      </classpath>
-      <include name="org/apache/mahout/cf/taste/**"/>
-    </javac>
-    <jar jarfile="${release-jar}">
-      <fileset dir="build">
-        <include name="org/apache/mahout/cf/taste/**"/>        
-        <exclude name="org/apache/mahout/cf/taste/web/**"/>
-        <exclude name="org/apache/mahout/cf/taste/example/**"/>
-      </fileset>
-    </jar>
-  </target>
-
-  <target depends="build" name="optimize" description="Optimizes code" 
if="proguard.jar.present">
-    <property name="rt.jar" value="${env.JDK_HOME}/jre/lib/rt.jar"/>
-    <fail message="Can't find JDK classes at ${rt.jar}; is JDK_HOME set?">
-      <condition>
-        <not>
-          <available type="file" file="${rt.jar}"/>
-        </not>
-      </condition>
-    </fail>
-    <move file="${release-jar}" tofile="temp.jar"/>
-    <java jar="${proguard.jar}" fork="true" failonerror="true">
-      <arg value="-injars temp.jar"/>
-      <arg value="-outjars ${release-jar}"/>
-      <arg value="-libraryjars ${env.JDK_HOME}/jre/lib/rt.jar"/>
-      <arg value="-libraryjars ${pool.jar}"/>
-      <arg value="-ignorewarnings"/>
-      <arg value="-dontshrink"/>
-      <arg value="-dontobfuscate"/>
-      <arg value="-optimizationpasses 6"/>
-      <arg value="-keep public class * { public protected *; }"/>
-      <arg value="-target 6"/>
-      <arg value="-verbose"/>
-    </java>
-    <delete file="temp.jar"/>
-  </target>
-
-  <target depends="build" name="build-test" description="Builds test classes">
-    <mkdir dir="build-test"/>
-    <javac source="6"
-           target="6"
-           debug="true"
-           debuglevel="lines,vars,source"
-           deprecation="true"
-           destdir="build-test"
-           srcdir="src/test/java">
-      <compilerarg value="-Xlint:all,-serial"/>
-      <classpath>
-        <pathelement location="${junit.jar}"/>
-        <pathelement location="${slf4j-api.jar}"/>
-        <pathelement location="${release-jar}"/>
-      </classpath>
-      <include name="org/apache/mahout/cf/taste/**"/>
-    </javac>
-  </target>
-
-  <target depends="build,optimize" name="build-server" description="Builds 
deployable web-based Taste server">
+  <target depends="init" name="build-server" description="Builds deployable 
web-based Taste server">
     <fail unless="my-recommender.jar" message="Please set 
-Dmy-recommender.jar=XXX"/>
     <fail unless="my-recommender-class" message="Please set 
-Dmy-recommender-class=XXX"/>
     <fail unless="axis.jars.present" message="Please copy all Axis Java 1.4 
.jar files from its lib directory into ${axis.jars}"/>
@@ -151,7 +75,7 @@
     <delete file="${my-web.xml}"/>
   </target>
 
-  <target depends="init,build" name="build-grouplens-example" 
description="Builds deployable GroupLens example">
+  <target depends="init" name="build-grouplens-example" description="Builds 
deployable GroupLens example">
     <property name="examples-base" value="../examples/src/main/java"/>
     <property name="grouplens-location" 
value="${examples-base}/org/apache/mahout/cf/taste/example/grouplens"/>
     <fail message="Please download and install the GroupLens .dat files to 
${grouplens-location}">
@@ -206,48 +130,10 @@
     </java>
   </target>
 
-  <target depends="build,optimize,build-test" name="test" description="Runs 
unit tests">
-    <junit printsummary="on" haltonfailure="on" haltonerror="on" fork="on">
-      <formatter type="plain" usefile="false"/>
-      <classpath>
-        <pathelement location="${junit.jar}"/>
-        <pathelement location="${slf4j-api.jar}"/>
-        <pathelement location="${slf4j.jar}"/>
-        <pathelement location="${commons-logging.jar}"/>
-        <pathelement location="${uncommons-math.jar}"/>
-        <pathelement location="${release-jar}"/>
-        <pathelement location="build-test"/>
-      </classpath>
-      <assertions>
-        <enable/>
-      </assertions>
-      <batchtest>
-        <fileset dir="src/test/java">
-          <include name="org/apache/mahout/cf/taste/**/*Test.java"/>
-        </fileset>
-      </batchtest>
-    </junit>
-  </target>
-
-  <target depends="init" name="javadoc" description="Builds javadoc 
documentation">
-    <mkdir dir="docs/javadoc"/>
-    <javadoc destdir="docs/javadoc">
-      <fileset dir="src/main/java">
-        <include name="**/*.java"/>
-      </fileset>
-      <classpath>
-        <pathelement location="${servlet.jar}"/>
-        <pathelement location="${dbcp.jar}"/>
-        <pathelement location="${pool.jar}"/>
-      </classpath>
-    </javadoc>
-  </target>
-
   <target depends="init" name="clean" description="Deletes build products">
     <delete dir="build"/>
     <delete dir="build-test"/>
     <delete dir="docs/javadoc"/>
-    <delete file="${release-jar}"/>
     <delete file="${release-war}"/>
     <delete>
       <fileset dir=".">


Reply via email to