[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [tycho-user] 1.0 fails build with access restriction
|
did you check the useProjectSettings behaviour change announced in the release notes
https://wiki.eclipse.org/Tycho/Release_Notes/1.0.0
Jan
On 21.04.17, 16:52, "tycho-user-bounces@xxxxxxxxxxx on behalf of Sievers, Jan" <tycho-user-bounces@xxxxxxxxxxx on behalf of jan.sievers@xxxxxxx> wrote:
if you have a small sample project that shows the problem, open a bug with steps to reproduce.
off the top of my head I don't think there are changes in Tycho that could cause a different behaviour.
However the underlying JDT compiler version was updated going from 0.26.0 to 1.0.0
Regards
Jan
On 21.04.17, 16:36, "tycho-user-bounces@xxxxxxxxxxx on behalf of Hussein, Mohamed" <tycho-user-bounces@xxxxxxxxxxx on behalf of mohamed_hussein@xxxxxxxxxx> wrote:
Thanks Jan for the info,
You are right about compilerArgs, I switched to use that now, but unfortunately it didn't change the behavior, the following still works in 0.26.0 and fails in 1.0.0
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<compilerArgs>
<arg>-err:-forbidden</arg>
<arg>-warn:-forbidden</arg>
</compilerArgs>
<!-- Allow Java 8 language -->
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
Best Regards,
Mohamed.
> -----Original Message-----
> From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-
> bounces@xxxxxxxxxxx] On Behalf Of Sievers, Jan
> Sent: Friday, April 21, 2017 9:24 AM
> To: Tycho user list <tycho-user@xxxxxxxxxxx>
> Subject: Re: [tycho-user] 1.0 fails build with access restriction
>
> I assume you are accessing JDK internal packages.
>
> If you want to relax access restriction errors, you should be able to use
> https://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-
> mojo.html#compilerArgs
>
>
> <plugin>
> <groupId>org.eclipse.tycho</groupId>
> <artifactId>tycho-compiler-plugin</artifactId>
> <version>${tycho.version}</version>
> <configuration>
> <compilerArgs>
> <arg>-err:-forbidden</arg>
> </compilerArgs>
> </configuration>
> </plugin>
>
> note the nested compilerArgs XML structure. If you put two
> compilerArgument flattened into the configuration, I'm not sure which one
> wins or if it's even specified.
>
> See JDT batch compiler args
> https://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%
> 2Ftasks%2Ftask-using_batch_compiler.htm
>
>
> Jan
>
>
> On 21.04.17, 15:55, "tycho-user-bounces@xxxxxxxxxxx on behalf of Hussein,
> Mohamed" <tycho-user-bounces@xxxxxxxxxxx on behalf of
> mohamed_hussein@xxxxxxxxxx> wrote:
>
> Hi,
>
> I had a build of a plugin that uses DOM classes from rt.jar that was building
> fine with 0.26.0 but when I changed Tycho.version to 1.0.0 it started failing
> with the following error:
>
> [ERROR]
> serializer.getDomConfig().setParameter(Constants.DOM_FORMAT_PRETTY_
> PRINT, true);
> [ERROR] ^^^^^^^^^^^^^^^^^^^^^^^
> [ERROR] Access restriction: The field
> 'Constants.DOM_FORMAT_PRETTY_PRINT' is not API (restriction on classpath
> entry 'C:\bin\jdk1.8.0_112\jre\lib\rt.jar')
>
> I have the following in the configuration of the Tycho-compiler-plugin
>
> <plugin>
> <groupId>org.eclipse.tycho</groupId>
> <artifactId>tycho-compiler-plugin</artifactId>
> <version>${tycho.version}</version>
> <configuration>
> <compilerArgument>-warn:none</compilerArgument>
>
> <compilerArgument>-err:none</compilerArgument>
> <source>1.8</source>
> <target>1.8</target>
> </configuration>
> </plugin>
>
> I also tried
> <compilerArgument>-err:-forbidden</compilerArgument>
> <compilerArgument>-warn:-forbidden</compilerArgument>
>
>
> I read through
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=369187
> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=369187> and
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=367431
> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=367431> but couldn’t
> understand what more to do.
>
> State:
> -
> Building with 0.26.0 with no compiler arguments FAIL
> -
> Building with 0.26.0 with –warn:none and –err:none compiler arguments
> *PASS*
> -
> Building with 1.0.0 with –warn:none and –err:none compiler arguments FAIL
> -
> Building with 1.0.0 with no compiler arguments FAIL
>
> Any clues?
>
> Best Regards,
> Mohamed.
>
>
>
>
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user