title: Using Apache Commons IO in a Gradle project
body: <p>I'm writing a Java program - a plain command line program, not Android or anything like that - using Gradle, and trying to include Apache Commons IO. Per <a href="https://mvnrepository.com/artifact/commons-io/commons-io/2.6" rel="nofollow noreferrer">https://mvnrepository.com/artifact/commons-io/commons-io/2.6</a> I ended up with <code>build.gradle</code> like this:</p>
  
  <pre><code>apply plugin: 'application'
  apply plugin: 'java'
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      // https://mvnrepository.com/artifact/commons-io/commons-io
      compile group: 'commons-io', name: 'commons-io', version: '2.6'
  }
  
  mainClassName = 'Main'
  </code></pre>
  
  <p>Gradle seems to download the package happily enough, but import statements referring to <code>apache</code> or <code>commons</code> get a not found error; this is true even when I run <code>gradle build</code> from the command line, omitting any IDE. What am I missing? (Previous similar discussions have been for Android or Eclipse projects; the instructions for those haven't worked here.)</p>