yanand0909 commented on PR #356: URL: https://github.com/apache/flink-agents/pull/356#issuecomment-3647505406
> Hi, @yanand0909, in #380, we support run ut & it & e2e on java 17. After it merged, I think we can verify the test cases about MCP in CI. For java 11, you can skip the related tests by add annotation `@DisabledOnJre(JRE.JAVA_11)`. > > But this can't resolve the compile problem in java 11, due to the MCP dependency require java version higher than 17. As we discussed in the last community sync, since the python-side features do not depend on a higher JDK version and many companies in China are still using JDK 11, we hope to support at least JDK 11, JDK 17, and JDK 21 simultaneously. > > A preliminary idea is that we could use a Maven profile to control include the MCP SDK and compile MCP api only in java 17, like > > ``` > <profiles> > <profile> > <id>java17</id> > <activation> > <jdk>[17,)</jdk> > </activation> > <dependencies> > <dependency> > <groupId>io.modelcontextprotocol.sdk</groupId> > <artifactId>mcp</artifactId> > <version>0.16.0</version> > </dependency> > </dependencies> > </profile> > > <profile> > <id>java11</id> > <activation> > <jdk>[11,)</jdk> > </activation> > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <version>3.8.1</version> > <configuration> > <excludes> > <exclude>org/apache/flink/agents/api/mcp/*.java</exclude> > </excludes> > </configuration> > </plugin> > </plugins> > </build> > </profile> > </profiles> > ``` > > I haven't confirmed whether this approach works, but you can use it as a reference. However, I believe it won't affect the MCP implementation itself, so I'll start the review as soon as I free up some time. Think for updating the CI pipeline @wenjin272, and the above approach to support all 3 version looks intuitive if it works -- 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]
