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

parsing dates in some gemspec files could fail with IllegalArgumentException: Invalid format

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.4.0
    • Component/s: RubyGems
    • Labels:
    • Story Points:
      1
    • Release Note:
      Yes
    • Sprint:
      Sprint 91

      Description

      Nexus 3.2 is not able to serve the gem `barcode v2.0` via a rubygems proxy repo. It looks like it is having issue parsing a date.

      gem install barcode -v 0.2
      ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
      bad response Server Error 500 (http://localhost:8083/nexus/repository/rubygems-all/gems/barcode-0.2.gem)
      
      2017-02-10 13:21:37,231+0000 WARN [qtp40668963-374] *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Service failure
      java.lang.IllegalArgumentException: Invalid format: "2005-07-13" is too short
      at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:899) [na:na]
      at org.joda.time.DateTime.parse(DateTime.java:160) [na:na]
      at org.sonatype.nexus.repository.rubygems.marshal.RubyTime.from(RubyTime.java:121) [na:na]
      

      actual barcode-0.2 gemspec:

      ########################### 
      --- !ruby/object:Gem::Specification 
      rubygems_version: 0.8.10 
      specification_version: 1 
      name: barcode 
      version: !ruby/object:Gem::Version 
      version: "0.2" 
      date: 2005-07-13 
      summary: Barcode classes. 
      require_paths: 
      - lib 
      email: crnixon@gmail.com 
      homepage: 
      rubyforge_project: 
      description: Simple classes for creating barcodes. 
      autorequire: 
      default_executable: 
      bindir: bin 
      has_rdoc: true 
      required_ruby_version: !ruby/object:Gem::Version::Requirement 
      requirements: 
      - 
      - ">" 
      - !ruby/object:Gem::Version 
      version: 0.0.0 
      version: 
      platform: ruby 
      authors: 
      - Clinton R. Nixon 
      files: 
      - lib/barcode/code39.rb 
      test_files: [] 
      rdoc_options: [] 
      extra_rdoc_files: [] 
      executables: [] 
      extensions: [] 
      requirements: [] 
      dependencies: [] 
      #################### 
      

      This same request works in Nexus 2.14.2.

      gem install barcode -v 0.2
      Fetching: barcode-0.2.gem (100%)
      Successfully installed barcode-0.2
      Parsing documentation for barcode-0.2
      Installing ri documentation for barcode-0.2
      Done installing documentation for barcode after 0 seconds
      1 gem installed
      

        Attachments

          Activity

            People

            Assignee:
            jstephens Joseph Stephens
            Reporter:
            browngeek Robert Brown
            Last Updated By:
            Peter Lynch
            Team:
            Nexus - Formats
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title