Resolving References with Maven
To fix unresolved reference in a Java class
- In a Java class, place the caret at an unresolved reference, and press Alt+Enter.
- From the suggestion list, choose
- Select the desired dependency, and click Add. IntelliJ IDEA downloads the necessary libraries and rebuilds indices, and adds the corresponding
<dependency>element to the
pom.xmlfile. Import assistant pop-up window appears at the unresolved reference:
- Press Alt+Enter to apply import assistance.
Last modified: 18 July 2017