Skip to content

Commit

Permalink
fix(ci): fix build for java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed Nov 17, 2021
1 parent ace1c30 commit f4c2ccf
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 35 deletions.
1 change: 1 addition & 0 deletions .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
34 changes: 0 additions & 34 deletions code-generation/language-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,40 +76,6 @@
</plugins>
</build>

<profiles>
<profile>
<id>java8</id>
<activation>
<jdk>1.8</jdk>
</activation>
<!-- TODO: fix build for java 8-->
</profile>
<profile>
<id>java17</id>
<!-- NOTE: activate manually if you have a 17 version installed as this is getting picked up by the invoker plugin -->
<activation>
<jdk>[17,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<configuration>
<mavenOpts>
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
</mavenOpts>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<dependencies>
<!-- We are using the Freemarker module to generate Java code -->
<dependency>
Expand Down
36 changes: 35 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@
<!-- Exclude files generated by the go build system -->
<exclude>**/go.sum</exclude>

<!--exclude>plc4go/**</exclude-->
<exclude>.mvn/**</exclude>
</excludes>
</configuration>
</plugin>
Expand Down Expand Up @@ -1646,6 +1646,40 @@
</plugins>
</build>
</profile>

<!-- Java 8 specific fixes-->
<profile>
<id>java8</id>
<activation>
<jdk>1.8</jdk>
</activation>
<!-- TODO: fix build for java 8-->
</profile>
<!-- Java 17 specific fixes-->
<profile>
<id>java17</id>
<!-- NOTE: activate manually if you have a 17 version installed as this is getting picked up by the invoker plugin -->
<activation>
<jdk>[17,)</jdk>
</activation>
<!--build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<configuration>
<mavenOpts>
- -add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
- -add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
- -add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
- -add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
- -add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
</mavenOpts>
</configuration>
</plugin>
</plugins>
</build-->
</profile>
</profiles>

</project>

0 comments on commit f4c2ccf

Please sign in to comment.