Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-parseable POM #81

Open
cburgmer opened this issue Dec 13, 2016 · 20 comments
Open

Non-parseable POM #81

cburgmer opened this issue Dec 13, 2016 · 20 comments

Comments

@cburgmer
Copy link
Contributor

Running jbundle install with gem 'jbundler', '0.9.3' installed with the Jarfile

repository "http://company_proxy/artifactory/libs-release"
jar 'org.yaml:snakeyaml', '1.14'

yields the following output:

...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM C:\tmp\tools\jruby\lib\ruby\gems\shared\gems\jbundler-0.9.3\lib\jbundler\dependency_pom.rb: only whitespace content allowed before start tag and not b (position: START_DOCUMENT seen b... @1:1)  @ line 1, column 1
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project  (C:\tmp\tools\jruby\lib\ruby\gems\shared\gems\jbundler-0.9.3\lib\jbundler\dependency_pom.rb) has 1 error
[ERROR]     Non-parseable POM C:\tmp\tools\jruby\lib\ruby\gems\shared\gems\jbundler-0.9.3\lib\jbundler\dependency_pom.rb: only whitespace content allowed before start tag and not b (position: START_DOCUMENT seen b... @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 - C:/tmp/pkg/dependencies.txt
                  read at org/jruby/RubyIO.java:3594
  install_dependencies at C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.9.3/lib/jbundler/lock_down.rb:113
             lock_down at C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.9.3/lib/jbundler/lock_down.rb:54
               install at C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.9.3/lib/jbundler/cli.rb:80
 
                   run at C:/tmp/jruby/lib/ruby/gems/shared/gems/bundler-1.13.5/lib/bundler/vendor/thor/lib/thor/command.rb:27
        invoke_command at C:/tmp/jruby/lib/ruby/gems/shared/gems/bundler-1.13.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126
              dispatch at C:/tmp/jruby/lib/ruby/gems/shared/gems/bundler-1.13.5/lib/bundler/vendor/thor/lib/thor.rb:359
                 start at C:/tmp/jruby/lib/ruby/gems/shared/gems/bundler-1.13.5/lib/bundler/vendor/thor/lib/thor/base.rb:440
                 <top> at C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.9.3/bin/jbundle:47
                  load at org/jruby/RubyKernel.java:962
                 <top> at C:\tmp\tools\jruby\bin\jbundle:1

Rolling back to gem 'jbundler', '0.5.4' works.

Context:

$ jruby --version
jruby 9.1.2.0 (2.3.0) 2016-05-26 7357c8f Java HotSpot(TM) 64-Bit Server VM 25.51-b03 on 1.8.0_51-b16 [mswin32-x86_64]

Here's the full debug output:

$ bundle exec jbundle install --debug 
...
mvn dependency:list -f C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.9.3/lib/jbundler/dependency_pom.rb -Dverbose=true -X -DexcludeTransitive=false -Djbundler.outputFile=C:/tmp/pkg/dependencies.txt -Djbundler.basedir=C:/tmp -Djbundler.jarfile=C:/tmp/Jarfile -Djbundler.gemfile=C:/tmp/Gemfile -Djbundler.workdir=C:/tmp/pkg -Djbundler.groups -Djbundler.bootstrap -Dmaven.repo.local=C:\Users\cburgmer/.m2/repository -Djbundler.jars.0=com.fasterxml.jackson.core:jackson-core:jar:2.7.3 -Djbundler.jars.1=com.fasterxml.jackson.core:jackson-annotations:jar:2.7.3 -Djbundler.jars.2=com.fasterxml.jackson.core:jackson-databind:jar:2.7.3 -Djbundler.jars.3=com.fasterxml.jackson.module:jackson-module-afterburner:jar:2.7.3 -Djbundler.jars.4=org.bouncycastle:bcpkix-jdk15on:jar:1.54 -Djbundler.jars.5=org.bouncycastle:bcprov-jdk15on:jar:1.54 -Djbundler.jars.size=6
mvn dependency:list -f C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.9.3/lib/jbundler/dependency_pom.rb -Dverbose=true -X -DexcludeTransitive=false -Djbundler.outputFile=C:/tmp/pkg/dependencies.txt -Djbundler.basedir=C:/tmp -Djbundler.jarfile=C:/tmp/Jarfile -Djbundler.gemfile=C:/tmp/Gemfile -Djbundler.workdir=C:/tmp/pkg -Djbundler.groups -Djbundler.bootstrap -Dmaven.repo.local=C:\Users\cburgmer/.m2/repository -Djbundler.jars.0=com.fasterxml.jackson.core:jackson-core:jar:2.7.3 -Djbundler.jars.1=com.fasterxml.jackson.core:jackson-annotations:jar:2.7.3 -Djbundler.jars.2=com.fasterxml.jackson.core:jackson-databind:jar:2.7.3 -Djbundler.jars.3=com.fasterxml.jackson.module:jackson-module-afterburner:jar:2.7.3 -Djbundler.jars.4=org.bouncycastle:bcpkix-jdk15on:jar:1.54 -Djbundler.jars.5=org.bouncycastle:bcprov-jdk15on:jar:1.54 -Djbundler.jars.size=6
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
Maven home: C:\tmp\jruby\lib\ruby\gems\shared\gems\ruby-maven-libs-3.3.9\maven-home
Java version: 1.8.0_51, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_51\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
[DEBUG] Reading global settings from C:\tmp\jruby\lib\ruby\gems\shared\gems\ruby-maven-libs-3.3.9\maven-home\conf\settings.xml
[DEBUG] Reading user settings from C:\Users\cburgmer\.m2\settings.xml
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\Users\cburgmer\.m2\repository
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.apache.org/maven2
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2
Downloading: https://repo.maven.apache.org/maven2/org/torquebox/mojo/mavengem-wagon/0.2.1/mavengem-wagon-0.2.1.pom
[DEBUG] Writing tracking file C:\Users\cburgmer\.m2\repository\org\torquebox\mojo\mavengem-wagon\0.2.1\mavengem-wagon-0.2.1.pom.lastUpdated
[WARNING] Failed to read extensions descriptor C:\tmp\.mvn\extensions.xml: Plugin org.torquebox.mojo:mavengem-wagon:0.2.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.torquebox.mojo:mavengem-wagon:jar:0.2.1
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG]   Imported: javax.enterprise.inject.* < plexus.core
[DEBUG]   Imported: javax.enterprise.util.* < plexus.core
[DEBUG]   Imported: javax.inject.* < plexus.core
[DEBUG]   Imported: org.apache.maven.* < plexus.core
[DEBUG]   Imported: org.apache.maven.artifact < plexus.core
[DEBUG]   Imported: org.apache.maven.classrealm < plexus.core
[DEBUG]   Imported: org.apache.maven.cli < plexus.core
[DEBUG]   Imported: org.apache.maven.configuration < plexus.core
[DEBUG]   Imported: org.apache.maven.exception < plexus.core
[DEBUG]   Imported: org.apache.maven.execution < plexus.core
[DEBUG]   Imported: org.apache.maven.execution.scope < plexus.core
[DEBUG]   Imported: org.apache.maven.lifecycle < plexus.core
[DEBUG]   Imported: org.apache.maven.model < plexus.core
[DEBUG]   Imported: org.apache.maven.monitor < plexus.core
[DEBUG]   Imported: org.apache.maven.plugin < plexus.core
[DEBUG]   Imported: org.apache.maven.profiles < plexus.core
[DEBUG]   Imported: org.apache.maven.project < plexus.core
[DEBUG]   Imported: org.apache.maven.reporting < plexus.core
[DEBUG]   Imported: org.apache.maven.repository < plexus.core
[DEBUG]   Imported: org.apache.maven.rtinfo < plexus.core
[DEBUG]   Imported: org.apache.maven.settings < plexus.core
[DEBUG]   Imported: org.apache.maven.toolchain < plexus.core
[DEBUG]   Imported: org.apache.maven.usability < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.* < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.authentication < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.authorization < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.events < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.observers < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.proxy < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.repository < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.resource < plexus.core
[DEBUG]   Imported: org.codehaus.classworlds < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.* < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.classworlds < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.component < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.configuration < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.container < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.context < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.lifecycle < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.logging < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.personality < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core
[DEBUG]   Imported: org.eclipse.aether.* < plexus.core
[DEBUG]   Imported: org.eclipse.aether.artifact < plexus.core
[DEBUG]   Imported: org.eclipse.aether.collection < plexus.core
[DEBUG]   Imported: org.eclipse.aether.deployment < plexus.core
[DEBUG]   Imported: org.eclipse.aether.graph < plexus.core
[DEBUG]   Imported: org.eclipse.aether.impl < plexus.core
[DEBUG]   Imported: org.eclipse.aether.installation < plexus.core
[DEBUG]   Imported: org.eclipse.aether.internal.impl < plexus.core
[DEBUG]   Imported: org.eclipse.aether.metadata < plexus.core
[DEBUG]   Imported: org.eclipse.aether.repository < plexus.core
[DEBUG]   Imported: org.eclipse.aether.resolution < plexus.core
[DEBUG]   Imported: org.eclipse.aether.spi < plexus.core
[DEBUG]   Imported: org.eclipse.aether.transfer < plexus.core
[DEBUG]   Imported: org.eclipse.aether.version < plexus.core
[DEBUG]   Imported: org.slf4j.* < plexus.core
[DEBUG]   Imported: org.slf4j.helpers.* < plexus.core
[DEBUG]   Imported: org.slf4j.spi.* < plexus.core
[DEBUG] Populating class realm maven.api
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from C:\tmp\jruby\lib\ruby\gems\shared\gems\ruby-maven-libs-3.3.9\maven-home\conf\settings.xml
[DEBUG] Reading user settings from C:\Users\cburgmer\.m2\settings.xml
[DEBUG] Reading global toolchains from C:\tmp\jruby\lib\ruby\gems\shared\gems\ruby-maven-libs-3.3.9\maven-home\conf\toolchains.xml
[DEBUG] Reading user toolchains from C:\Users\cburgmer\.m2\toolchains.xml
[DEBUG] Using local repository at C:\Users\cburgmer\.m2\repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\Users\cburgmer\.m2\repository
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM C:\tmp\jruby\lib\ruby\gems\shared\gems\jbundler-0.9.3\lib\jbundler\dependency_pom.rb: only whitespace content allowed before start tag and not b (position: START_DOCUMENT seen b... @1:1)  @ line 1, column 1
@
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM C:\tmp\jruby\lib\ruby\gems\shared\gems\jbundler-0.9.3\lib\jbundler\dependency_pom.rb: only whitespace content allowed before start tag and not b (position: START_DOCUMENT seen b... @1:1)  @ line 1, column 1
 
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:422)
        at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
        at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
        at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
        at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR]
