简体   繁体   English

在OS X Eclipse上使用Maven安装Mahout

[英]Installing Mahout with Maven on OS X Eclipse

I am trying to play with Mahout. 我想和Mahout一起玩。

Following very simple instructions on the apache website. 遵循apache网站上非常简单的说明。 I'm getting weird dependency errors. 我收到奇怪的依赖错误。

I've created a new project with Maven. 我已经使用Maven创建了一个新项目。 I've added this to the pom.xml as suggested: 我已经按照建议将其添加到pom.xml中:

<dependency>
  <groupId>org.apache.mahout</groupId>
  <artifactId>mahout-mrlegacy</artifactId>
  <version>0.9</version>
</dependency>

now running 'mvn clean install -U' gives me: 现在运行'mvn clean install -U'给我:

Downloading: https://repo.maven.apache.org/maven2/org/apache/mahout/mahout-mrlegacy/0.9/mahout-mrlegacy-0.9.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.689 s
[INFO] Finished at: 2015-03-21T10:54:37+00:00
[INFO] Final Memory: 6M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project my-app: Could not resolve dependencies for project com.mycompany.app:my-app:jar:1.0-SNAPSHOT: Could not find artifact org.apache.mahout:mahout-mrlegacy:jar:0.9 in central (https://repo.maven.apache.org/maven2) -> [Help 1]

Java is too hard! Java太难了! Seriously, I'm a Ruby guy. 说真的,我是一个Ruby家伙。 Now I also tried 'artifactID' as just 'mahout' as I can see that in some of these alleged maven repositories, but same error. 现在,我还尝试将“ artifactID”作为“ mahout”,因为在某些所谓的Maven存储库中可以看到,但存在相同的错误。 What am I doing wrong??? 我究竟做错了什么???

The documentation of Apache Mahout appears to have a version mix-up. Apache Mahout的文档似乎有版本混淆。 mahout-mrlegacy does not exist in version 0.9, but it will exist in version 0.10.0 . mahout-mrlegacy在0.9版中不存在,但在0.10.0版中将存在 For version 0.9, the dependency is actually mahout-core . 对于0.9版,依赖性实际上是mahout-core

Therefore, you should use 因此,您应该使用

<dependency>
    <groupId>org.apache.mahout</groupId>
    <artifactId>mahout-core</artifactId>
    <version>0.9</version>
</dependency>

When 0.10.0 will be released, you will need to use 当发布0.10.0时,您将需要使用

<dependency>
    <groupId>org.apache.mahout</groupId>
    <artifactId>mahout-mrlegacy</artifactId>
    <version>0.10.0</version>
</dependency>

Add below dependency to your pom.xml 将以下依赖项添加到pom.xml

<dependency>
    <groupId>org.apache.mahout</groupId>
    <artifactId>mahout-mrlegacy</artifactId>
    <version>0.9.0.2.2.0.0-2041</version>
</dependency>

and below repositories 及以下版本库

<repositories>
    <repository>
        <id>pentaho-releases</id>
        <url>http://repository.pentaho.org/artifactory/repo/</url>
    </repository>
</repositories>

Hope this could help you. 希望这可以对您有所帮助。

For more details: 更多细节:

https://maven-repository.com/artifact/org.apache.mahout/mahout-mrlegacy/0.9.0.2.2.0.0-2041 https://maven-repository.com/artifact/org.apache.mahout/mahout-mrlegacy/0.9.0.2.2.0.0-2041

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM