0

I tried to connect PostgreSQL connector driver with maven but it doesn't find this dependency

enter image description here

enter image description here

enter image description here

I tried to add driver as .jar file with Project structure and it worked, but I want to add it just like dependency in maven.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Ilya
  • 135
  • 1
  • 2
  • 10

2 Answers2

2

Since IntelliJ IDEA 2020.1, it will no longer automatically import updates from your pom.xml when you make changes within the IDE (it will import when - for example - updating from version control). You need to explicitly import changes by clicking the floating refresh button (see top right corner inside your pom.xml view) for the changes to your pom.xml to be processed.

As far as I know, the reason for this change is to prevent multiple time-consuming imports when you are updating your pom files.

As indicated in the comments by CrazyCoder, IntelliJ 2020.1.2 will introduce an option to enable automatic import for any changes again.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
  • See https://stackoverflow.com/a/43192764/104891. IntelliJ IDEA 2020.1.2 RC already has a new 3-state option for automatic importing: https://confluence.jetbrains.com/display/IDEADEV/IDEA+2020.1+latest+builds. – CrazyCoder May 28 '20 at 19:23
  • @CrazyCoder That option exists for Gradle, but as far as I can tell not for Maven. – Mark Rotteveel May 29 '20 at 06:45
  • No, it [exists for Maven as well](https://i.imgur.com/eJhzVjP.png). – CrazyCoder May 29 '20 at 06:50
  • @CrazyCoder It is interesting that the button already exists in 2020.1.1 for Gradle, but not for Maven. I assume they added this in 2020.1.2. – Mark Rotteveel May 29 '20 at 06:53
0

As I understood it was IDEA problem. I used "mvn clean compile" in terminal and idea started see the dependency

Ilya
  • 135
  • 1
  • 2
  • 10