IntelliJ IDEA 2016.3 Help

Resolving References with Maven

To fix unresolved reference in a Java class

  1. In a Java class, place the caret at an unresolved reference, and press Alt+Enter.
  2. From the suggestion list, choose Add Maven Dependency
    /help/img/idea/2016.3/maven_references1.png

    The Maven Artifact Search dialog box opens with the Search for class tab having the focus, and with the reference in question as the search string.

  3. 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.xml file. Import assistant pop-up window appears at the unresolved reference:
    /help/img/idea/2016.3/maven_references.png
  4. Press Alt+Enter to apply import assistance.

See Also

```

Concepts:

Last modified: 21 March 2017