sonatype / nexus-ruby-support

26 stars 7 forks source link

Plugin doesn't work with Nexus 2.7.0-04 #47

Closed ivadim closed 10 years ago

ivadim commented 10 years ago

Today I've tried to install plugin to nexus oss(and nexus pro) 2.7.0-04. But without success. Signature of one core method might have been changed.

When I try to added new Hosted rubygem repo I got next error:

jvm 1    | 2013-11-28 20:18:09 ERROR [qtp198808983-33] admin org.sonatype.nexus.rest.NexusApplication - Unhandled exception or error intercepted
jvm 1    | java.lang.NoSuchMethodError: org.sonatype.nexus.proxy.item.PreparedContentLocator.<init>(Ljava/io/InputStream;Ljava/lang/String;)V
jvm 1    |      at org.sonatype.nexus.plugins.ruby.fs.RubyFSLocalRepositoryStorage.storeSpecsIndex(RubyFSLocalRepositoryStorage.java:319) ~[na:na]
jvm 1    |      at org.sonatype.nexus.plugins.ruby.hosted.HostedRubygemsFacade.createEmptySpecs(HostedRubygemsFacade.java:120) ~[na:na]
jvm 1    |      at org.sonatype.nexus.plugins.ruby.hosted.HostedRubygemsFacade.retrieveSpecsIndex(HostedRubygemsFacade.java:142) ~[na:na]
jvm 1    |      at org.sonatype.nexus.plugins.ruby.hosted.DefaultHostedRubyRepository.doConfigure(DefaultHostedRubyRepository.java:70) ~[na:na]
jvm 1    |      at org.sonatype.nexus.configuration.AbstractConfigurable.configure(AbstractConfigurable.java:168) ~[nexus-core-2.7.0-04.jar:2.7.0-04]
jvm 1    |      at org.sonatype.nexus.configuration.application.DefaultNexusConfiguration.instantiateRepository(DefaultNexusConfiguration.java:781) ~[nexus-core-2.7.0-04.jar:2.7.0-04]
jvm 1    |      at org.sonatype.nexus.configuration.application.DefaultNexusConfiguration.instantiateRepository(DefaultNexusConfiguration.java:765) ~[nexus-core-2.7.0-04.jar:2.7.0-04]
jvm 1    |      at org.sonatype.nexus.configuration.application.DefaultNexusConfiguration.createRepository(DefaultNexusConfiguration.java:943) ~[nexus-core-2.7.0-04.jar:2.7.0-04]
jvm 1    |      at org.sonatype.nexus.templates.repository.AbstractRepositoryTemplateProvider.createRepository(AbstractRepositoryTemplateProvider.java:67) ~[nexus-core-2.7.0-04.jar:2.7.0-04]
jvm 1    |      at org.sonatype.nexus.templates.repository.AbstractRepositoryTemplate.create(AbstractRepositoryTemplate.java:101) ~[nexus-core-2.7.0-04.jar:2.7.0-04]
jvm 1    |      at org.sonatype.nexus.rest.repositories.RepositoryListPlexusResource.post(RepositoryListPlexusResource.java:146) ~[na:na]
jvm 1    |      at org.sonatype.plexus.rest.resource.RestletResource.acceptRepresentation(RestletResource.java:271) ~[na:na]
jvm 1    |      at org.sonatype.nexus.rest.NexusRestletResource.acceptRepresentation(NexusRestletResource.java:71) ~[na:na]
jvm 1    |      at org.restlet.resource.Resource.post(Resource.java:688) ~[na:na]
jvm 1    |      at org.restlet.resource.Resource.handlePost(Resource.java:537) ~[na:na]
jvm 1    |      at org.restlet.Finder.handle(Finder.java:357) ~[na:na]
jvm 1    |      at org.restlet.Filter.doHandle(Filter.java:150) ~[na:na]
jvm 1    |      at org.restlet.Filter.handle(Filter.java:195) ~[na:na]

Plugin was built with maven 3.0.4 on Debian 7.1 mvn clean install -Dnexus.version=2.7.0-04 -Dmaven.test.skip

P.s Is there any email-lists about this plugin where question could be posted?

mkristian commented 10 years ago

I am aware that the plugin is not working for 2.7.0 it is on my TODO for next week.

just use the issue for questions for the time being - I see what else is possible.

mkristian commented 10 years ago

to get it compile was a couple of API changes BUT overall there is more thing broken. not sure how much effort this is to fix it.

KAllan357 commented 10 years ago

I am seeing this error when I click on my Proxy Rubygems repository and try to refresh the "Browse Storage" tab. Despite this exception, it still seems to be working. Any thoughts on this error?

https://gist.github.com/KAllan357/7930943

mkristian commented 10 years ago

which code did you use ? the 2_7_branch ?

anyway I just pushed the latest code for that branch. there are still some issues with that version:

there is respective patch for nexus itself which will solve those issues https://github.com/sonatype/nexus-oss/pull/276

another positive vote will help ;)

KAllan357 commented 10 years ago

My issue was on master. Let me try building the 2_7_branch.

mkristian commented 10 years ago

so the nexus-oss branch https://github.com/sonatype/nexus-oss/tree/nexus-2.7.x as well the master branch https://github.com/sonatype/nexus-oss/tree/master will work with the respective nexus-ruby-support branch. so any new nexus release will work with the plugin again.

mkristian commented 10 years ago

added a nexus gem 1.2.1 which works with the current nexus-2.7.x which are already out there. so basically things should be in working state new. bundler API will fallback in the complete index and any next release of nexus will have have working bundler API again !!

Elemag commented 10 years ago

The plugin still doesn't work for me as I am unable to create a rubygem repository. Is there a known workaround?

mkristian commented 10 years ago

hmm. what kind of error do you see ? the 2_7_branch is for nexus-2.7.x

for uploading gems to the hosted gems repo you need the latest nexus gem from rubygems.org

so please provide some more details !

Elemag commented 10 years ago

Actually I compiled it off master and probably that's why it's not working for me. However I ran into multiple compilation issues if I try to compile 2.7_branch for Nexus 2.7.0-06. Is there any documentation describing how to compile working rubygem plugin for 2.7.0-06?

Elemag commented 10 years ago

I managed to build the plugin off 2.7_branch and it seems to work. I had to edit pom.xml to look for 2.7.0-06 version of nexus-plugins instead of the nonexistant 2.8-SNAPSHOT and got almost all built

[INFO] Nexus Ruby Tools .................................. SUCCESS [8.424s] [INFO] Nexus Ruby Support (Aggregator) ................... SUCCESS [0.094s] [INFO] Nexus Ruby Plugin ................................. SUCCESS [18.516s] [INFO] Gem Command to interact with Nexus server ......... SUCCESS [27.710s] [INFO] Nexus Ruby Plugin ITs ............................. FAILURE [1.582s]

I am yet to figure out how to build nexus-ruby-plugin-its

Here is the error message:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (enforce-environment) on project nexus-ruby-support: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]

mkristian commented 10 years ago

the ITs are just integration tests. I will look into the whole build later on. so the last module is of less importants to some extent.

mkristian commented 10 years ago

thanx for hint with the wrong parent version - would not have caused an error on my machine ;)

the last module runs through locally and I pushed all the code online.

On Sat, Dec 28, 2013 at 2:37 PM, christian meier.kristian@gmail.com wrote:

the ITs are just integration tests. I will look into the whole build later on. so the last module is of less importants to some extent.

  • christian