Uploaded image for project: 'Maven Indexer'
  1. Maven Indexer
  2. MINDEXER-171

Support SHA256 and SHA512 HashType

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 7.0.0
    • None

    Description

      The M2GavCalculator only supports .sha1 and .md5 checksum files. Running it on a repository that has a .sha256 or .sha512 causes an unexpected exception to be thrown.

      java.io.IOException: Error scanning context reposilite_releases_index: java.lang.IndexOutOfBoundsException: start 55, end 63, length 59
              at org.apache.maven.index.DefaultNexusIndexer.scan(DefaultNexusIndexer.java:300)
              at org.apache.maven.index.DefaultNexusIndexer.scan(DefaultNexusIndexer.java:245)
              at org.apache.maven.index.cli.NexusIndexerCli.index(NexusIndexerCli.java:363)
              at org.apache.maven.index.cli.NexusIndexerCli.invokePlexusComponent(NexusIndexerCli.java:271)
              at org.codehaus.plexus.tools.cli.AbstractCli.execute(AbstractCli.java:179)
              at org.apache.maven.index.cli.NexusIndexerCli.execute(NexusIndexerCli.java:124)
              at org.codehaus.plexus.tools.cli.AbstractCli.execute(AbstractCli.java:83)
              at org.apache.maven.index.cli.NexusIndexerCli.execute(NexusIndexerCli.java:137)
              at org.apache.maven.index.cli.NexusIndexerCli.main(NexusIndexerCli.java:116)
      Caused by: java.lang.IndexOutOfBoundsException: start 82, end 90, length 84
              at java.base/java.lang.AbstractStringBuilder.checkRange(AbstractStringBuilder.java:1802)
              at java.base/java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:680)
              at java.base/java.lang.StringBuilder.append(StringBuilder.java:218)
              at org.apache.maven.index.artifact.M2GavCalculator.getSnapshotGav(M2GavCalculator.java:189)
              at org.apache.maven.index.artifact.M2GavCalculator.pathToGav(M2GavCalculator.java:105)
              at org.apache.maven.index.DefaultArtifactContextProducer.getGavFromPath(DefaultArtifactContextProducer.java:161)
              at org.apache.maven.index.DefaultArtifactContextProducer.getArtifactContext(DefaultArtifactContextProducer.java:83)
              at org.apache.maven.index.DefaultScanner.processFile(DefaultScanner.java:109)
              at org.apache.maven.index.DefaultScanner.scanDirectory(DefaultScanner.java:99)
              at org.apache.maven.index.DefaultScanner.scanDirectory(DefaultScanner.java:91)
              at org.apache.maven.index.DefaultScanner.scanDirectory(DefaultScanner.java:91)
              at org.apache.maven.index.DefaultScanner.scanDirectory(DefaultScanner.java:91)
              at org.apache.maven.index.DefaultScanner.scanDirectory(DefaultScanner.java:91)
              at org.apache.maven.index.DefaultScanner.scanDirectory(DefaultScanner.java:91)
              at org.apache.maven.index.DefaultScanner.scanDirectory(DefaultScanner.java:91)
              at org.apache.maven.index.DefaultScanner.scanDirectory(DefaultScanner.java:91)
              at org.apache.maven.index.DefaultScanner.scanDirectory(DefaultScanner.java:91)
              at org.apache.maven.index.DefaultScanner.scan(DefaultScanner.java:60)
              at org.apache.maven.index.DefaultNexusIndexer.scan(DefaultNexusIndexer.java:291)
              ... 8 more 

       

      The file that causes the crash is named:

      /com/example/artifact/1.0-SNAPSHOT/maven-metadata.xml.sha512

      Attachments

        Issue Links

          Activity

            People

              cstamas Tamas Cservenak
              that-apex Grzegorz Smardzewski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: