1

I wanted to create a Vaadin Spring project. To this end I planned on following this tutorial:

http://vaadin.github.io/spring-tutorial/

However, already at the beginning the weirdest thing happened.

I used Spring Initializr to create the project:

enter image description here

Then I wanted to create a simple "Hello world"-UI. To this end, I created a class and wrote the following code (following the tutorial):

package com.example.app;

import com.vaadin.spring.annotation.SpringUI;

@SpringUI
public class MyUI extends UI {

}

The problem is: Eclipse is not giving me the option to import the UI class:

enter image description here

As you can see, Eclipse does not seem to know of any class that could be imported to get rid of the error message.

The crazy thing is that, if you look at the Maven-Dependencies folder within the project, everything is there! The following screenshot shows a part of all the Maven Dependencies:

enter image description here

Here are some more dependencies:

enter image description here

At first I thought Eclipse was broken .. so I deleted my installation and installed the newest version of Eclipse.

However, the problem is exactly the same as before.

I have no clue what the hell is going on here !!

steady_progress
  • 3,311
  • 10
  • 31
  • 62

1 Answers1

0

Try doing maven update. Right click on your project in eclipse. Maven -> Update Project Click OK and rebuild the project. This should work.

Edit : If it doesn't work after maven update then, If you are on windows do this. Go to Users->your user -> .m2 -> repository then delete com and org folders. Now do Maven update in eclipse and try. This should work

Foolish
  • 3,952
  • 33
  • 46
  • Thank you very much for your suggested answer ... I did the "Maven -> Update Project" thing but the situation is, unfortunately, the same as before – steady_progress Aug 17 '17 at 05:16
  • Have you tried creating the same project with Spring Initializr and importing it into Eclipse? (It just takes 1 minute) Are you able to add a new class and import the UI class into this new file? – steady_progress Aug 17 '17 at 05:24
  • 1
    I tried works fine for me. If you are on windows do this. Go to `Users->your user -> .m2 -> repository` then delete `com` and `org` folders. Now do Maven update in eclipse and try. This should work – Foolish Aug 17 '17 at 05:54
  • Thank you so much! It now works ... I thought I was going crazy – steady_progress Aug 17 '17 at 12:39