Hi again,

>So, am I right that you depend on examples because you have explicitly 
>modified >RecommenderServlet to refer to, say, the GroupLens-based code in 
>mahout-examples? That's fine, >but yes it means you have to express the 
>dependency in order to build.

Yes you are right. I have actually created a new package named movielens in the 
examples package
and have modified RecommenderServlet to refer to it. 
By the way,
when I import the package in RecommenderServlet class in Eclipse I see no 
errors. The package is imported ok...

>I think you are doing it right, except that the artifactId / module name is 
>'mahout-examples' instead >of 'examples'. How about that? (and it's "org" not 
>"Org").

I changed the artifactId name to 'mahout-examples' and Org was a misspelling 
but not I get the same 
compilation errors as I described in the first mail.  It still cannot see the 
package...

Do you have any ideas how to  add the dependency? 
Perhaps another arfifactID/groupID?

I give you the output from the console (sorry for the length..):

C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web>mvn -e jetty:run-war
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Mahout Taste Webapp
[INFO]    task-segment: [jetty:run-war]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing jetty:run-war
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus
.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [remote-resources:process {execution: default}]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO] Copying 2 resources to C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\tas
te-web\target/mahout-taste-webapp-0.3/WEB-INF/lib
[INFO] Copying 3 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 1 source file to C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3
\taste-web\target\classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web\src\main\java\org\apach
e\mahout\cf\taste\web\RecommenderServlet.java:[36,51] package org.apache.mahout.
cf.taste.example.movielens does not exist

C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web\src\main\java\org\apach
e\mahout\cf\taste\web\RecommenderServlet.java:[164,14] cannot find symbol
symbol  : class GroupLensRecommender
location: class org.apache.mahout.cf.taste.web.RecommenderServlet

C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web\src\main\java\org\apach
e\mahout\cf\taste\web\RecommenderServlet.java:[168,14] cannot find symbol
symbol  : class GroupLensRecommender
location: class org.apache.mahout.cf.taste.web.RecommenderServlet


[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Compilation failure
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:715)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:556)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecy
cle(DefaultLifecycleExecutor.java:1205)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(Def
aultLifecycleExecutor.java:1038)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:643)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:569)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:348)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.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:6
0)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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.CompilationFailureException: Compilation fail
ure
        at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompiler
Mojo.java:516)
        at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:490)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694)
        ... 21 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Thu May 27 22:33:11 EEST 2010
[INFO] Final Memory: 22M/53M
[INFO] ------------------------------------------------------------------------
C:\Users\lef\Desktop\mahout-0.3-src\mahout-0.3\taste-web>

-----Original Message-----
From: Sean Owen [mailto:[email protected]] 
Sent: Thursday, May 27, 2010 8:24 PM
To: [email protected]
Subject: Re: Change Recommender servlet

I was mistaken earlier when I said taste-web depends on examples. It doesn't, 
which is good.

So, am I right that you depend on examples because you have explicitly modified 
RecommenderServlet to refer to, say, the GroupLens-based code in 
mahout-examples? That's fine, but yes it means you have to express the 
dependency in order to build.

I think you are doing it right, except that the artifactId / module name is 
'mahout-examples' instead of 'examples'. How about that? (and it's "org" not 
"Org").

On Thu, May 27, 2010 at 6:12 PM, Eleftherios Spyromitros Xioufis 
<[email protected]> wrote:
> Thanks again for the answer. I am not familiar with maven and I find it 
> difficult to understand how mahout is built. But I am trying hard..
> I found the pom.xml file in taste-web folder and tried to modify it, in order 
> to add the missing dependency but I am most probably doing it the wrong way.
>
> I tried to add this dependency:
>
> <dependency>
>  <groupId>org.apache.mahout</groupId>
>  <artifactId>examples</artifactId>
>  <version>${project.version}</version>
>  </dependency>
>
> But the command mvn jetty:run-war still fails with the following message:
>
> Missing:
> Org.apache.mahout:examples:jar:0.3
>
> I suppose that I have placed wrong values in groupID and artifactId tags..
> Can you please tell me what values should I use in order to add the examples 
> package as a dependency in the recommenderservlet class?
>
> I appreciate your valuable help,
> Lef
>
>


Reply via email to