-1

I made a project using vaadin 14.7.1 to create a GUI. Now I am working on a different machine with the same project and I am not able to import the Vaadin Pro Components. The error:

The import com.vaadin.flow.component.gridpro cannot be resolved

Im using the Eclipse IDE and arleady tried to update the maven project and deleting the .m2 folder, but nothing works.

Thanks in advance

Lukas
  • 110
  • 11
  • have you checked that the libraries are actually there and on the path? – Stultuske Sep 14 '22 at 07:28
  • 1
    How are you defining the Vaadin dependencies in your project configuration (pom.xml if you're using Maven)? – ollitietavainen Sep 14 '22 at 07:49
  • 1
    Given that your dep resolving works and the project is otherwise fine, the most likely cause is using the `vaadin-core` artifact instead of `vaadin`. – cfrick Sep 14 '22 at 07:53
  • Libraries should be ok all not pro components from vaadin work only the pro components import isnt working – Lukas Sep 14 '22 at 08:27
  • That is exactly the case what @cfrick described. Please check your pom about the correct usage of the artefacts. – Knoobie Sep 14 '22 at 08:39

1 Answers1

0

The error states, that the class can not be found and therefor the artifact is missing. Given, that the setup in general is fine (so no errors loading the artifacts, no broken artifacts in the local/caching/... repository, valid version, ...):

You are using the wrong artifact: com.vaadin:vaadin-core only contains the free components. If you want all (free and pro) components, use com.vaadin:vaadin; or add the pro components you need a la cart.

cfrick
  • 35,203
  • 6
  • 56
  • 68
  • I checked about the artifact and I am already using the right one: `com.vaadin:vaadin` – Lukas Sep 14 '22 at 09:17
  • I think there might be another problem with my pom.xml I am not able to figure out – Lukas Sep 14 '22 at 09:24
  • I'll keep this answer around, as it might help others with similar problem. Yet I don't use maven so this is general advice: rule out your IDE and check, if this also fails on CLI. Next let maven or your IDE list you the dependency tree or the effective class-path; is the artifact there? If it's there locate in your your `.m2/repository` and do a sanity check (`unzip -l` the jar, check the surrounding `.xml` file, ...); if you have doubts about the files, delete them. If they come back broken, your (caching) upstream server (e.g. company artifactory) has them broken. – cfrick Sep 14 '22 at 11:32