mkristian / ruby-maven

repo moved to
https://github.com/takari/ruby-maven
MIT License
28 stars 7 forks source link

POM generation issues #8

Closed cheald closed 8 years ago

cheald commented 8 years ago

Howdy! I've been using jar-deps and ruby-maven for Manticore for a while, and it's suddenly started breaking:

(This might be a jar-deps issue, I'm not sure yet)

chris@Luna ~/projects/manticore (master*) $ rvm use @manticore --create
jruby-1.7.23 - #gemset created /home/chris/.rvm/gems/jruby-1.7.23@manticore
jruby-1.7.23 - #generating manticore wrappers - please wait
Using /home/chris/.rvm/gems/jruby-1.7.23 with gemset manticore
chris@Luna ~/projects/scratch $ git clone git@github.com:cheald/manticore.git
Cloning into 'manticore'...
remote: Counting objects: 1337, done.
remote: Total 1337 (delta 0), reused 0 (delta 0), pack-reused 1337
Receiving objects: 100% (1337/1337), 3.17 MiB | 1.25 MiB/s, done.
Resolving deltas: 100% (811/811), done.
chris@Luna ~/projects/scratch $ cd manticore
chris@Luna ~/projects/scratch/manticore (master) $ gem install bundler && bundle
Fetching: bundler-1.11.2.gem (100%)
Successfully installed bundler-1.11.2
1 gem installed
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 11.1.1
Installing blankslate 3.1.3
Using bundler 1.11.2
Installing diff-lcs 1.2.5
Installing gserver 0.0.1
Installing httpclient 2.7.1
Installing jar-dependencies 0.3.2
Installing rack 1.6.4
Installing rspec-support 3.4.1
Installing ruby-maven-libs 3.3.3
Installing rake-compiler 0.9.7
Installing parslet 1.7.1
Using manticore 0.5.5 from source at `.`
  jar dependencies for manticore-0.5.5-java.gemspec . . .
Installing gem 'ruby-maven' . . .

using maven for the first time results in maven
downloading all its default plugin and can take time.
as those plugins get cached on disk and further execution
of maven is much faster then the first time.

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM /home/chris/.rvm/rubies/jruby-1.7.23/lib/ruby/shared/jars/gemspec_pom.rb: only whitespace content allowed before start tag and not # (position: START_DOCUMENT seen #... @1:1)  @ line 1, column 1
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project  (/home/chris/.rvm/rubies/jruby-1.7.23/lib/ruby/shared/jars/gemspec_pom.rb) has 1 error
[ERROR]     Non-parseable POM /home/chris/.rvm/rubies/jruby-1.7.23/lib/ruby/shared/jars/gemspec_pom.rb: only whitespace content allowed before start tag and not # (position: START_DOCUMENT seen #... @1:1)  @ line 1, column 1 -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException

Errno::ENOENT: No such file or directory - /home/chris/projects/scratch/manticore/deps.lst

I'm still digging into the root cause here, but it used to work and doesn't now, so I'm reporting it in case other people are having similar issues (I'm having users report these issues, see https://github.com/cheald/manticore/issues/46)

cheald commented 8 years ago

The issue appears to be that extensions.xml isn't being loaded and thus the polyglot extensions aren't loaded and the POM can't be read.

I fixed it by copying the ruby-maven/.mvn/extensions.xml to ~/.mvn/extensions.xml, but that's clearly not a solution for the general user. How do we fix this in the common case?

cheald commented 8 years ago

Just realized this project was moved. Moving the issue.

mkristian commented 8 years ago

@cheald jruby-9.0.5.0 is broken as it can not use the right ruby-maven: https://github.com/jruby/jruby/issues/3676

cheald commented 8 years ago

This issue was occurring on JRuby-1.7 and 9.0.4.0, FWIW. After blowing away my ~/.m2 and reinstalling JRuby I was unable to replicate the issue. However, it's clear that the issue was that the Polyglot extensions were not being loaded properly. I'm moving Manticore to vendored jars to bypass the whole POM issue for the time being.