title: Why the class org/apache/commons/fileupload/FileItemFactory has not been imported automatically
body: <p>I have basic dependencies in pom.xml</p>
  
  <pre><code>&lt;dependencies&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
    &lt;artifactId&gt;aspectjweaver&lt;/artifactId&gt;
    &lt;version&gt;1.7.3&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
    &lt;artifactId&gt;aspectjrt&lt;/artifactId&gt;
    &lt;version&gt;1.6.11&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
    &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
    &lt;version&gt;1.9.12&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!-- mybatis --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.mybatis&lt;/groupId&gt;
    &lt;artifactId&gt;mybatis-spring&lt;/artifactId&gt;
    &lt;version&gt;${org.mybatis.spring.version}&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.mybatis&lt;/groupId&gt;
    &lt;artifactId&gt;mybatis&lt;/artifactId&gt;
    &lt;version&gt;${org.mybatis.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!-- data source --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;commons-dbcp&lt;/groupId&gt;
    &lt;artifactId&gt;commons-dbcp&lt;/artifactId&gt;
    &lt;version&gt;1.4&lt;/version&gt;
    &lt;!--&lt;scope&gt;runtime&lt;/scope&gt;--&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;mysql&lt;/groupId&gt;
    &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
    &lt;version&gt;5.1.6&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!-- log --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
    &lt;artifactId&gt;logback-classic&lt;/artifactId&gt;
    &lt;version&gt;1.1.2&lt;/version&gt;
    &lt;scope&gt;compile&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
    &lt;artifactId&gt;logback-core&lt;/artifactId&gt;
    &lt;version&gt;1.1.2&lt;/version&gt;
    &lt;scope&gt;compile&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;!-- spring test --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework&lt;/groupId&gt;
    &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.version}&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;junit&lt;/groupId&gt;
    &lt;artifactId&gt;junit&lt;/artifactId&gt;
    &lt;version&gt;4.12&lt;/version&gt;
    &lt;!--&lt;scope&gt;test&lt;/scope&gt;--&gt;
  &lt;/dependency&gt;
  
  &lt;!-- mybatis pager --&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;com.github.pagehelper&lt;/groupId&gt;
    &lt;artifactId&gt;pagehelper&lt;/artifactId&gt;
    &lt;version&gt;4.1.0&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;com.github.miemiedev&lt;/groupId&gt;
    &lt;artifactId&gt;mybatis-paginator&lt;/artifactId&gt;
    &lt;version&gt;1.2.17&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;com.github.jsqlparser&lt;/groupId&gt;
    &lt;artifactId&gt;jsqlparser&lt;/artifactId&gt;
    &lt;version&gt;0.9.4&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p></p>
  
  <p>There is a class <code>org.springframework.web.multipart.commons.CommonsMultipartResolver</code> which belong to spring-web.jar, and this class also depend on class <code>org.apache.commons.fileupload.FileItemFactory</code>; so if I have spring-web.jar imported, the lib commons-fileupload which class <code>org.apache.commons.fileupload.FileItemFactory</code> belong to should be automatically imported.</p>
  
  <p>But now, I got error that class org/apache/commons/fileupload/FileItemFactory not found when I append the following code in mvc xml config file:</p>
  
  <pre><code>&lt;bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"&gt;
      &lt;property name="maxUploadSize" value="10485760" /&gt;
      &lt;property name="maxInMemorySize" value="4096" /&gt;
      &lt;property name="defaultEncoding" value="UTF-8" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>I want to know why the maven do not import lib commons-fileupload</p>