0

I would like to use Eclipse IDE to create a new Giraph program. How can I include Giraph into Eclipse?. I'm new in this topic. I used Shell Environment for running the Giraph program and text edit to write a program. But using JAVA IDE seems the best way. How can I do that? Thanks.

maria
  • 1
  • 1

1 Answers1

0
  1. create a maven project in eclipse
  2. include apache giraph and hadoop dependencies in pom.xml as below: <!-- https://mvnrepository.com/artifact/org.apache.giraph/giraph-core --> <dependency> <groupId>org.apache.giraph</groupId> <artifactId>giraph-core</artifactId> <version>1.2.0</version> </dependency> <!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-core --> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-core</artifactId> <version>0.20.203.0</version> </dependency>
  3. add the following plugins to package dependencies in a single jar with your project

    <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.6.1</version> <configuration> <!-- or whatever version you use --> <source>1.7</source> <target>1.7</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.5.3</version> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> <executions> <execution> <id>assemble-all</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin>

  4. that is all you need.