Why is the Guava library included with Vaadin 14 not appearing on my project's classpath?

Viewed 131

Vaadin 14.1.0alpha4 automatically includes the Google Guava version 25 library via its Maven configuration. See the screenshot below, listed on the left side.

Yet in my own code, when referring to a class in Google Guava, IntelliJ marks it as a compiler error. IntelliJ offers to “Add library Guava to classpath”. In the screenshot below, see the two orange arrows on the right side.

➥ Why is the Guava listed as a downloaded library listed in my Vaadin 14 project not already on the classpath? Why is Guava not available to my code?

enter image description here

1 Answers

The empty project default seems to only include that dependency in a test scope:

mvn dependency:tree | grep "guava"

[INFO]    |  |  +- com.google.guava:guava:jar:25.0-jre:test

The maven panel is more precise on what dependencies are available in what scope and what module:

maven panel dependencies

Related