3
votes

I am new to eclipse and maven. I have been trying for two days to run the storm starter project and am hitting a number of problems.

I have a couple of questions of which I will explain my attempts below.

  1. How can I import this project in to eclipse so that it runs and retrieves all required dependencies.

  2. How can I start a storm project from scratch in eclipse. When I start a new maven project and add storm dependency, it only adds storm, and not all of its dependencies.

What I have tried:

I have the latest m2eclipse plugin installed. When I choose import existing maven project (I change the m2-pom.xml to pom.xml I dont know why it is named m2-pom) everything looks ok, but when I do maven install, in maven build, i get the error

clojure-maven-plugin:1.3.8:compile(1 errors) No marketplace entries found to handle clojure-maven-plugin:1.3.8:compile in Eclipse. Please see Help for more information.

I have tried maven 2 and 3, I have tried creating a new java project then adding a maven configuration and running that.

I have got to the point where it looks like all dependencies have been downloaded, but in my project, all backtype types are still underlined in red and it when I hover over them, it does say import..

I also had another attempt when it said "import backtype.storm..." but when I cliked it the dependency still didnt resolve.

The code I am trying to run is:

https://github.com/nathanmarz/storm-starter

Please help

1
@baba That isn't a useful answer/commentChiron
Because she wants to code in Eclipse?Chiron
I have to use eclipse. I am new to maven and eclipse, I come from a C++ / python background. It seems crazy to me, that eclipse and maven are long running tools in the java world, yet there are all these problems and the best suggestion is to run on command line or find another (not suggested) ide. Are these tools really so fragile that this is the best answer? What I am looking for in this question is: here are the steps i used to load and run this project in eclipse. The correct form is if you cant answer, dont, if I wanted another ide, or couldnt run via terminal, I wouldve said in quegirlcoder
@girlcoder No, they aren't fragile but sometimes as you know, things go crazy in configuration (not talking here about Eclipse/Maven combo). I will try to have a look.Chiron
@girlcoder just navigate in terminal to where your project is, then run the command mvn clean install, then paste us the log. It is as simple as that. There is no need to use Eclipse in any steps of the way. This is called 'problem isolation' because if it runs in maven but doesn't work in Eclipse, then Eclipse is the problem. If it fails in maven as well, then we can get it from there.Nikola Yovchev

1 Answers

3
votes

@girlcoder: I had a similar issue while playing with the "storm-starter" project (i.e. backtype types not recognized despite importing them). I used IntelliJ IDEA at that time, but the fix I found may apply to your case as well:

In the pom.xml file (I also renamed m2-pom.xml as pom.xml), go to the section that defines the dependency on Storm and change its scope to "compile":

<dependency>
  <groupId>storm</groupId>
  <artifactId>storm</artifactId>
  <version>0.9.0.1</version>
  <!-- keep storm out of the jar-with-dependencies -->
  <!--<scope>provided</scope>-->
  <scope>compile</scope>
</dependency>

I used the "provided" scope when deploying the topologies to an actual Storm cluster, but I had to change the scope to "compile" to submit a topology to a LocalCluster. I hope this will help you solve the problem.

UPDATE: I am now trying to package storm-starter in Eclipse 4.3. It turned out that the pom.xml file is not compatible with the m2e eclipse plugin. Besides the modification I suggested above, I was able to compile the project only after changing the pom.xml as described here: https://github.com/nathanmarz/storm-starter/issues/23.