It eventually occurred to me to look in the lib/ext directory of the JDK (on Mac, the equivalent directories are /Library/Java/Extensions
and $HOME/Library/Java/Extensions
) and, lo and behold, there was a version of SLF4J in there, along with a bunch of other stuff. Removing the SLF4J jars got my build working normally again.
(Note: I have had the ATO's AUSKey software deposit things in the lib/ext directory before, which is why I thought to look there. I haven't yet checked to see whether AUSKey will still work after I removed SLF4J from the directory.)