title: Cannot find the class from library project's jar when maven build my project
body: <p>I have downloaded an 3rd party Android library project, the project contains no java class file but an <strong>jar</strong> file under <code>libs/</code> folder:</p>
  
  <pre><code>libs/
      - CustomService.jar
  res/
     -…
  pom.xml
  </code></pre>
  
  <p>This library project can be maven built to <strong>apklib</strong> archive. I built it &amp; I have installed this archive into my <strong>local maven repository</strong>.</p>
  
  <p>Then in my own Android project, I have added the dependency of this <strong>apklib</strong> project:</p>
  
  <pre><code>&lt;dependency&gt;
     &lt;groupId&gt;com.custom.service&lt;/groupId&gt;
     &lt;artifactId&gt;custom-service&lt;/artifactId&gt;
     &lt;type&gt;apklib&lt;/type&gt;
     &lt;version&gt;1.0&lt;/version&gt;
   &lt;/dependency&gt;
  </code></pre>
  
  <p>In my Java code, I have used the class from the <strong>CustomService.jar</strong> , but when I maven build my project I constantly get the following error:</p>
  
  <pre><code>[ERROR] package com.custom.service.user does not exist
  [ERROR] location: class com.my.app.MyClass
  [ERROR] /Users/Johon/MyApp/src/main/java/com/my/app/MyClass.java:[34,17] cannot find symbol
  [ERROR] symbol:   variable UserService
  </code></pre>
  
  <p>The above error complains that it cannot find the <code>UserService</code> class from the library apklib archive. Then, I checked the content of the library jar file by command:</p>
  
  <p><code>jar tf CustomService.jar</code> </p>
  
  <p>I see that the class is in <strong>CustomService.jar</strong> of the library project</p>
  
  <pre><code>com/custom/service/user/UserService.class
  </code></pre>
  
  <p>This class is in the jar, Why I get the error then????</p>