After successfully adding a gradle dependency for a .jar file in mavenLocal(), how do I actually import and use that jar from a java class

Using mvn install I have a jar file that I can compile with gradle using the dependency:

compile files('org/springframework/batch/spring-batch-excel/0.5.0-SNAPSHOT/*.jar')
and adding the mavenLocal() repository

But I don’t know how to actually use this jar in my java code. Copying the config from here: doesn’t work. The link gives the import lines

import org.springframework.batch.item.excel.mapping.PassThroughRowMapper;
import org.springframework.batch.item.excel.poi.PoiItemReader;

But Intellij has a problem finding the .excell directory, which is where the files in the jar add new things to the spring framework, which tells me that it’s not looking in the jar I added. How do I make it do that?

The jar file contains src/main/java/org/springframework/batch/item/excel/[useful things]