[ERROR]   The project  (C:\tmp\jruby\lib\ruby\gems\shared\gems\jbundler-0.9.3\lib\jbundler\dependency_pom.rb) has 1 error
[ERROR]     Non-parseable POM C:\tmp\jruby\lib\ruby\gems\shared\gems\jbundler-0.9.3\lib\jbundler\dependency_pom.rb: only whitespace content allowed before start tag and not b (position: START_DOCUMENT seen b... @1:1)  @ line 1, column 1 -> [Help 2]
org.apache.maven.model.io.ModelParseException: only whitespace content allowed before start tag and not b (position: START_DOCUMENT seen b... @1:1)
        at org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.java:122)
        at org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.java:86)
        at org.apache.maven.model.building.DefaultModelProcessor.read(DefaultModelProcessor.java:81)
        at org.apache.maven.model.building.DefaultModelBuilder.readModel(DefaultModelBuilder.java:533)
        at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:273)
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:469)
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:438)
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:401)
        at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
        at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
        at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
        at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: only whitespace content allowed before start tag and not b (position: START_DOCUMENT seen b... @1:1)
        at org.codehaus.plexus.util.xml.pull.MXParser.parseProlog(MXParser.java:1557)
        at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1436)
        at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1131)
        at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.read(MavenXpp3ReaderEx.java:4392)
        at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.read(MavenXpp3ReaderEx.java:598)
        at org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.java:113)
        ... 25 more
