ElliotDaly109
ElliotDaly109

Reputation: 53

Vaadin cannot find java class from my own external library

I have a common-project, where most of my help-classes are stored, so that I can use them for almost every project I make.

Now, I have my Vaadin project, flow version 14, which I want to use it. However, when I add the jar file to the library, the classes in the library are not found.

I added the library-jar in this way: File > Project Structure > Libraries > + > Java > Found the jar > Ok > Apply > Ok.

The library is added to the external libraries.

When I add the library to other java/maven projects, I have no issues.

Here is an example code:

if (notify) Utility.sendToUser(LangOut.get("eTokenBad"));

Utility and LangOut are both found in the library. That line of code does not work in my Vaadin-project, but it works in any other project which uses the library too.

The error is listed as cannot find symbol:224. The line is 224.

I figure that there is an extra step for Vaadin to pick it up.

Upvotes: 0

Views: 302

Answers (1)

Avec
Avec

Reputation: 1761

This has nothing to do with Vaadin but how you make your dependencies available for Maven.

With Maven you have two options depending if you have access to a remote repository like Nexus, Artifactory, etc or not. Many organizations have this available on the Intranet. In that case you can deploy to that repository. Otherwise you can install to you local ~/.m2/repository (Linux/Mac). Windows probably something like C:\Users\[username]\.m2\repository

Local ~/.m2/repository
https://mkyong.com/maven/how-to-include-library-manully-into-maven-local-repository/

Deploy to remote artifactory where you have access
https://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html

Upvotes: 3

Related Questions