Skip to content

Commit

Permalink
Reduce illegal access warnings related to Guice
Browse files Browse the repository at this point in the history
This is done by inforcing Guice 5.0.1 (instead of Guice 3.x) whereever possible. A proper solution will pe possible with Xtext 2.26 (see eclipse/xtext-core#393)
  • Loading branch information
mabauer committed Jan 12, 2022
1 parent 8007abd commit 9a31811
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 1 deletion.
5 changes: 5 additions & 0 deletions de.mkbauer.tinyscript.repl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<artifactId>jline</artifactId>
<version>2.14.2</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>5.0.1</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,10 @@
<repository location="https://download.eclipse.org/tools/orbit/downloads/2021-12"/>
<unit id="org.slf4j.api" version="1.7.30.v20200204-2150"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="https://download.eclipse.org/tools/orbit/downloads/2021-12"/>
<unit id="com.google.inject" version="5.0.1.v20210324-2015"/>
<unit id="com.google.inject.source" version="5.0.1.v20210324-2015"/>
</location>
</locations>
</target>
5 changes: 5 additions & 0 deletions de.mkbauer.tinyscript.webdemo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@
<artifactId>org.eclipse.equinox.common</artifactId>
<version>3.6.0</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>5.0.1</version>
</dependency>
</dependencies>
<build>
<testResources>
Expand Down
12 changes: 11 additions & 1 deletion de.mkbauer.tinyscript/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
<artifactId>org.eclipse.core.runtime</artifactId>
</exclusion>
</exclusions>

</dependency>
<dependency>
<groupId>org.eclipse.xtext</groupId>
Expand All @@ -82,6 +81,17 @@
<artifactId>xtext-antlr-generator</artifactId>
<version>[2.1.1, 3)</version>
</dependency>
<!--
mwe2Launcher will still use Guice 3.0 for some reason, so it will issue a warning during build:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$2
The following does not prevent this!
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>5.0.1</version>
</dependency>
-->
</dependencies>
</plugin>
<plugin>
Expand Down
10 changes: 10 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@
<version>${project.version}</version>
</artifact>
</target>
<filters>
<filter>
<type>eclipse-plugin</type>
<id>com.google.inject</id>
<restrictTo>
<!-- <version>5.0.1</version> -->
<versionRange>[5.0.1,6.0.0)</versionRange>
</restrictTo>
</filter>
</filters>
<environments>
<environment>
<os>macosx</os>
Expand Down

0 comments on commit 9a31811

Please sign in to comment.