Reputation: 19185
I have been using version 1.3.2 of commons-io
before for project A. On project B I used the newest version 2.4. Now I want to add Project B's JAR
as library to project A. Since project B uses functionalities that didn't exist yet in commons-io version 1.3.2 I updated the pom.xml
of project A to use version 2.4 for commons-io:
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
Now when I try to run the code in project A which calls libraries in project B, I'm getting
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.deleteQuietly(Ljava/io/File;)Z
since IntelliJ
didn't seem to realize that the libraries have updated.
I tried re-importing the Maven dependencies and deleting the local directory containing the commons-io libraries C:\Users\Name\.m2\repository\commons-io
but that didn't work either. How do I fix this and make IntelliJ become aware of the updated classes such as FileUtils
? Their decompiler for example shows me the old byte code version still when I peek definitions but it is supposed to update it according to the pom.xml
.
I have import Maven projects automatically checked by the way.
Upvotes: 3
Views: 12429
Reputation: 454
Right click on the project, go to Maven -> Reimport. This should show all the maven imports and update all the new jars.
Upvotes: 4