[ERROR]
[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 - C:/tmp/pkg/dependencies.txt
                  read at org/jruby/RubyIO.java:3594
  install_dependencies at C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.9.3/lib/jbundler/lock_down.rb:113
             lock_down at C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.9.3/lib/jbundler/lock_down.rb:54
               install at C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.9.3/lib/jbundler/cli.rb:80
 
                   run at C:/tmp/jruby/lib/ruby/gems/shared/gems/bundler-1.13.5/lib/bundler/vendor/thor/lib/thor/command.rb:27
        invoke_command at C:/tmp/jruby/lib/ruby/gems/shared/gems/bundler-1.13.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126
              dispatch at C:/tmp/jruby/lib/ruby/gems/shared/gems/bundler-1.13.5/lib/bundler/vendor/thor/lib/thor.rb:359
                 start at C:/tmp/jruby/lib/ruby/gems/shared/gems/bundler-1.13.5/lib/bundler/vendor/thor/lib/thor/base.rb:440
                 <top> at C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.9.3/bin/jbundle:47
                  load at org/jruby/RubyKernel.java:962
                 <top> at C:\tmp\jruby\bin\jbundle:1
 

Btw, 0.5.4 seems to be the latest version that works for us, here's a summary of went wrong for the latest minor versions in between:

gem 'jbundler', '0.7.4'

...
RuntimeError: can't modify frozen String
                             sub! at org/jruby/RubyString.java:2370
                  block in _setup at C:/tmp/jruby/lib/ruby/gems/shared/gems/maven-tools-1.0.13/lib/maven/tools/gemspec_dependencies.rb:60
                             each at org/jruby/RubyArray.java:1593
                           _setup at C:/tmp/jruby/lib/ruby/gems/shared/gems/maven-tools-1.0.13/lib/maven/tools/gemspec_dependencies.rb:59
                       initialize at C:/tmp/jruby/lib/ruby/gems/shared/gems/maven-tools-1.0.13/lib/maven/tools/gemspec_dependencies.rb:14
  block in attach_jar_coordinates at C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.7.4/lib/jbundler/lock_down.rb:150
                             each at org/jruby/RubyHash.java:1448
           attach_jar_coordinates at C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.7.4/lib/jbundler/lock_down.rb:148
                       exec_maven at C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.7.4/lib/jbundler/lock_down.rb:136
             install_dependencies at C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.7.4/lib/jbundler/lock_down.rb:110
                        lock_down at C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.7.4/lib/jbundler/lock_down.rb:54
                          install at C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.7.4/lib/jbundler/cli.rb:95
                              run at C:/tmp/jruby/lib/ruby/gems/shared/gems/bundler-1.13.5/lib/bundler/vendor/thor/lib/thor/command.rb:27
                   invoke_command at C:/tmp/jruby/lib/ruby/gems/shared/gems/bundler-1.13.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126
                         dispatch at C:/tmp/jruby/lib/ruby/gems/shared/gems/bundler-1.13.5/lib/bundler/vendor/thor/lib/thor.rb:359
                            start at C:/tmp/jruby/lib/ruby/gems/shared/gems/bundler-1.13.5/lib/bundler/vendor/thor/lib/thor/base.rb:440
                            <top> at C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.7.4/bin/jbundle:67
                             load at org/jruby/RubyKernel.java:962
                            <top> at C:\tmp\tools\jruby\bin\jbundle:1

gem 'jbundler', '0.6.4'

NameError: uninitialized constant JBundler::Thor
      const_missing at org/jruby/RubyModule.java:3309
  <module:JBundler> at C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.6.4/lib/jbundler/cli.rb:28
              <top> at C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.6.4/lib/jbundler/cli.rb:27
            require at org/jruby/RubyKernel.java:944
             (root) at C:/tmp/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
              <top> at C:/tmp/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55
               load at org/jruby/RubyKernel.java:962
              <top> at C:/tmp/jruby/lib/ruby/gems/shared/gems/jbundler-0.6.4/bin/jbundle:56
@cburgmer
Copy link
Contributor Author

If I can make an un-educated guess, maven directly feeds on lib\jbundler\dependency_pom.rb and chokes on that.

@mkristian
Copy link
Owner

well the maven fails to install the extension which allows those ruby files as pom ;)

in the output there is these lines:

