Hello,
I have had the same problem with the tycho jdt compiler treating access restrictions as errors. I read the E-Mail from Barrie Treloar and that the following configuration did not work for him:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<compilerArgument>-warn:-forbidden</compilerArgument>
</configuration>
</plugin>
He thought that the following code fragment prevented it from working:
org.eclipse.tycho.compiler.jdt.JDTCompiler compileInProcess()
compiler.options.put(CompilerOptions.OPTION_ReportForbiddenReference,
CompilerOptions.ERROR);
But the compiler is afterwards called with the arguments from the plugin configuration and those arguments can override any options set prior. But that line of code helps to understand what is going on: It converts the “forbidden reference” warning to an error and therefore a different compiler argument is needed:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<compilerArgument>-err:-forbidden</compilerArgument>
</configuration>
</plugin>
That arguments removes the specific warning “forbidden reference” from being converted to an error. Compilation works than.
Hope that helps.
Jan Rosczak