During my maven build I'm getting errors like this:
[ERROR] /sandbox/mobile-apps/quickdroid/test/src/com/xxx/MyActivity.java:[14,21] java.util.LinkedHashMap.Entry has private access in java.util.LinkedHashMap
I created a simple test project with one class. This error corresponds to this code:
LinkedHashMap.Entry<String, Object> test;
Intellij compiles this code just fine. If I change the -target=1.5 in my intellij javac parameters then I get the same error. Below in my pom.xml I've specified target 1.6 and verified with the -X parameter that maven is getting this setting. Why do I get errors as if it's still compiling target 1.5?
excerpts from maven -X output: 1.6
.
[DEBUG] (f) source = 1.6 [DEBUG] (f) staleMillis = 0 [DEBUG] (f) target = 1.6
.
[DEBUG] Command line options: [DEBUG] -d /sandbox/mobile-apps/quickdroid/test/target/classes -classpath {...} -g -nowarn -target 1.6 -source 1.6
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0
<groupId>com.xxx.android</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>apk</packaging>
<name>test</name>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.3.2</version>
<extensions>true</extensions>
<configuration>
<sdk>
<!-- platform or api level (api level 4 = platform 1.6)-->
<platform>11</platform>
</sdk>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>