[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2
Downloading: https://repo.maven.apache.org/maven2/org/torquebox/mojo/mavengem-wagon/0.2.1/mavengem-wagon-0.2.1.pom
[DEBUG] Writing tracking file C:\Users\cburgmer\.m2\repository\org\torquebox\mojo\mavengem-wagon\0.2.1\mavengem-wagon-0.2.1.pom.lastUpdated
[WARNING] Failed to read extensions descriptor C:\tmp\.mvn\extensions.xml: Plugin org.torquebox.mojo:mavengem-wagon:0.2.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.torquebox.mojo:mavengem-wagon:jar:0.2.1

this file itself should have some info what went wrong with downloading the mavengem-wagon-0.2.1.pom

C:\Users\cburgmer\.m2\repository\org\torquebox\mojo\mavengem-wagon\0.2.1\mavengem-wagon-0.2.1.pom.lastUpdated

does it gives you some hints ?

@cburgmer
Copy link
Contributor Author

Sorry for the late reply.

Yes it does:

#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
#Mon Dec 19 10:00:05 CST 2016
@default-central-https\://repo.maven.apache.org/maven2/.lastUpdated=1482112805611
https\://repo.maven.apache.org/maven2/.error=Could not transfer artifact org.torquebox.mojo\:mavengem-wagon\:pom\:0.2.1 from/to central (https\://repo.maven.apache.org/maven2)\: repo.maven.apache.org

Am I guessing correctly that the installer tries to source mavengem-wagon directly from maven rather than from my source specified in the Jarfile? I am sitting behind a corporate firewall, so such a request will never work for me.

@cburgmer
Copy link
Contributor Author

Btw, should I be using jar-dependencies instead? I'm a bit lost at what the differences are, which one is the way forward.

@mkristian
Copy link
Owner

@cburgmer jar-dependencies is the way forward unless you use warbler (or any other) which needs jbundler. jar-dependencies comes with jruby and jbundler uses jar-dependencies under the hood.

mavengem-wagon is only the first of three such files which are needed to add the ruby extension to maven.

there is corporate maven repo, I think the only way to go is to add a settings.xml file in your project pointing to that repo within an active profile. the source in Jarfile is too late as it needs the ruby maven extension already in place.

@cburgmer
Copy link
Contributor Author

Indeed a settings.xml in the project directory works. This works for me:

<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <profiles>
        <profile>
            <repositories>
                <repository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>central</id>
                    <name>libs-release</name>
                    <url>http://my.intra.net/repository/libs-release</url>
                </repository>
                <repository>
                    <snapshots />
                    <id>snapshots</id>
                    <name>libs-snapshot</name>
                    <url>http://my.intra.net/repository/libs-snapshot</url>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>central</id>
                    <name>plugins-release</name>
                    <url>http://my.intra.net/repository/plugins-release</url>
                </pluginRepository>
                <pluginRepository>
                    <snapshots />
                    <id>snapshots</id>
                    <name>plugins-snapshot</name>
                    <url>http://my.intra.net/repository/plugins-snapshot</url>
                </pluginRepository>
            </pluginRepositories>
            <id>myprofile</id>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>myprofile</activeProfile>
    </activeProfiles>
</settings>

I'm assuming this will also affect jar-dependencies. Can we document this behaviour somewhat, or make it easier to discover?

@mkristian
Copy link
Owner

yes, jar-dependencies will be the same. yes, need to add it - honestly I was not aware until your issue even though I use local proxy/mirror for maven.

@cburgmer
Copy link
Contributor Author

cburgmer commented Dec 20, 2016 via email

@karthik-krishnan
Copy link

Am still having issue with the latest 0.9.3 version of the gem with the same Non-parseable POM Exception. Any suggestions please?

@mkristian
Copy link
Owner

@karthik-krishnan sorry for the delayed answer. the original issue was that not all artifacts used by maven are downloaded and then maven can not parse the pom.rb. post the output of bundle exec jbundle install --debug and I might help you.

@alisnic
Copy link

alisnic commented Dec 15, 2017

@karthik-krishnan possibly related elastic/logstash#5325 (comment)

@TonyGan329
Copy link

I have a quite similar issue 'Non-parseable POM' with the latest Jbundler 0.9.3 version when running a project.

Here is the output of bundle exec jbundle install --debug

mvn dependency:list -f C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/jbundler-0.9.3/lib/jbundler/dependency_pom.rb -Dverbose=true -X -DexcludeTransitive=true -Djbundler.outputFile=C:/Users/tony.gan/Downloads/tabula-master/tabula-master/pkg/dependencies.txt -Djbundler.basedir=C:/Users/tony.gan/Downloads/tabula-master/tabula-master -Djbundler.jarfile=C:/Users/tony.gan/Downloads/tabula-master/tabula-master/Jarfile -Djbundler.gemfile=C:/Users/tony.gan/Downloads/tabula-master/tabula-master/Gemfile -Djbundler.workdir=C:/Users/tony.gan/Downloads/tabula-master/tabula-master/pkg -Djbundler.groups -Djbundler.bootstrap -Dmaven.repo.local=C:\Users\tony.gan/.m2/repository
mvn dependency:list -f C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/jbundler-0.9.3/lib/jbundler/dependency_pom.rb -Dverbose=true -X -DexcludeTransitive=true -Djbundler.outputFile=C:/Users/tony.gan/Downloads/tabula-master/tabula-master/pkg/dependencies.txt -Djbundler.basedir=C:/Users/tony.gan/Downloads/tabula-master/tabula-master -Djbundler.jarfile=C:/Users/tony.gan/Downloads/tabula-master/tabula-master/Jarfile -Djbundler.gemfile=C:/Users/tony.gan/Downloads/tabula-master/tabula-master/Gemfile -Djbundler.workdir=C:/Users/tony.gan/Downloads/tabula-master/tabula-master/pkg -Djbundler.groups -Djbundler.bootstrap -Dmaven.repo.local=C:\Users\tony.gan/.m2/repository
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
Maven home: C:\jruby-9.1.15.0\lib\ruby\gems\shared\gems\ruby-maven-libs-3.3.9\maven-home
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: c:\program files\java\jre1.8.0_171
Default locale: en_US, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"
[DEBUG] Reading global settings from C:\jruby-9.1.15.0\lib\ruby\gems\shared\gems\ruby-maven-libs-3.3.9\maven-home\conf\settings.xml
[DEBUG] Reading user settings from C:\Users\tony.gan\.m2\settings.xml
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\Users\tony.gan\.m2\repository
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.apache.org/maven2
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2
Downloading: https://repo.maven.apache.org/maven2/org/torquebox/mojo/mavengem-wagon/0.2.1/mavengem-wagon-0.2.1.pom
[DEBUG] Writing tracking file C:\Users\tony.gan\.m2\repository\org\torquebox\mojo\mavengem-wagon\0.2.1\mavengem-wagon-0.2.1.pom.lastUpdated
[WARNING] Failed to read extensions descriptor C:\Users\tony.gan\Downloads\tabula-master\tabula-master\.mvn\extensions.xml: Plugin org.torquebox.mojo:mavengem-wagon:0.2.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.torquebox.mojo:mavengem-wagon:jar:0.2.1
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG]   Imported: javax.enterprise.inject.* < plexus.core
[DEBUG]   Imported: javax.enterprise.util.* < plexus.core
[DEBUG]   Imported: javax.inject.* < plexus.core
[DEBUG]   Imported: org.apache.maven.* < plexus.core
[DEBUG]   Imported: org.apache.maven.artifact < plexus.core
[DEBUG]   Imported: org.apache.maven.classrealm < plexus.core
[DEBUG]   Imported: org.apache.maven.cli < plexus.core
[DEBUG]   Imported: org.apache.maven.configuration < plexus.core
[DEBUG]   Imported: org.apache.maven.exception < plexus.core
[DEBUG]   Imported: org.apache.maven.execution < plexus.core
[DEBUG]   Imported: org.apache.maven.execution.scope < plexus.core
[DEBUG]   Imported: org.apache.maven.lifecycle < plexus.core
[DEBUG]   Imported: org.apache.maven.model < plexus.core
[DEBUG]   Imported: org.apache.maven.monitor < plexus.core
[DEBUG]   Imported: org.apache.maven.plugin < plexus.core
[DEBUG]   Imported: org.apache.maven.profiles < plexus.core
[DEBUG]   Imported: org.apache.maven.project < plexus.core
[DEBUG]   Imported: org.apache.maven.reporting < plexus.core
[DEBUG]   Imported: org.apache.maven.repository < plexus.core
[DEBUG]   Imported: org.apache.maven.rtinfo < plexus.core
[DEBUG]   Imported: org.apache.maven.settings < plexus.core
[DEBUG]   Imported: org.apache.maven.toolchain < plexus.core
[DEBUG]   Imported: org.apache.maven.usability < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.* < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.authentication < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.authorization < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.events < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.observers < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.proxy < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.repository < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.resource < plexus.core
[DEBUG]   Imported: org.codehaus.classworlds < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.* < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.classworlds < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.component < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.configuration < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.container < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.context < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.lifecycle < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.logging < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.personality < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core
[DEBUG]   Imported: org.eclipse.aether.* < plexus.core
[DEBUG]   Imported: org.eclipse.aether.artifact < plexus.core
[DEBUG]   Imported: org.eclipse.aether.collection < plexus.core
[DEBUG]   Imported: org.eclipse.aether.deployment < plexus.core
[DEBUG]   Imported: org.eclipse.aether.graph < plexus.core
[DEBUG]   Imported: org.eclipse.aether.impl < plexus.core
[DEBUG]   Imported: org.eclipse.aether.installation < plexus.core
[DEBUG]   Imported: org.eclipse.aether.internal.impl < plexus.core
[DEBUG]   Imported: org.eclipse.aether.metadata < plexus.core
[DEBUG]   Imported: org.eclipse.aether.repository < plexus.core
[DEBUG]   Imported: org.eclipse.aether.resolution < plexus.core
[DEBUG]   Imported: org.eclipse.aether.spi < plexus.core
[DEBUG]   Imported: org.eclipse.aether.transfer < plexus.core
[DEBUG]   Imported: org.eclipse.aether.version < plexus.core
[DEBUG]   Imported: org.slf4j.* < plexus.core
[DEBUG]   Imported: org.slf4j.helpers.* < plexus.core
[DEBUG]   Imported: org.slf4j.spi.* < plexus.core
[DEBUG] Populating class realm maven.api
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from C:\jruby-9.1.15.0\lib\ruby\gems\shared\gems\ruby-maven-libs-3.3.9\maven-home\conf\settings.xml
[DEBUG] Reading user settings from C:\Users\tony.gan\.m2\settings.xml
[DEBUG] Reading global toolchains from C:\jruby-9.1.15.0\lib\ruby\gems\shared\gems\ruby-maven-libs-3.3.9\maven-home\conf\toolchains.xml
[DEBUG] Reading user toolchains from C:\Users\tony.gan\.m2\toolchains.xml
[DEBUG] Using local repository at C:\Users\tony.gan\.m2\repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\Users\tony.gan\.m2\repository
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM C:\jruby-9.1.15.0\lib\ruby\gems\shared\gems\jbundler-0.9.3\lib\jbundler\dependency_pom.rb: only whitespace content allowed before start tag and not b (position: START_DOCUMENT seen b... @1:1)  @ line 1, column 1
 @
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM C:\jruby-9.1.15.0\lib\ruby\gems\shared\gems\jbundler-0.9.3\lib\jbundler\dependency_pom.rb: only whitespace content allowed before start tag and not b (position: START_DOCUMENT seen b... @1:1)  @ line 1, column 1

        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:422)
        at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
        at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
        at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
        at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR]
