Did you do [mvn -DskipTests install] at the top level before trying this?

On Tue, Sep 21, 2010 at 9:15 AM, Neil Ghosh <[email protected]> wrote:

> Hi ,
>
> I am trying to run the example using Mahout 0.3 at
> https://cwiki.apache.org/confluence/display/MAHOUT/Twenty+Newsgroups
>
> I have carried out all the steps but getting build error during this
> command
>
> mvn -e exec:java \
>
>  -Dexec.mainClass=org.apache.mahout.classifier.bayes.PrepareTwentyNewsgroups
> \
>      -Dexec.args="-p 20news-18828 \
>                   -o 20news-input \
>                   -a org.apache.lucene.analysis.standard.StandardAnalyzer \
>                   -c UTF-8"
>
>
> Please help, getting the following error.
>
> n...@neil-laptop:~/workspace/mahout-0.3/examples$ mvn -e exec:java \
> >
> -Dexec.mainClass=org.apache.mahout.classifier.bayes.PrepareTwentyNewsgroups
> \
> >       -Dexec.args="-p 20news-18828 \
> >                    -o 20news-input \
> >                    -a
> org.apache.lucene.analysis.standard.StandardAnalyzer
> \
> >                    -c UTF-8"
> + Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'exec'.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Mahout Examples
> [INFO]    task-segment: [exec:java]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Preparing exec:java
> [INFO] No goals needed for project - skipping
> [INFO] [exec:java {execution: default-cli}]
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] An exception occured while executing the Java class. null
>
> Unresolved compilation problems:
>    DefaultOptionCreator cannot be resolved
>    CommandLineUtil cannot be resolved
>    BayesFileFormatter cannot be resolved
>    CommandLineUtil cannot be resolved
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: An exception
> occured
> while executing the Java class. null
>    at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
>    at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
>    at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
>    at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
>    at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
>    at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
>    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>    at
> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>    at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>    at java.lang.reflect.Method.invoke(Method.java:616)
>    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: An exception
> occured while executing the Java class. null
>    at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:346)
>    at
>
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
>    at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
>    ... 17 more
> Caused by: java.lang.reflect.InvocationTargetException
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>    at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>    at java.lang.reflect.Method.invoke(Method.java:616)
>    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:291)
>    at java.lang.Thread.run(Thread.java:636)
> Caused by: java.lang.Error: Unresolved compilation problems:
>    DefaultOptionCreator cannot be resolved
>    CommandLineUtil cannot be resolved
>    BayesFileFormatter cannot be resolved
>    CommandLineUtil cannot be resolved
>
>    at
>
> org.apache.mahout.classifier.bayes.PrepareTwentyNewsgroups.main(PrepareTwentyNewsgroups.java:52)
>    ... 6 more
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 3 seconds
> [INFO] Finished at: Tue Sep 21 21:41:25 IST 2010
> [INFO] Final Memory: 14M/34M
> [INFO]
> ------------------------------------------------------------------------
>
>
>
> --
> Thanks and Regards
> Neil
> http://neilghosh.com
>

Reply via email to