Thanks, that helps a lot! Just for your information, TestClassifier.java is not a testing class. I know, the file name is a little bit confusing. It is a class that predict categories using the learned model in TrainClassifier.java.
Best regards, -Sam On Sat, May 7, 2011 at 5:33 AM, Dhruv <[email protected]> wrote: > On Sat, May 7, 2011 at 3:31 AM, Ted Dunning <[email protected]> wrote: > >> Try >> >> mvn -DskipTests install >> >> On Fri, May 6, 2011 at 10:42 PM, Shaojun Zhao <[email protected]> wrote: >> >> > I have to frequently make changes in >> > >> > >> /mahout/mahout-distribution-0.4/core/src/main/java/org/apache/mahout/classifier/bayes/TestClassifier.java >> > >> > So I run >> > > mvn compile >> > > mvn install >> > >> > Compile takes a few secondes, but the install takes 8 minitues, which >> > is too long! >> > >> > Is there any way that I can run mahout without "mvn install". RIght >> > now, if I only run "mvn compile", but do not run "mvn install", and >> > when I run things like mahout testclassifier is still the old one. >> > "mvn install" does the job well, but taking way too long! >> > > Like Ted said you can skip testing while you are making changes to your > testing classes and run the entire suite of tests in the end. > > However, to quickly test only one test class, you can use the <includes> > tag. > To do this, modify the Surefire plugin's settings inside the top level > pom.xml ($MAHOUT_HOME/pom.xml) > > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-surefire-plugin</artifactId> > <configuration> > <forkMode>once</forkMode> > <argLine>-Xms256m -Xmx512m</argLine> > <testFailureIgnore>false</testFailureIgnore> > <redirectTestOutputToFile>true</redirectTestOutputToFile> > <includes> > <include>**/TestClassifier.java</include> > </includes> > </configuration> > </plugin> > . > . > . > </plugins> > > > Now, you can run: > > $ mvn clean install > > This should automatically clean, re compile, and only run the tests of > "TestClassifier.java". > > In the end the command will also install the binaries for you. Note that you > don't need to type mvn compile separately because the compile target comes > before install in the lifecycle of mvn install. > > > >> >> > Thanks a lot in advance! >> > -Sam >> > >> >