[ERROR]   The project  (C:\jruby-9.1.15.0\lib\ruby\gems\shared\gems\jbundler-0.9.3\lib\jbundler\dependency_pom.rb) has 1 error
[ERROR]     Non-parseable POM C:\jruby-9.1.15.0\lib\ruby\gems\shared\gems\jbundler-0.9.3\lib\jbundler\dependency_pom.rb: only whitespace content allowed before start tag and not b (position: START_DOCUMENT seen b... @1:1)  @ line 1, column 1 -> [Help 2]
org.apache.maven.model.io.ModelParseException: only whitespace content allowed before start tag and not b (position: START_DOCUMENT seen b... @1:1)
        at org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.java:122)
        at org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.java:86)
        at org.apache.maven.model.building.DefaultModelProcessor.read(DefaultModelProcessor.java:81)
        at org.apache.maven.model.building.DefaultModelBuilder.readModel(DefaultModelBuilder.java:533)
        at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:273)
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:469)
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:438)
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:401)
        at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
        at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
        at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
        at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: only whitespace content allowed before start tag and not b (position: START_DOCUMENT seen b... @1:1)
        at org.codehaus.plexus.util.xml.pull.MXParser.parseProlog(MXParser.java:1557)
        at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1436)
        at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1131)
        at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.read(MavenXpp3ReaderEx.java:4392)
        at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.read(MavenXpp3ReaderEx.java:598)
        at org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.java:113)
        ... 25 more
