chaokunyang commented on PR #2421:
URL: https://github.com/apache/fory/pull/2421#issuecomment-3094603127
Maven support use different java version for different module::
```xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<release>${maven.compiler.release}</release>
</configuration>
</plugin>
</plugins>
</build>
```
but it needs an extra toolchains.xml file to specify different jdk install
location.
```
mvn clean install --toolchains toolchains.xml
```
```
<?xml version="1.0" encoding="UTF8"?>
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<version>11</version>
</provides>
<configuration>
<jdkHome>/path/to/jdk-11</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>17</version>
</provides>
<configuration>
<jdkHome>/path/to/jdk-17</jdkHome>
</configuration>
</toolchain>
</toolchains>
```
I can configure all modules to java 11 to skip this, but when running on ci
and making release, we use a scipt to automatically switched to use this
"polyglot" Maven builds. This won't introduce too much burden to users and
contributors
I think we can do it after #2406 is merged
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]