Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+19 votes

I've been trying to add a dependency in my pom.xml file to read csv files but I keep getting an error that the dependency cannot be found. I've already tried adding a dependency via project structure. Does anyone know how to add a detectable dependency that reads csv files ?

asked in CSC305 Fall 2023 by (1 point)

2 Answers

+9 votes

Make sure you also add the dependency in module-info.java within your project. It would look something like:
requires csv.reader;

answered by (1 point)
+7 votes

Once you have added the dependency in module-info.java, you might also need to click on the "M" on the right side of the screen (the Maven symbol) and press the refresh button to make sure that it has picked up on the change you made to the dependencies. I've found refreshing/reloading the Maven project is a good first step if at any point you try to run your software and it is not able to complete the build.

answered by (1 point)
...