logstash-plugins / logstash-input-log4j

Apache License 2.0
14 stars 18 forks source link

problems bootstrapping in a linux environment #5

Closed purbon closed 9 years ago

purbon commented 9 years ago

Hi, there might be an issue while fetching the dependencies for this plugin and a linux environment. Actually in jenkins the test build is failing with this error:

Using rspec-mocks 2.14.6
Using rspec 2.14.1
Using logstash-devutils 0.0.10
[ERROR] Failed to execute goal on project logstash-input-log4j: Could not resolve dependencies for project rubygems:logstash-input-log4j:gem:0.1.3: Failed to collect dependencies at rubygems:logstash-core:gem:[1.4.0,2.0.0): No versions available for rubygems:logstash-core:gem:[1.4.0,2.0.0) within specified range -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Errno::ENOENT: No such file or directory - /home/jenkins/workspace/logstash_input_log4j_commit/logstash-input-log4j/deps.lst
An error occurred while installing logstash-input-log4j (0.1.3), and Bundler
cannot continue.
Make sure that `gem install logstash-input-log4j -v '0.1.3'` succeeds before
bundling.
F

Failures:

  1) inputs/log4j should register
     Failure/Error: input = LogStash::Plugin.lookup("input", "log4j").new("mode" => "client")
     LogStash::PluginLoadingError:
       Couldn't find any input plugin named 'log4j'. Are you sure this is correct? Trying to load the log4j input plugin resulted in this error: no such file to load -- logstash-input-log4j_jars
     # ./spec/inputs/log4j_spec.rb:8:in `(root)'

Finished in 0.074 seconds
1 example, 1 failure
wiibaa commented 9 years ago

same error on my windows env

wiibaa commented 9 years ago

I got the same error trying to bundle install a fresh clone of logstash-output-elasticsearch So it seems that any logstash plugin with direct jar dependencies are experiencing issue, kafka is a different topic because the jar are not required directly but are part of jruby-kafka gem... Very puzzling

wiibaa commented 9 years ago

I got on step further, having a successfull bundle install by using specific logstash-core gem version in the gemspec

s.add_runtime_dependency "logstash-core", '1.5.0.rc2'

I strongly suspect that ruby-maven is having a hard time because logstash-core gem versioning does not follow maven convention for qualifier So for him, none of the available version in rubygem are following the rule [1.4.0,2.0.0), thus failing

This should be fixed with 1.5.0 release hopefully or if you do an rc3, please try naming it with a dash 1.5.0-rc3 as

All versions with a qualifier are older than the same version without a qualifier (release version).

purbon commented 9 years ago

@wiibaa Interesting issue, I guess we aim to make both happy at the end, but now sure which is the best way to archive it.

I took a look at the way rubygems seems to expect versions (http://guides.rubygems.org/specification-reference/#version) and looks like he expect the nottion we're using in here. But I agree, according to http://semver.org/ the right notation is the one you propose.

purbon commented 9 years ago

@wiibaa speaking about the bootstrapping problem, If I'm not mistaken this got fix throw https://github.com/elastic/logstash/pull/2596, do you mind closing we close this issue and move your version naming issue to the main logstash repo?

wiibaa commented 9 years ago

@purbon sure please do!

purbon commented 9 years ago

ok! moving the naming issue to the main logstash repo and closing this as I think is already solved. If not, we can reopen this issue.