title: Android Maven compilation failure
body: <p>I've been struggling with this for hours now... I have a maven Android lib project, and compiling it fails with the following debug output:</p>
  
  <pre><code>[DEBUG] Configuring mojo org.apache.maven.plugins:maven-compiler-plugin:2.4:compile from plugin realm ClassRealm[plugin&gt;org.apache.maven.plugins:maven-compiler-plugin:2.4, parent: sun.misc.Launcher$AppClassLoader@77cde100]
  [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-compiler-plugin:2.4:compile' with basic configurator --&gt;
  [DEBUG]   (f) basedir = D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera
  [DEBUG]   (f) buildDirectory = D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target
  [DEBUG]   (f) classpathElements = [D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\classes, C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-module-manager\0.0.1\nu-art-module-manager-0.0.1.jar, C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-exception-handling\0.0.1\nu-art-exception-handling-0.0.1.jar, C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-reflection\0.0.1\nu-art-reflection-0.0.1.jar, C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-core\0.0.1\nu-art-core-0.0.1.jar, C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-tools\0.0.1\nu-art-tools-0.0.1.jar, C:\Users\TacB0sS\.m2\repository\org\jdom\jdom\1.1\jdom-1.1.jar, C:\Users\TacB0sS\.m2\repository\com\nu\art\software\rexml\0.0.1\rexml-0.0.1.jar, C:\Users\TacB0sS\.m2\repository\com\nu\art\software\cyborg\cyborg\0.0.1\cyborg-0.0.1.jar, C:\Users\TacB0sS\.m2\repository\com\android\framework\android-intermediate-package\0.0.1\android-intermediate-package-0.0.1.jar, C:\Users\TacB0sS\.m2\repository\com\google\android\android\3.2_r1\android-3.2_r1.jar]
  [DEBUG]   (f) compileSourceRoots = [D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\src\main\java, D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\generated-sources\extracted-dependencies\src\main\java, D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\generated-sources\r, D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\generated-sources\aidl]
  [DEBUG]   (f) compilerId = javac
  [DEBUG]   (f) debug = true
  [DEBUG]   (f) encoding = UTF-8
  [DEBUG]   (f) failOnError = true
  [DEBUG]   (f) fork = false
  [DEBUG]   (f) generatedSourcesDirectory = D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\generated-sources\annotations
  [DEBUG]   (f) optimize = false
  [DEBUG]   (f) outputDirectory = D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\classes
  [DEBUG]   (f) outputFileName = cyborg-module-camera-0.0.1
  [DEBUG]   (f) projectArtifact = com.nu.art.software.cyborg:cyborg-module-camera:apklib:0.0.1
  [DEBUG]   (f) session = org.apache.maven.execution.MavenSession@201d592a
  [DEBUG]   (f) showDeprecation = false
  [DEBUG]   (f) showWarnings = false
  [DEBUG]   (f) source = 1.6
  [DEBUG]   (f) staleMillis = 0
  [DEBUG]   (f) target = 1.6
  [DEBUG]   (f) verbose = false
  [DEBUG] -- end configuration --
  [DEBUG] Using compiler 'javac'.
  [DEBUG] Source directories: [D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\src\main\java
   D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\generated-sources\r
   D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\generated-sources\aidl]
  [DEBUG] Classpath: [D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\classes
   C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-module-manager\0.0.1\nu-art-module-manager-0.0.1.jar
   C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-exception-handling\0.0.1\nu-art-exception-handling-0.0.1.jar
   C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-reflection\0.0.1\nu-art-reflection-0.0.1.jar
   C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-core\0.0.1\nu-art-core-0.0.1.jar
   C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-tools\0.0.1\nu-art-tools-0.0.1.jar
   C:\Users\TacB0sS\.m2\repository\org\jdom\jdom\1.1\jdom-1.1.jar
   C:\Users\TacB0sS\.m2\repository\com\nu\art\software\rexml\0.0.1\rexml-0.0.1.jar
   C:\Users\TacB0sS\.m2\repository\com\nu\art\software\cyborg\cyborg\0.0.1\cyborg-0.0.1.jar
   C:\Users\TacB0sS\.m2\repository\com\android\framework\android-intermediate-package\0.0.1\android-intermediate-package-0.0.1.jar
   C:\Users\TacB0sS\.m2\repository\com\google\android\android\3.2_r1\android-3.2_r1.jar]
  [DEBUG] Output directory: D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\classes
  [DEBUG] Classpath:
  [DEBUG]  D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\classes
  [DEBUG]  C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-module-manager\0.0.1\nu-art-module-manager-0.0.1.jar
  [DEBUG]  C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-exception-handling\0.0.1\nu-art-exception-handling-0.0.1.jar
  [DEBUG]  C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-reflection\0.0.1\nu-art-reflection-0.0.1.jar
  [DEBUG]  C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-core\0.0.1\nu-art-core-0.0.1.jar
  [DEBUG]  C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-tools\0.0.1\nu-art-tools-0.0.1.jar
  [DEBUG]  C:\Users\TacB0sS\.m2\repository\org\jdom\jdom\1.1\jdom-1.1.jar
  [DEBUG]  C:\Users\TacB0sS\.m2\repository\com\nu\art\software\rexml\0.0.1\rexml-0.0.1.jar
  [DEBUG]  C:\Users\TacB0sS\.m2\repository\com\nu\art\software\cyborg\cyborg\0.0.1\cyborg-0.0.1.jar
  [DEBUG]  C:\Users\TacB0sS\.m2\repository\com\android\framework\android-intermediate-package\0.0.1\android-intermediate-package-0.0.1.jar
  [DEBUG]  C:\Users\TacB0sS\.m2\repository\com\google\android\android\3.2_r1\android-3.2_r1.jar
  [DEBUG] Source roots:
  [DEBUG]  D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\src\main\java
  [DEBUG]  D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\generated-sources\extracted-dependencies\src\main\java
  [DEBUG]  D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\generated-sources\r
  [DEBUG]  D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\generated-sources\aidl
  [DEBUG] Command line options:
  [DEBUG] -d D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\classes -classpath D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\classes;C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-module-manager\0.0.1\nu-art-module-manager-0.0.1.jar;C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-exception-handling\0.0.1\nu-art-exception-handling-0.0.1.jar;C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-reflection\0.0.1\nu-art-reflection-0.0.1.jar;C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-core\0.0.1\nu-art-core-0.0.1.jar;C:\Users\TacB0sS\.m2\repository\com\nu\art\software\nu-art-tools\0.0.1\nu-art-tools-0.0.1.jar;C:\Users\TacB0sS\.m2\repository\org\jdom\jdom\1.1\jdom-1.1.jar;C:\Users\TacB0sS\.m2\repository\com\nu\art\software\rexml\0.0.1\rexml-0.0.1.jar;C:\Users\TacB0sS\.m2\repository\com\nu\art\software\cyborg\cyborg\0.0.1\cyborg-0.0.1.jar;C:\Users\TacB0sS\.m2\repository\com\android\framework\android-intermediate-package\0.0.1\android-intermediate-package-0.0.1.jar;C:\Users\TacB0sS\.m2\repository\com\google\android\android\3.2_r1\android-3.2_r1.jar; -sourcepath D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\src\main\java;D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\generated-sources\r;D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\generated-sources\aidl; D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\src\main\java\com\nu\art\software\cyborg\modules\camera\core\CameraLayer.java D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\src\main\java\com\nu\art\software\cyborg\modules\camera\core\CameraModule.java D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\src\main\java\com\nu\art\software\cyborg\modules\camera\core\CameraException.java -s D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\generated-sources\annotations -g -nowarn -target 1.6 -source 1.6 -encoding UTF-8
  [INFO] Compiling 3 source files to D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\target\classes
  [INFO] -------------------------------------------------------------
  [ERROR] COMPILATION ERROR : 
  [INFO] -------------------------------------------------------------
  [ERROR] D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\src\main\java\com\nu\art\software\cyborg\modules\camera\core\CameraLayer.java:[79,80] cannot find symbol
  symbol  : method getRotation()
  location: class android.view.Display
  [ERROR] D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\src\main\java\com\nu\art\software\cyborg\modules\camera\core\CameraModule.java:[50,23] cannot find symbol
  symbol  : method getNumberOfCameras()
  location: class android.hardware.Camera
  [ERROR] D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\src\main\java\com\nu\art\software\cyborg\modules\camera\core\CameraModule.java:[66,26] cannot find symbol
  symbol  : class CameraInfo
  location: class android.hardware.Camera
  [ERROR] D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\src\main\java\com\nu\art\software\cyborg\modules\camera\core\CameraModule.java:[66,78] cannot find symbol
  symbol  : class CameraInfo
  location: class android.hardware.Camera
  [ERROR] D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\src\main\java\com\nu\art\software\cyborg\modules\camera\core\CameraModule.java:[88,19] open() in android.hardware.Camera cannot be applied to (int)
  [ERROR] D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\src\main\java\com\nu\art\software\cyborg\modules\camera\core\CameraModule.java:[109,26] cannot find symbol
  symbol  : class CameraInfo
  location: class android.hardware.Camera
  [ERROR] D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\src\main\java\com\nu\art\software\cyborg\modules\camera\core\CameraModule.java:[109,78] cannot find symbol
  symbol  : class CameraInfo
  location: class android.hardware.Camera
  [ERROR] D:\Development\Java\Projects\Frameworks\Cyborg\Cyborg Module - Camera\src\main\java\com\nu\art\software\cyborg\modules\camera\core\CameraModule.java:[124,8] cannot find symbol
  symbol  : method setDisplayOrientation(int)
  location: class android.hardware.Camera
  [INFO] 8 errors 
  [INFO] -------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  </code></pre>
  
  <p>NOTE that one of the classpath variables is:
  C:\Users\TacB0sS.m2\repository\com\google\android\android\3.2_r1\android-3.2_r1.jar</p>
  
  <p>I've doubled and triple checked this, and I'm sure that these method and classes are in the above jar, in Eclipse I use the same jar in the standard build path, and it compiles just fine, also browsing it shows the object and method included.</p>
  
  <p>What am I missing?</p>
  
  <p>UPDATE:</p>
  
  <p>Some of the effective pom:</p>
  
  <pre><code>&lt;properties&gt;
      &lt;owner&gt;Adam Zehavi&lt;/owner&gt;
      &lt;android.version&gt;3.2_r1&lt;/android.version&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;android.sdk&gt;13&lt;/android.sdk&gt;
      &lt;company.name&gt;Nu-Art Software&lt;/company.name&gt;
      &lt;nickname&gt;TacB0sS&lt;/nickname&gt;
      &lt;android.emulator.name&gt;emulator1&lt;/android.emulator.name&gt;
  &lt;/properties&gt;
  ...
  ...
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.nu.art.software.cyborg&lt;/groupId&gt;
          &lt;artifactId&gt;cyborg&lt;/artifactId&gt;
          &lt;version&gt;0.0.1&lt;/version&gt;
          &lt;type&gt;apklib&lt;/type&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.nu.art.software.cyborg&lt;/groupId&gt;
          &lt;artifactId&gt;cyborg&lt;/artifactId&gt;
          &lt;version&gt;0.0.1&lt;/version&gt;
          &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.android&lt;/groupId&gt;
          &lt;artifactId&gt;android&lt;/artifactId&gt;
          &lt;version&gt;3.2_r1&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  ...
  ...
  &lt;plugin&gt;
      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.4&lt;/version&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;default-testCompile&lt;/id&gt;
              &lt;phase&gt;test-compile&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;testCompile&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.6&lt;/source&gt;
                  &lt;target&gt;1.6&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/execution&gt;
          &lt;execution&gt;
              &lt;id&gt;default-compile&lt;/id&gt;
              &lt;phase&gt;compile&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;compile&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.6&lt;/source&gt;
                  &lt;target&gt;1.6&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
      &lt;configuration&gt;
          &lt;source&gt;1.6&lt;/source&gt;
          &lt;target&gt;1.6&lt;/target&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>