Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-7741

Add more information when using -Dmaven.repo.local.recordReverseTree=true

    XMLWordPrintableJSON

Details

    Description

      I much appreciate adding -Dmaven.repo.local.recordReverseTree=true option to Maven Core (supported by new resolver features).

      After initial idea, I added few more options to https://github.com/grgrzybek/tracking-maven-extension and I'd be happy to see these in org.apache.maven.internal.aether.ReverseTreeRepositoryListener.

      I did some experiments locally and I have improvement ready which:

      tracks information about missing dependencies

      when using non-existing dependency (like org.slf4j:slf4j-apix), I can see ~/.m2/repository/org/slf4j/slf4j-apix/1.7.36/.tracking/grgr_simplest_jar_1.0.miss file with:

      org.slf4j:slf4j-apix:pom:1.7.36
        org.slf4j:slf4j-apix:jar:1.7.36 (compile) (project)
          grgr:simplest:jar:1.0 (project)
      
      Configured repositories:
       - central : https://repo.maven.apache.org/maven2
      
      tracks information about actual repository information (in _remote.repositories we have only the ID)

      For example

      org.apache.maven.plugins:maven-compiler-plugin:pom:3.10.1
        org.apache.maven.plugins:maven-compiler-plugin:3.10.1
          org.apache.maven:maven-core:3.9.1:default-lifecycle-bindings (implicit)
      
      Repository: central (https://repo.maven.apache.org/maven2, default, releases)
      
      tracks information where only POM is downloaded

      For example with ~/.m2/repository/com/google/guava/guava-parent/16.0.1/.tracking/org.apache.maven.plugins_maven-surefire-plugin_jar_3.0.0.dep:

      com.google.guava:guava-parent:pom:16.0.1
        com.google.guava:guava:jar:16.0.1 (compile) (plugin)
          org.sonatype.sisu:sisu-guice:jar:no_aop:3.2.3 (compile) (plugin)
            org.apache.maven:maven-core:jar:3.2.5 (provided) (plugin)
              org.apache.maven.shared:maven-common-artifact-filters:jar:3.1.1 (compile) (plugin)
                org.apache.maven.surefire:maven-surefire-common:jar:3.0.0 (compile) (plugin)
                  org.apache.maven.plugins:maven-surefire-plugin:jar:3.0.0 () (plugin)
      
      Repository: central (https://repo.maven.apache.org/maven2, default, releases)
      
      tracks reverse trees originating from plugins (also implicit ones)
      org.apache:apache:pom:26
        org.apache.maven.plugins:maven-resources-plugin:3.3.0
          org.apache.maven:maven-core:3.9.1:default-lifecycle-bindings (implicit)
      
      Repository: central (https://repo.maven.apache.org/maven2, default, releases)
      

      Attachments

        Issue Links

          Activity

            People

              cstamas Tamas Cservenak
              ggrzybek Grzegorz Grzybek
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: