Copilot commented on code in PR #148: URL: https://github.com/apache/maven-toolchains-plugin/pull/148#discussion_r3097725716
########## src/it/select-jdk-env-multi/pom.xml: ########## @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.apache.maven.plugins.toolchains.its</groupId> + <artifactId>select-jdk-toolchain-range</artifactId> Review Comment: The IT module’s <artifactId> is set to "select-jdk-toolchain-range", which duplicates the existing range IT and doesn’t match the directory/test purpose (env-multi). This makes IT results harder to interpret and can confuse future maintenance; rename it to something aligned with this IT (e.g., select-jdk-env-multi). ```suggestion <artifactId>select-jdk-env-multi</artifactId> ``` ########## src/it/select-jdk-env-multi/invoker.properties: ########## @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +invoker.goals = compile +invoker.environmentVariables.JAVA_X_HOME = ${java.home.sanitized} +invoker.environmentVariables.JAVA_Y_HOME = ${java.home.sanitized} Review Comment: This IT sets JAVA_X_HOME / JAVA_Y_HOME to ${java.home.sanitized}. On Java 8, ${java.home} frequently points to the JRE subdirectory (…/jre), which will be ignored by ToolchainDiscoverer (it requires bin/javac) and can make this IT fail depending on the build JDK. Consider deriving a JDK-home property (e.g., strip a trailing "/jre" after sanitizing slashes) and using that for these environment variables. ```suggestion invoker.environmentVariables.JAVA_X_HOME = ${env.JAVA_HOME} invoker.environmentVariables.JAVA_Y_HOME = ${env.JAVA_HOME} ``` -- 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]
