You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/12/15 11:35:54 UTC

[GitHub] [maven-dependency-plugin] josephw opened a new pull request #178: MDEP-779 show class names used in undeclared dependencies

josephw opened a new pull request #178:
URL: https://github.com/apache/maven-dependency-plugin/pull/178


   This adds [the class names tracked in this PR](https://github.com/apache/maven-dependency-analyzer/pull/44) to the UI, when `-Dverbose` is set:
   
   ```
   [WARNING] Used undeclared dependencies found:
   [WARNING]    xml-apis:xml-apis:jar:1.0.b2:compile
   [WARNING]       class org.apache.xmlcommons.Version
   [WARNING] Unused declared dependencies found:
   [WARNING]    dom4j:dom4j:jar:1.6.1:compile
   ```
   It also includes the small changes necessary for any upgrade of `maven-dependency-analyzer` to `1.12`.
   
   To allow this to be reviewed ahead of a release of `maven-dependency-analyzer`, the version is set to `1.12.0-SNAPSHOT`; if approved, it'll presumably be `1.12.0`. As mentioned, it ties the new output to `-Dverbose`; I think this is simpler than adding a new specific property, and less disruptive than enabling it by default.
   
   
   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
    - [x] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MDEP) filed 
          for the change (usually before you start working on it).  Trivial changes like typos do not 
          require a JIRA issue.  Your pull request should address just this issue, without 
          pulling in other changes.
    - [x] Each commit in the pull request should have a meaningful subject line and body.
    - [x] Format the pull request title like `[MDEP-XXX] - Fixes bug in ApproximateQuantiles`,
          where you replace `MDEP-XXX` with the appropriate JIRA issue. Best practice
          is to use the JIRA issue title in the pull request title and in the first line of the 
          commit message.
    - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
    - [x] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will 
          be performed on your pull request automatically.
    - [ ] You have run the integration tests successfully (`mvn -Prun-its clean verify`).
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [x] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-dependency-plugin] slawekjaranowski commented on pull request #178: MDEP-779 show class names used in undeclared dependencies

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on pull request #178:
URL: https://github.com/apache/maven-dependency-plugin/pull/178#issuecomment-1025143220


   We need some tests to confirm regressions in next releases. 
   Please add IT test with output verification.
   


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-dependency-plugin] slawekjaranowski commented on a change in pull request #178: MDEP-779 show class names used in undeclared dependencies

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on a change in pull request #178:
URL: https://github.com/apache/maven-dependency-plugin/pull/178#discussion_r795203162



##########
File path: src/it/projects/mdep-779-analyze-only-verbose-shows-class-names/verify.bsh
##########
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+
+import org.codehaus.plexus.util.*;
+
+String log = FileUtils.fileRead( new File( basedir, "build.log" ) );
+
+String expected = "[WARNING] Used undeclared dependencies found:\n"
+                + "[WARNING]    xml-apis:xml-apis:jar:1.0.b2:compile\n"
+                + "[WARNING]       class org.apache.xmlcommons.Version\n";

Review comment:
       we must use system native end line ...




-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-dependency-plugin] slawekjaranowski commented on pull request #178: MDEP-779 show class names used in undeclared dependencies

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on pull request #178:
URL: https://github.com/apache/maven-dependency-plugin/pull/178#issuecomment-1025146611


   There is test `src/it/projects/analyze` you can try to extend test verification


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-dependency-plugin] slawekjaranowski commented on pull request #178: MDEP-779 show class names used in undeclared dependencies

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on pull request #178:
URL: https://github.com/apache/maven-dependency-plugin/pull/178#issuecomment-1024915461


   `maven-dependency-analyzer` was released, please rebase your PR. 


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-dependency-plugin] josephw commented on pull request #178: MDEP-779 show class names used in undeclared dependencies

Posted by GitBox <gi...@apache.org>.
josephw commented on pull request #178:
URL: https://github.com/apache/maven-dependency-plugin/pull/178#issuecomment-1025127260


   > `maven-dependency-analyzer` was released, please rebase your PR.
   
   Great; I've rebased on top of 7b8ff3d9f9d7d8b.


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-dependency-plugin] slawekjaranowski commented on a change in pull request #178: MDEP-779 show class names used in undeclared dependencies

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on a change in pull request #178:
URL: https://github.com/apache/maven-dependency-plugin/pull/178#discussion_r795202730



##########
File path: src/it/projects/mdep-779-analyze-only-verbose-shows-class-names/verify.bsh
##########
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+
+import org.codehaus.plexus.util.*;
+
+String log = FileUtils.fileRead( new File( basedir, "build.log" ) );

Review comment:
       We can use groovy script here ... and we needn't external dependencies.
   look for build.log reading in another groovy scripts




-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-dependency-plugin] slawekjaranowski merged pull request #178: MDEP-779 show class names used in undeclared dependencies

Posted by GitBox <gi...@apache.org>.
slawekjaranowski merged pull request #178:
URL: https://github.com/apache/maven-dependency-plugin/pull/178


   


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org