Error trying to use Vaadin components

Hello:

I’m starting in Vaadin …

I try to use this component (https://vaadin.com/directory/component/popupbutton)

Supposedly, I should just copy the dependencies in my pom.xml file and tell “maven” to download the dependencies. With that, everything should be ready to create an object of the “PopupButton” class. Something like this:
“PopupButton popupButton = new PopupButton (” Action “);”

However, it does not work. Eclipse tells me that he does not know “PopupButton”. Check the “.m2” folder on my PC and the maven does download the dependencies. He put them in
“.m2 \ repository \ org \ vaadin \ addons \ popupbutton”

Any suggestions?

Greetings.

indeed, including the dependency is all you need to start using the component in your project. That folder is correct too, so the problem is probably elsewhere. It might be a corrupt download, but the error message is typically different int that case. It could be the eclipse m2 plugin being broken, which it sometimes is; try these

  • right click on project → maven → update project, select ‘force update’ and the correct project
  • in the top menu of eclipse, project → clean, select the project
  • start eclipse with the -clean flag (from e.g. the command line). This forces plugins to empty all caches.

Thomas Mattsson:
indeed, including the dependency is all you need to start using the component in your project. That folder is correct too, so the problem is probably elsewhere. It might be a corrupt download, but the error message is typically different int that case. It could be the eclipse m2 plugin being broken, which it sometimes is; try these

  • right click on project → maven → update project, select ‘force update’ and the correct project
  • in the top menu of eclipse, project → clean, select the project
  • start eclipse with the -clean flag (from e.g. the command line). This forces plugins to empty all caches.

Thanks for replying, but I still can not use the “Vaadin Directory” components. I developed each of your suggestions and nothing, everything remains the same. Eclipse does not recognize the classes of the components, but if they are downloaded in the local folder “.m2”.

This does not let me advance in the development with Vaadin.

Any other suggestion, please?

Thomas Mattsson:
indeed, including the dependency is all you need to start using the component in your project. That folder is correct too, so the problem is probably elsewhere. It might be a corrupt download, but the error message is typically different int that case. It could be the eclipse m2 plugin being broken, which it sometimes is; try these

  • right click on project → maven → update project, select ‘force update’ and the correct project
  • in the top menu of eclipse, project → clean, select the project
  • start eclipse with the -clean flag (from e.g. the command line). This forces plugins to empty all caches.

I have a doubt. I attached an image of the information downloaded by my maven in the “.m2” folder. As you can see, there is no “.jar” file, is this correct?

17635251.png

Now, sometimes I get this error:
https://examples.javacodegeeks.com/enterprise-java/maven/maven-resolve-missing-artifact-error-example/

I did everything that is explained here and when I solve the error, then I return to the previous problem: JAVA does not recognize the main class of the component.

I have solved this problem by downloading the .zip file manually and putting it manually in the folder where the maven downloads the rest of the directories.

At least that way I managed to use the components ( Vaadin Directory)

Greetings.

Manuel Enrique:

I have solved this problem by downloading the .zip file manually and putting it manually in the folder where the maven downloads the rest of the directories.

At least that way I managed to use the components ( Vaadin Directory)

Greetings.

deberias reportarl tu solución en el post del foro en español