Support Questions

Find answers, ask questions, and share your expertise

How to build oryx in eclipse

avatar
Explorer

Hi Sean,
I got the Oryx code in github.
I import the source code into eclipse, it occur some Java problems. Please tell me how to build the source in eclipse.

My develop OS is Windows Server 2012, and the following commands are running OK in PowerShell.
git clone https://github.com/cloudera/oryx.git
cd oryx
mvn -DskipTests install

Thanks.

Xuesong
1 ACCEPTED SOLUTION

avatar
Master Collaborator

The project uses Maven for builds. Eclipse supports Maven builds directly, so therefore supports Eclipse. (Or if there are any problems, it is in the Eclipse integration with Maven.) I use IntelliJ and recommend it, but, there is nothing additional to say here about working with Eclipse. It just works, because the Maven build works, and Eclipse uses Maven builds.

 

Have you modified the build? You say for example that you had to add the avro plugin to pluginManagement, but it is certainly already there in the parent POM: https://github.com/cloudera/oryx/blob/master/pom.xml#L671

 

You say there is a compile error, but the dependencies you seem to be missing are correctly specified in the POM already.

 

That is: you can verify that the build is correct with "mvn compile".

 

You need to clarify what you are doing because I don't think you are building the project as-is.

View solution in original post

7 REPLIES 7

avatar
Master Collaborator

It would be helpful to know what errors you are getting. It should build fine with Maven, as you show.

avatar
Explorer

When I inport the oryx source, it shows avro-maven-plugin and maven-antrun-plugin error.

So I add  <pluginManagement> tag to the pom.xml to solve the issues. Then most of the problems are solved.

But there are two compilation error in kmeans-computation/src/main/java/com/cloudera/oryx/kmeans/computation/MLAvros.java VectorConvert.java :

 

import com.cloudera.oryx.kmeans.computation.avro.MLVector;
import com.cloudera.oryx.kmeans.computation.avro.MLWeightedVector;

 

 

 

Xuesong

avatar
Explorer

oryx-kmeans-computation pom.xml

 

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>
</plugins>
</pluginManagement>
</build>

Xuesong

avatar
Explorer

I think it would be better if there is a introduction of building with Eclipse.

Xuesong

avatar
Explorer

Hi Sean,

What development tool do you use to write code for oryx?

Xuesong

avatar
Master Collaborator

The project uses Maven for builds. Eclipse supports Maven builds directly, so therefore supports Eclipse. (Or if there are any problems, it is in the Eclipse integration with Maven.) I use IntelliJ and recommend it, but, there is nothing additional to say here about working with Eclipse. It just works, because the Maven build works, and Eclipse uses Maven builds.

 

Have you modified the build? You say for example that you had to add the avro plugin to pluginManagement, but it is certainly already there in the parent POM: https://github.com/cloudera/oryx/blob/master/pom.xml#L671

 

You say there is a compile error, but the dependencies you seem to be missing are correctly specified in the POM already.

 

That is: you can verify that the build is correct with "mvn compile".

 

You need to clarify what you are doing because I don't think you are building the project as-is.

avatar
Explorer

Yes, you are right. It's error about Eclipse integration with maven. And I change my dev tools to IntelliJ IDEA.

Thank you for helping me that a Windows Phone and Windows Azure developer.

Xuesong