Create an Eclipse project from existing code

Hey!

To get started with Vaadin, I would like to tinker a bit with the QuickDashboard code.
I have my fair share of experience with coding so getting into the framework itself won’t be a problem. I am, however, struggling with creating a compilable Vaadin project in Eclipse. I’m not well versed using Eclipse and I have zero experience with Maven so could somebody run me trough the motions?
I have the project downloaded from GitHub (https://github.com/vaadin/dashboard-demo) and Eclipse (Kepler) running with the Ivy- and Vaadin plugins installed, what now?
(And please, don’t just write, “Just use Maven” or “Reconfigure the flux capacitor”, as I said, unfortunately, I’m have little experience with the tools involved)

Thanks in advance!

Well, I figured it out myself, it’s actually fairly easy :slight_smile: So, if anybody else needs to know, here is what you do:

  1. Obviously, install Eclipse, the Ivy plugin and the Vaadin plugin. Also, you should set up a Tomcat server and let Eclipse know about it.
  2. Download the QuickTickets sources
    here
  3. In Eclipse, select Import → Maven → Existing Maven Projects and specify the folder with the source code (specifically, the folder which contains the pom.xml)
  4. Now, the project should be created and ready to run. When you run it, you’ll get an
    java.lang.ArrayIndexOutOfBoundsException
    though
  5. Go to
    Rotten Tomatoes
    and sign up for an API key (it’s free)
  6. Enter the key in the DataProvider.java. Search for “xxxxx” to find the placeholder.
  7. Now, you’re good to go :slight_smile:

I am experiencing problems in trying to get QuickTickets-Dashboad to compile and run within Eclipse (Juno) with Ivy and Vaadin plugin. Am glad to find the above post.

I followed the instructions and in Step (3), I did not see any menu item related to Maven in the File/Import menu. So I installed the m2e plugin from Eclipse.org (Did I install the right plugin? or there are other), and repeat Step (3). The project seems to have been imported and created successfully.

In Step (4), the post says the project should be created and ready to run. I am not sure what I should do to run the project. I started up Tomcat in debug mode, but when I try run it in Debug mode, but the standard option of Debug on Server did not show up, like in a project created by Vaadin in Eclipse.

Also, the project directory structure is very different from a project created with Vaadin from scratch. I might have created a Maven project within Eclipse. How do I import the project so that it appears as a regular Vaadin project that can use Ivy, and Vaadin plugin within Eclipse. I really do not want to touch Maven if possible at all.

Thanks.

I’m guessing that yes using these steps you’re actually making a Maven project and not an Ivy project. You could look if either there is something like import > Ivy > Existing Ivy Project … or if you can convert the Maven project to an Ivy project now, maybe through something like right-clicking the project and then selecting Ivy > Convert to Ivy Project, if it exists.

Btw. As you may be able to get from what i wrote, i’m not an Ivy expert. I prefer Maven to Ivy and as you would say. I really do not want to touch Ivy if possible. So I don’t know anything about the Ivy Project structure as opposed to a normal “vanilla” Vaadin Project, without any of these extra-tools, or a Maven Project.
If you have the chance i would suggest you to switch to maven but that is just my personal opinion. I also read that there were Problems with Ivy + Vaadin back when Vaadin 7 was released and even some of the Vaadin Devs recommended using Maven instead. Also it seems like on this forum there is a lot more community support for Maven related questions then Ivy questions.
Again i want to repeat that this is just my personal opinion.

Hi ,

I am new to vaadin framework, I have downloaded QuickTickets-Dashboad and i made set up in my eclipse, there were no errors but when i try to run pom.xml file it throw error like pom.xml file not exist, I have minimum experience with maven, if u don’t mind any one can help me in this, what are the steps i need to follow to run the pom.xml file.

Thanks
Chandra

If it’s an actual eclipse project you can just use “File” → “Import” → “Existing Project into Workspace” from inside Eclipse

Your project probably only includes source code and no .project and .classpath file. So it isn’t actually an Eclipse project. In that case just create a new Eclipse project and copy the source code into the new project folder