[ERROR]
[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 - C:/Users/tony.gan/Downloads/tabula-master/tabula-master/pkg/dependencies.txt
                  read at org/jruby/RubyIO.java:3673
  install_dependencies at C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/jbundler-0.9.3/lib/jbundler/lock_down.rb:113
             lock_down at C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/jbundler-0.9.3/lib/jbundler/lock_down.rb:54
               install at C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/jbundler-0.9.3/lib/jbundler/cli.rb:80
                   run at C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/command.rb:27
        invoke_command at C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126
              dispatch at C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor.rb:387
                 start at C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/base.rb:466
                <main> at C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/jbundler-0.9.3/bin/jbundle:47
                  load at org/jruby/RubyKernel.java:973
                <main> at c:\jruby-9.1.15.0\bin\jbundle:23

Any idea on how to fix this?

@mkristian
Copy link
Owner

Downloading: https://repo.maven.apache.org/maven2/org/torquebox/mojo/mavengem-wagon/0.2.1/mavengem-wagon-0.2.1.pom
[DEBUG] Writing tracking file C:\Users\tony.gan\.m2\repository\org\torquebox\mojo\mavengem-wagon\0.2.1\mavengem-wagon-0.2.1.pom.lastUpdated
[WARNING] Failed to read extensions descriptor C:\Users\tony.gan\Downloads\tabula-master\tabula-master\.mvn\extensions.xml: Plugin org.torquebox.mojo:mavengem-wagon:0.2.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.torquebox.mojo:mavengem-wagon:jar:0.2.1

so basically this failed. do you have access to maven-central, i.e. not blocked by any corporate firewall, etc ?
you can delete C:\Users\tony.gan.m2\repository\org\torquebox\mojo\mavengem-wagon\0.2.1 and try again. check if you can see https://repo.maven.apache.org/maven2/org/torquebox/mojo/mavengem-wagon/0.2.1/mavengem-wagon-0.2.1.pom from where you are.

@TonyGan329
Copy link

Thanks! I think it's corporate firewall problem as I tried with another computer outside company domain it could work.

@mkristian
Copy link
Owner

@TonyGan329 if you have a maven proxy/mirror then you can set ENV JARS_MAVEN_SETTING to point to custom settings.xml (it is all maven here)

@ecdemis123
Copy link
Contributor

ecdemis123 commented Jul 18, 2018

Hi! I am also having the same issue. I don't think its a networking issue, like the person above, since I was able to successfully bundle exec jbundle install inside of another project.

Here's the output of bundle exec jbundle install --debug.

...
mvn dependency:list -f /opt/bundle-cache/jruby/2.3.0/gems/jbundler-0.9.3/lib/jbundler/dependency_pom.rb -Dverbose=true -X -DexcludeTransitive=false -Djbundler.outputFile=/home/vagrant/arm-monolith/pkg/dependencies.txt -Djbundler.basedir=/home/vagrant/arm-monolith -Djbundler.jarfile=/home/vagrant/arm-monolith/Jarfile -Djbundler.gemfile=/home/vagrant/arm-monolith/Gemfile -Djbundler.workdir=/home/vagrant/arm-monolith/pkg -Djbundler.groups -Djbundler.bootstrap -Dmaven.repo.local=/home/vagrant/.m2/repository -Djbundler.jars.0=jline:jline:jar:2.11 -Djbundler.jars.size=1
mvn dependency:list -f /opt/bundle-cache/jruby/2.3.0/gems/jbundler-0.9.3/lib/jbundler/dependency_pom.rb -Dverbose=true -X -DexcludeTransitive=false -Djbundler.outputFile=/home/vagrant/arm-monolith/pkg/dependencies.txt -Djbundler.basedir=/home/vagrant/arm-monolith -Djbundler.jarfile=/home/vagrant/arm-monolith/Jarfile -Djbundler.gemfile=/home/vagrant/arm-monolith/Gemfile -Djbundler.workdir=/home/vagrant/arm-monolith/pkg -Djbundler.groups -Djbundler.bootstrap -Dmaven.repo.local=/home/vagrant/.m2/repository -Djbundler.jars.0=jline:jline:jar:2.11 -Djbundler.jars.size=1
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00)
Maven home: /opt/bundle-cache/jruby/2.3.0/gems/ruby-maven-libs-3.3.9/maven-home
Java version: 1.7.0_121, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-107-generic", arch: "amd64", family: "unix"
[DEBUG] Reading global settings from /opt/bundle-cache/jruby/2.3.0/gems/ruby-maven-libs-3.3.9/maven-home/conf/settings.xml
[DEBUG] Reading user settings from /home/vagrant/.m2/settings.xml
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /home/vagrant/.m2/repository
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.apache.org/maven2
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2
Downloading: https://repo.maven.apache.org/maven2/org/torquebox/mojo/mavengem-wagon/0.2.1/mavengem-wagon-0.2.1.pom
[DEBUG] Writing tracking file /home/vagrant/.m2/repository/org/torquebox/mojo/mavengem-wagon/0.2.1/mavengem-wagon-0.2.1.pom.lastUpdated
[WARNING] Failed to read extensions descriptor /home/vagrant/arm-monolith/.mvn/extensions.xml: Plugin org.torquebox.mojo:mavengem-wagon:0.2.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.torquebox.mojo:mavengem-wagon:jar:0.2.1
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG]   Imported: javax.enterprise.inject.* < plexus.core
[DEBUG]   Imported: javax.enterprise.util.* < plexus.core
[DEBUG]   Imported: javax.inject.* < plexus.core
[DEBUG]   Imported: org.apache.maven.* < plexus.core
[DEBUG]   Imported: org.apache.maven.artifact < plexus.core
[DEBUG]   Imported: org.apache.maven.classrealm < plexus.core
[DEBUG]   Imported: org.apache.maven.cli < plexus.core
[DEBUG]   Imported: org.apache.maven.configuration < plexus.core
[DEBUG]   Imported: org.apache.maven.exception < plexus.core
[DEBUG]   Imported: org.apache.maven.execution < plexus.core
[DEBUG]   Imported: org.apache.maven.execution.scope < plexus.core
[DEBUG]   Imported: org.apache.maven.lifecycle < plexus.core
[DEBUG]   Imported: org.apache.maven.model < plexus.core
[DEBUG]   Imported: org.apache.maven.monitor < plexus.core
[DEBUG]   Imported: org.apache.maven.plugin < plexus.core
[DEBUG]   Imported: org.apache.maven.profiles < plexus.core
[DEBUG]   Imported: org.apache.maven.project < plexus.core
[DEBUG]   Imported: org.apache.maven.reporting < plexus.core
[DEBUG]   Imported: org.apache.maven.repository < plexus.core
[DEBUG]   Imported: org.apache.maven.rtinfo < plexus.core
[DEBUG]   Imported: org.apache.maven.settings < plexus.core
[DEBUG]   Imported: org.apache.maven.toolchain < plexus.core
[DEBUG]   Imported: org.apache.maven.usability < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.* < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.authentication < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.authorization < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.events < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.observers < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.proxy < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.repository < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.resource < plexus.core
[DEBUG]   Imported: org.codehaus.classworlds < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.* < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.classworlds < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.component < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.configuration < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.container < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.context < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.lifecycle < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.logging < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.personality < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core
[DEBUG]   Imported: org.eclipse.aether.* < plexus.core
[DEBUG]   Imported: org.eclipse.aether.artifact < plexus.core
[DEBUG]   Imported: org.eclipse.aether.collection < plexus.core
[DEBUG]   Imported: org.eclipse.aether.deployment < plexus.core
[DEBUG]   Imported: org.eclipse.aether.graph < plexus.core
[DEBUG]   Imported: org.eclipse.aether.impl < plexus.core
[DEBUG]   Imported: org.eclipse.aether.installation < plexus.core
[DEBUG]   Imported: org.eclipse.aether.internal.impl < plexus.core
[DEBUG]   Imported: org.eclipse.aether.metadata < plexus.core
[DEBUG]   Imported: org.eclipse.aether.repository < plexus.core
[DEBUG]   Imported: org.eclipse.aether.resolution < plexus.core
[DEBUG]   Imported: org.eclipse.aether.spi < plexus.core
[DEBUG]   Imported: org.eclipse.aether.transfer < plexus.core
[DEBUG]   Imported: org.eclipse.aether.version < plexus.core
[DEBUG]   Imported: org.slf4j.* < plexus.core
[DEBUG]   Imported: org.slf4j.helpers.* < plexus.core
[DEBUG]   Imported: org.slf4j.spi.* < plexus.core
[DEBUG] Populating class realm maven.api
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /opt/bundle-cache/jruby/2.3.0/gems/ruby-maven-libs-3.3.9/maven-home/conf/settings.xml
[DEBUG] Reading user settings from /home/vagrant/.m2/settings.xml
[DEBUG] Reading global toolchains from /opt/bundle-cache/jruby/2.3.0/gems/ruby-maven-libs-3.3.9/maven-home/conf/toolchains.xml
[DEBUG] Reading user toolchains from /home/vagrant/.m2/toolchains.xml
[DEBUG] Using local repository at /home/vagrant/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /home/vagrant/.m2/repository
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM /opt/bundle-cache/jruby/2.3.0/gems/jbundler-0.9.3/lib/jbundler/dependency_pom.rb: only whitespace content allowed before start tag and not b (position: START_DOCUMENT seen b... @1:1)  @ line 1, column 1
 @
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM /opt/bundle-cache/jruby/2.3.0/gems/jbundler-0.9.3/lib/jbundler/dependency_pom.rb: only whitespace content allowed before start tag and not b (position: START_DOCUMENT seen b... @1:1)  @ line 1, column 1

	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:422)
	at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
	at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
	at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
	at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR]
