Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-9786

IllegalArgumentException Tar does not contains /package.json rebuilding metadata for some npm packages

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.11.3, 2.12.0
    • Fix Version/s: 2.12.1
    • Component/s: NPM
    • Labels:
      None
    • Story Points:
      1
    • Sprint:
      Sprint 63 - Föhn

      Description

      I have a pair of npm repository. One of them is a proxy repo to http://registry.npmjs.org
      Other is a hosted repo, that is a mirror of the first. Artifacts from first repo is copying to the second.
      And than I build metadata on second hosted repository I see error, that some artifact Tar does not contains /package.json (see error.txt attach)
      What else, if I unpack a pair of artifact, I can see that they have different structures. ftp-0.3.6.tgz - I can see on hosted repository, ftp-0.3.9.tgz - I couldn't see and have error

      2016-02-12 11:14:06 INFO [ool-1-thread-13] - com.bolyuba.nexus.plugin.npm.hosted.RecreateMetadataWalkerProcessor - Failed to extract or malformed package.json from npmjs:/ftp/-/ftp-0.3.9.tgz

      2016-02-12 11:14:06 INFO  [ool-1-thread-13] - com.bolyuba.nexus.plugin.npm.hosted.RecreateMetadataWalkerProcessor - Failed to extract or malformed package.json from npmjs:/ftp/-/ftp-0.3.7.tgz
      java.lang.IllegalArgumentException: Tar does not contains /package.json?
                  at com.google.common.base.Preconditions.checkArgument(Preconditions.java:148) ~[guava-16.0.1.jar:na]
                  at com.bolyuba.nexus.plugin.npm.hosted.RecreateMetadataWalkerProcessor.extractPackageJson(RecreateMetadataWalkerProcessor.java:189) ~[na:na]
                  at com.bolyuba.nexus.plugin.npm.hosted.RecreateMetadataWalkerProcessor.onCollectionExit(RecreateMetadataWalkerProcessor.java:112) ~[na:na]
                  at org.sonatype.nexus.proxy.walker.DefaultWalker.onCollectionExit(DefaultWalker.java:325) [nexus-core-2.12.0-01.jar:2.12.0-01]
                  at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:226) [nexus-core-2.12.0-01.jar:2.12.0-01]
                  at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:209) [nexus-core-2.12.0-01.jar:2.12.0-01]
                  at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:209) [nexus-core-2.12.0-01.jar:2.12.0-01]
                  at org.sonatype.nexus.proxy.walker.DefaultWalker.walk(DefaultWalker.java:89) [nexus-core-2.12.0-01.jar:2.12.0-01]
                  at com.bolyuba.nexus.plugin.npm.hosted.DefaultNpmHostedRepository.recreateNpmMetadata(DefaultNpmHostedRepository.java:109) [nexus-npm-repository-plugin-2.12.0-01/:na]
                  at com.bolyuba.nexus.plugin.npm.task.NpmHostedMetadataRebuildTask.doExecute(NpmHostedMetadataRebuildTask.java:50) [nexus-npm-repository-plugin-2.12.0-01/:na]
      
      

        Attachments

        1. error.txt
          15 kB
        2. ftp-0.3.6.tgz
          12 kB
        3. ftp-0.3.9.tgz
          14 kB

          Activity

            People

            • Assignee:
              jtom Joe Tom
              Reporter:
              san-chan Alexander Kostromin
              Last Updated By:
              Peter Lynch
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: