Copilot commented on code in PR #1652: URL: https://github.com/apache/maven-dependency-plugin/pull/1652#discussion_r3536391529
########## src/it/projects/mdep-1645-verbose-no-duplicate-ignored/verify.groovy: ########## @@ -0,0 +1,35 @@ +/* + * 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. + */ + +File buildLog = new File( basedir, "build.log" ) +assert buildLog.exists() + +String log = buildLog.getText( "UTF-8" ) + +// warning sections should be present +assert log.contains( '[WARNING] Used undeclared dependencies found:' ) +assert log.contains( '[WARNING] org.apache.commons:commons-lang3:jar:3.12.0:compile' ) +assert log.contains( '[WARNING] Unused declared dependencies found:' ) +assert log.contains( '[WARNING] org.apache.commons:commons-text:jar:1.10.0:compile' ) Review Comment: The IT is meant to validate `dependency:analyze -Dverbose` behavior, but it doesn't assert any output that is unique to verbose mode. If the `<verbose>true</verbose>` configuration is not applied for some reason, the test could still pass (and would not actually reproduce the duplication bug). Add an assertion for a class line that only appears in verbose output for used-undeclared dependencies. -- 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]