[ERROR]   The project  (/opt/bundle-cache/jruby/2.3.0/gems/jbundler-0.9.3/lib/jbundler/dependency_pom.rb) has 1 error
[ERROR]     Non-parseable POM /opt/bundle-cache/jruby/2.3.0/gems/jbundler-0.9.3/lib/jbundler/dependency_pom.rb: only whitespace content allowed before start tag and not b (position: START_DOCUMENT seen b... @1:1)  @ line 1, column 1 -> [Help 2]
org.apache.maven.model.io.ModelParseException: only whitespace content allowed before start tag and not b (position: START_DOCUMENT seen b... @1:1)
	at org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.java:122)
	at org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.java:86)
	at org.apache.maven.model.building.DefaultModelProcessor.read(DefaultModelProcessor.java:81)
	at org.apache.maven.model.building.DefaultModelBuilder.readModel(DefaultModelBuilder.java:533)
	at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:273)
	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:469)
	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:438)
	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:401)
	at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
	at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
	at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
	at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: only whitespace content allowed before start tag and not b (position: START_DOCUMENT seen b... @1:1)
	at org.codehaus.plexus.util.xml.pull.MXParser.parseProlog(MXParser.java:1557)
	at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1436)
	at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1131)
	at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.read(MavenXpp3ReaderEx.java:4392)
	at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.read(MavenXpp3ReaderEx.java:598)
	at org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.java:113)
	... 25 more
[ERROR]
[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
bundler: failed to load command: jbundle (/opt/bundle-cache/jruby/2.3.0/bin/jbundle)
Errno::ENOENT: No such file or directory - /home/vagrant/arm-monolith/pkg/dependencies.txt
  org/jruby/RubyIO.java:3583:in `read'
  /opt/bundle-cache/jruby/2.3.0/gems/jbundler-0.9.3/lib/jbundler/lock_down.rb:113:in `install_dependencies'
  /opt/bundle-cache/jruby/2.3.0/gems/jbundler-0.9.3/lib/jbundler/lock_down.rb:54:in `lock_down'
  /opt/bundle-cache/jruby/2.3.0/gems/jbundler-0.9.3/lib/jbundler/cli.rb:80:in `install'
  /home/vagrant/.rbenv/versions/jruby-9.1.8.0/lib/ruby/gems/shared/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /home/vagrant/.rbenv/versions/jruby-9.1.8.0/lib/ruby/gems/shared/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /home/vagrant/.rbenv/versions/jruby-9.1.8.0/lib/ruby/gems/shared/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
  /home/vagrant/.rbenv/versions/jruby-9.1.8.0/lib/ruby/gems/shared/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
  /opt/bundle-cache/jruby/2.3.0/gems/jbundler-0.9.3/bin/jbundle:47:in `<main>'
  org/jruby/RubyKernel.java:979:in `load'
  /opt/bundle-cache/jruby/2.3.0/bin/jbundle:1:in `<main>'
  org/jruby/RubyKernel.java:979:in `load'
  /opt/bundle-cache/jruby/2.3.0/bin/jbundle:22:in `(root)'```

@mkristian
Copy link
Owner

@ecdemis123 from the logs I see a problem downloading one jar, please have a look into /home/vagrant/.m2/repository/org/torquebox/mojo/mavengem-wagon/0.2.1/mavengem-wagon-0.2.1.pom.lastUpdated which might gives you some clues.

but without this file and its dependency jruby-core jar it will not work.

really need to catch this case and produce a more useful error message

@ecdemis123
Copy link
Contributor

ecdemis123 commented Jul 19, 2018

Okay, here are the contents of that file.

#Wed Jul 18 16:29:50 PDT 2018
@default-central-https\://repo.maven.apache.org/maven2/.lastUpdated=1531956590547
https\://repo.maven.apache.org/maven2/.error=Could not transfer artifact org.torquebox.mojo\:mavengem-wagon\:pom\:0.2.1 from/to central (https\://repo.maven.apache.org/maven2)\: Received fatal alert\: protocol_version

Can you give me any context on this? I am not familiar with java/maven development 😄
What protocol version is this message referring to?

@ecdemis123
Copy link
Contributor

Ok I found a work around and I'll post my solution in case this helps someone else in the future.
I was using rbenv, jruby 9.1.18, and java 7 when I encountered this error. I switched to rvm so that I could easily get jruby 9.2.0.0, which also required me to upgrade to java 8. Once I made that switch I was able to successfully jbundle. Phew! Thanks anyways for your assistance and thanks for building jbundler which is an awesome tool.

@mkristian
Copy link
Owner

@ecdemis123 I did not know anything about the protocol version but this thread indicated a jdk7 problem: technomancy/leiningen#2364
so all you could do to upgrade as you did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants