Skip to content

Cannot install a Maven JAR with a ${} variable dependency #100

@AndyObtiva

Description

@AndyObtiva

Hi,

I tried using jbundler and jar-dependencies, but ran into a snag.

Here is the Jarfile:

repository "https://repo.maven.apache.org/maven2"

jar 'org.eclipse.platform:org.eclipse.swt.cocoa.macosx.x86_64', '3.115.0'

And here is the jbundler install command output:

Users-iMac-2:/Users/User/code/glimmer-dsl-swt
$ jbundle install
	Using rake 13.0.1
Using addressable 2.4.0
Using array_include_methods 1.0.2
Using awesome_print 1.8.0
Using builder 3.2.4
Using bundler 2.1.4
Using json 2.3.1 (java)
Using docile 1.3.2
Using simplecov-html 0.10.2
Using simplecov 0.16.1
Using sync 0.5.0
Using tins 1.25.0
Using term-ansicolor 1.7.1
Using thor 1.0.1
Using coveralls 0.8.23
Using thread_safe 0.3.6 (java)
Using descendants_tracker 0.0.4
Using diff-lcs 1.4.4
Using facets 3.1.0
Using multipart-post 2.1.1
Using faraday 0.9.2
Using rchardet 1.8.0
Using git 1.7.0
Using git-glimmer 1.7.0
Using hashie 4.1.0
Using mime-types 2.99.3
Using jwt 2.2.2
Using multi_json 1.15.0
Using multi_xml 0.6.0
Using rack 2.2.3
Using oauth2 1.4.4
Using github_api 0.16.0
Using glimmer 1.0.0
Using highline 2.0.3
Using jar-dependencies 0.4.1
Using maven-tools 0.32.5
Using ruby-maven 3.0.4.1.4
Using jbundler 0.4.3
Using nokogiri 1.10.10 (java)
Using psych 3.2.0 (java)
Using rdoc 6.2.1
Using semver2 3.4.2
Using jeweler 2.3.9
Using jruby-jars 9.2.13.0
Using jruby-rack 1.1.21
Using rexml 3.2.4
Using kramdown 2.3.0
Using little-plugger 1.1.4
Using logging 2.3.0
Using method_source 1.0.0
Using nested_inherited_jruby_include_package 0.3.0
Using os 1.1.1
Using tty-color 0.5.2
Using pastel 0.8.0
Using puts_debuggerer 0.10.1
Using tty-cursor 0.7.1
Using tty-screen 0.8.1
Using wisper 2.0.1
Using tty-reader 0.8.0
Using tty-prompt 0.22.0
Using rake-tui 0.2.1
Using rouge 3.23.0
Using rspec-support 3.5.0
Using rspec-core 3.5.4
Using rspec-expectations 3.5.0
Using rspec-mocks 3.5.0
Using rspec 3.5.0
Using rubyzip 1.3.0
Using simplecov-lcov 0.7.0
Using strings-ansi 0.2.0
Using unicode-display_width 1.7.0
Using unicode_utils 1.4.0
Using strings 0.2.0
Using super_module 1.4.1
Using text-table 1.2.4
Using tty-markdown 0.7.0
Using warbler 2.0.5
Bundle complete! 21 Gemfile dependencies, 77 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
downloading http://repo.maven.apache.org/maven2/org/eclipse/platform/org.eclipse.swt.cocoa.macosx.x86_64/3.115.0/org.eclipse.swt.cocoa.macosx.x86_64-3.115.0.pom
downloaded http://repo.maven.apache.org/maven2/org/eclipse/platform/org.eclipse.swt.cocoa.macosx.x86_64/3.115.0/org.eclipse.swt.cocoa.macosx.x86_64-3.115.0.pom
downloading https://repo.maven.apache.org/maven2//org/eclipse/platform/org.eclipse.swt.cocoa.macosx.x86_64/3.115.0/org.eclipse.swt.cocoa.macosx.x86_64-3.115.0.pom
downloaded https://repo.maven.apache.org/maven2//org/eclipse/platform/org.eclipse.swt.cocoa.macosx.x86_64/3.115.0/org.eclipse.swt.cocoa.macosx.x86_64-3.115.0.pom
artifact descriptor invalid: org.eclipse.platform:org.eclipse.swt:jar:3.105.3 : 1 problem was encountered while building the effective model for org.eclipse.platform:org.eclipse.swt:3.105.3
[ERROR] 'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. @ 

artifact descriptor invalid: org.eclipse.platform:org.eclipse.swt:jar:3.106.0 : 1 problem was encountered while building the effective model for org.eclipse.platform:org.eclipse.swt:3.106.0
[ERROR] 'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. @ 

artifact descriptor invalid: org.eclipse.platform:org.eclipse.swt:jar:3.106.1 : 1 problem was encountered while building the effective model for org.eclipse.platform:org.eclipse.swt:3.106.1
[ERROR] 'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. @ 

artifact descriptor invalid: org.eclipse.platform:org.eclipse.swt:jar:3.106.2 : 1 problem was encountered while building the effective model for org.eclipse.platform:org.eclipse.swt:3.106.2
[ERROR] 'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. @ 

artifact descriptor invalid: org.eclipse.platform:org.eclipse.swt:jar:3.106.3 : 1 problem was encountered while building the effective model for org.eclipse.platform:org.eclipse.swt:3.106.3
[ERROR] 'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. @ 

artifact descriptor invalid: org.eclipse.platform:org.eclipse.swt:jar:3.107.0 : 1 problem was encountered while building the effective model for org.eclipse.platform:org.eclipse.swt:3.107.0
[ERROR] 'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. @ 

artifact descriptor invalid: org.eclipse.platform:org.eclipse.swt:jar:3.108.0 : 1 problem was encountered while building the effective model for org.eclipse.platform:org.eclipse.swt:3.108.0
[ERROR] 'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. @ 

artifact descriptor invalid: org.eclipse.platform:org.eclipse.swt:jar:3.109.0 : 1 problem was encountered while building the effective model for org.eclipse.platform:org.eclipse.swt:3.109.0
[ERROR] 'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. @ 

artifact descriptor invalid: org.eclipse.platform:org.eclipse.swt:jar:3.110.0 : 1 problem was encountered while building the effective model for org.eclipse.platform:org.eclipse.swt:3.110.0
[ERROR] 'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. @ 

artifact descriptor invalid: org.eclipse.platform:org.eclipse.swt:jar:3.111.0 : 1 problem was encountered while building the effective model for org.eclipse.platform:org.eclipse.swt:3.111.0
[ERROR] 'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. @ 

artifact descriptor invalid: org.eclipse.platform:org.eclipse.swt:jar:3.112.0 : 1 problem was encountered while building the effective model for org.eclipse.platform:org.eclipse.swt:3.112.0
[ERROR] 'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. @ 

artifact descriptor invalid: org.eclipse.platform:org.eclipse.swt:jar:3.113.0 : 1 problem was encountered while building the effective model for org.eclipse.platform:org.eclipse.swt:3.113.0
[ERROR] 'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. @ 

artifact descriptor invalid: org.eclipse.platform:org.eclipse.swt:jar:3.114.0 : 1 problem was encountered while building the effective model for org.eclipse.platform:org.eclipse.swt:3.114.0
[ERROR] 'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. @ 

artifact descriptor invalid: org.eclipse.platform:org.eclipse.swt:jar:3.114.100 : 1 problem was encountered while building the effective model for org.eclipse.platform:org.eclipse.swt:3.114.100
[ERROR] 'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. @ 

artifact descriptor invalid: org.eclipse.platform:org.eclipse.swt:jar:3.115.0 : 1 problem was encountered while building the effective model for org.eclipse.platform:org.eclipse.swt:3.115.0
[ERROR] 'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. @ 

artifact descriptor invalid: org.eclipse.platform:org.eclipse.swt:jar:3.115.0 : 1 problem was encountered while building the effective model for org.eclipse.platform:org.eclipse.swt:3.115.0
[ERROR] 'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. @ 

/Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/gems/jbundler-0.4.3/lib/jbundler/aether.rb:79: warning: constant ::NativeException is deprecated
org.sonatype.aether.collection.DependencyCollectionException: Failed to collect dependencies for [org.eclipse.platform:org.eclipse.swt.cocoa.macosx.x86_64:jar:3.115.0 (compile), ruby.bundler:psych:pom:3.2.0 (compile), org.eclipse.platform:org.eclipse.swt:jar:3.115.0 (compile), org.yaml:snakeyaml:jar:1.26 (compile)]
	at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(org/sonatype/aether/impl/internal/DefaultDependencyCollector.java:258)
	at org.sonatype.aether.impl.internal.DefaultRepositorySystem.collectDependencies(org/sonatype/aether/impl/internal/DefaultRepositorySystem.java:308)
	at jbundler.Aether.resolve(jbundler/Aether.java:214)
	at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
	at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:441)
	at org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:305)
	at RUBY.resolve(/Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/gems/jbundler-0.4.3/lib/jbundler/aether.rb:79)
	at RUBY.<main>(/Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/gems/jbundler-0.4.3/lib/jbundler.rb:42)
	at org.jruby.Ruby.runInterpreter(org/jruby/Ruby.java:1218)
	at org.jruby.Ruby.loadFile(org/jruby/Ruby.java:2785)
	at org.jruby.RubyKernel.requireCommon(org/jruby/RubyKernel.java:981)
	at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:974)
	at org.jruby.RubyKernel$INVOKER$s$1$0$require.call(org/jruby/RubyKernel$INVOKER$s$1$0$require.gen)
	at Users.User.$_dot_rvm.rubies.jruby_minus_9_dot_2_dot_13_dot_0.lib.ruby.stdlib.rubygems.core_ext.kernel_require.invokeOther25:gem_original_require(Users/User/$_dot_rvm/rubies/jruby_minus_9_dot_2_dot_13_dot_0/lib/ruby/stdlib/rubygems/core_ext//Users/User/.rvm/rubies/jruby-9.2.13.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54)
	at Users.User.$_dot_rvm.rubies.jruby_minus_9_dot_2_dot_13_dot_0.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(/Users/User/.rvm/rubies/jruby-9.2.13.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54)
	at RUBY.install(/Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/gems/jbundler-0.4.3/lib/jbundler/cli.rb:54)
	at org.jruby.RubyClass.finvokeWithRefinements(org/jruby/RubyClass.java:514)
	at org.jruby.RubyBasicObject.send(org/jruby/RubyBasicObject.java:1755)
	at org.jruby.RubyBasicObject$INVOKER$i$send.call(org/jruby/RubyBasicObject$INVOKER$i$send.gen)
	at RUBY.run(/Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/gems/thor-1.0.1/lib/thor/command.rb:27)
	at RUBY.invoke_command(/Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/gems/thor-1.0.1/lib/thor/invocation.rb:127)
	at RUBY.dispatch(/Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/gems/thor-1.0.1/lib/thor.rb:392)
	at RUBY.start(/Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/gems/thor-1.0.1/lib/thor/base.rb:485)
	at RUBY.<main>(/Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/gems/jbundler-0.4.3/bin/jbundle:66)
	at org.jruby.Ruby.runInterpreter(org/jruby/Ruby.java:1218)
	at org.jruby.Ruby.loadFile(org/jruby/Ruby.java:2785)
	at org.jruby.RubyKernel.loadCommon(org/jruby/RubyKernel.java:1039)
	at org.jruby.RubyKernel.load(org/jruby/RubyKernel.java:1009)
	at org.jruby.RubyKernel$INVOKER$s$load.call(org/jruby/RubyKernel$INVOKER$s$load.gen)
	at Users.User.$_dot_rvm.gems.jruby_minus_9_dot_2_dot_13_dot_0_at_40_glimmer_minus_dsl_minus_swt.bin.jbundle.invokeOther8:load(Users/User/$_dot_rvm/gems/jruby_minus_9_dot_2_dot_13_dot_0_at_40_glimmer_minus_dsl_minus_swt/bin//Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/bin/jbundle:23)
	at Users.User.$_dot_rvm.gems.jruby_minus_9_dot_2_dot_13_dot_0_at_40_glimmer_minus_dsl_minus_swt.bin.jbundle.<main>(/Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/bin/jbundle:23)
	at java.lang.invoke.MethodHandle.invokeWithArguments(java/lang/invoke/MethodHandle.java:627)
	at org.jruby.Ruby.runScript(org/jruby/Ruby.java:1205)
	at org.jruby.Ruby.runNormally(org/jruby/Ruby.java:1128)
	at org.jruby.Ruby.runNormally(org/jruby/Ruby.java:1146)
	at org.jruby.Ruby.runFromMain(org/jruby/Ruby.java:958)
	at org.jruby.Main.doRunFromMain(org/jruby/Main.java:412)
	at org.jruby.Main.internalRun(org/jruby/Main.java:304)
	at org.jruby.Main.run(org/jruby/Main.java:234)
	at org.jruby.Main.main(org/jruby/Main.java:206)
Caused by: org.sonatype.aether.resolution.VersionRangeResolutionException: No versions available for org.eclipse.platform:org.eclipse.swt.gtk.linux.aarch64:jar:[3.105.2,3.105.2] within specified range
	at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:376)
	at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:544)
	at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:544)
	at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:240)
	at org.sonatype.aether.impl.internal.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:308)
	at jbundler.Aether.resolve(Aether.java:214)
	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:498)
	at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:441)
	at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:305)
	at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:32)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:121)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:108)
	at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
	at org.jruby.Ruby.loadFile(Ruby.java:2785)
	at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
	at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
	at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:887)
	at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:535)
	at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
	at org.jruby.RubyKernel.requireCommon(RubyKernel.java:981)
	at org.jruby.RubyKernel.require(RubyKernel.java:974)
	at org.jruby.RubyKernel$INVOKER$s$1$0$require.call(RubyKernel$INVOKER$s$1$0$require.gen)
	at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:417)
	at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:97)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
	at Users.User.$_dot_rvm.rubies.jruby_minus_9_dot_2_dot_13_dot_0.lib.ruby.stdlib.rubygems.core_ext.kernel_require.invokeOther25:gem_original_require(/Users/User/.rvm/rubies/jruby-9.2.13.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54)
	at Users.User.$_dot_rvm.rubies.jruby_minus_9_dot_2_dot_13_dot_0.lib.ruby.stdlib.rubygems.core_ext.kernel_require.RUBY$method$require$0(/Users/User/.rvm/rubies/jruby-9.2.13.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54)
	at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:106)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:140)
	at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:200)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:86)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:73)
	at org.jruby.RubyClass.finvokeWithRefinements(RubyClass.java:514)
	at org.jruby.RubyBasicObject.send(RubyBasicObject.java:1755)
	at org.jruby.RubyBasicObject$INVOKER$i$send.call(RubyBasicObject$INVOKER$i$send.gen)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)
	at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:86)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:73)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)
	at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:191)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:178)
	at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:208)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:396)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:205)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:86)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:73)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)
	at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:121)
	at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:108)
	at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
	at org.jruby.Ruby.loadFile(Ruby.java:2785)
	at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
	at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
	at org.jruby.runtime.load.LoadService.load(LoadService.java:343)
	at org.jruby.RubyKernel.loadCommon(RubyKernel.java:1039)
	at org.jruby.RubyKernel.load(RubyKernel.java:1009)
	at org.jruby.RubyKernel$INVOKER$s$load.call(RubyKernel$INVOKER$s$load.gen)
	at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:417)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
	at Users.User.$_dot_rvm.gems.jruby_minus_9_dot_2_dot_13_dot_0_at_40_glimmer_minus_dsl_minus_swt.bin.jbundle.invokeOther8:load(/Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/bin/jbundle:23)
	at Users.User.$_dot_rvm.gems.jruby_minus_9_dot_2_dot_13_dot_0_at_40_glimmer_minus_dsl_minus_swt.bin.jbundle.RUBY$script(/Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/bin/jbundle:23)
	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
	at org.jruby.ir.Compiler$1.load(Compiler.java:89)
	at org.jruby.Ruby.runScript(Ruby.java:1205)
	at org.jruby.Ruby.runNormally(Ruby.java:1128)
	at org.jruby.Ruby.runNormally(Ruby.java:1146)
	at org.jruby.Ruby.runFromMain(Ruby.java:958)
	at org.jruby.Main.doRunFromMain(Main.java:412)
	at org.jruby.Main.internalRun(Main.java:304)
	at org.jruby.Main.run(Main.java:234)
	at org.jruby.Main.main(Main.java:206)
NativeException: org.sonatype.aether.collection.DependencyCollectionException: Failed to collect dependencies for [org.eclipse.platform:org.eclipse.swt.cocoa.macosx.x86_64:jar:3.115.0 (compile), ruby.bundler:psych:pom:3.2.0 (compile), org.eclipse.platform:org.eclipse.swt:jar:3.115.0 (compile), org.yaml:snakeyaml:jar:1.26 (compile)]
         resolve at /Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/gems/jbundler-0.4.3/lib/jbundler/aether.rb:82
          <main> at /Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/gems/jbundler-0.4.3/lib/jbundler.rb:42
         require at org/jruby/RubyKernel.java:974
         require at /Users/User/.rvm/rubies/jruby-9.2.13.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54
         install at /Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/gems/jbundler-0.4.3/lib/jbundler/cli.rb:54
             run at /Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/gems/thor-1.0.1/lib/thor/command.rb:27
  invoke_command at /Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/gems/thor-1.0.1/lib/thor/invocation.rb:127
        dispatch at /Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/gems/thor-1.0.1/lib/thor.rb:392
           start at /Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/gems/thor-1.0.1/lib/thor/base.rb:485
          <main> at /Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/gems/jbundler-0.4.3/bin/jbundle:66
            load at org/jruby/RubyKernel.java:1009
          <main> at /Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-dsl-swt/bin/jbundle:23

It seems like it does not like the fact that 'org.eclipse.platform:org.eclipse.swt.cocoa.macosx.x86_64' uses a ${osgi.platform} variable.

I even tried this Jarfile (leaving the osgi.platform out... which exists as a general Maven package), but then ran into the same issue while executing Ruby code at runtime:

repository "https://repo.maven.apache.org/maven2"

jar 'org.eclipse.platform:org.eclipse.swt', '3.115.0'

At runtime after calling require 'jbundler' and attempting to use a Java class:

[ERROR] 'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. @ 

NameError: cannot load Java class org.eclipse.swt.SWT
          for_name at org/jruby/javasupport/JavaClass.java:292
          for_name at org/jruby/javasupport/JavaClass.java:288
   get_proxy_class at org/jruby/javasupport/JavaUtilities.java:39
       java_import at uri:classloader:/jruby/java/core_ext/object.rb:44
               map at org/jruby/RubyArray.java:2577
       java_import at uri:classloader:/jruby/java/core_ext/object.rb:37
   singleton class at /Users/User/code/glimmer-dsl-swt/lib/glimmer/swt/swt_proxy.rb:35
  <class:SWTProxy> at /Users/User/code/glimmer-dsl-swt/lib/glimmer/swt/swt_proxy.rb:32
      <module:SWT> at /Users/User/code/glimmer-dsl-swt/lib/glimmer/swt/swt_proxy.rb:29
  <module:Glimmer> at /Users/User/code/glimmer-dsl-swt/lib/glimmer/swt/swt_proxy.rb:25
            <main> at /Users/User/code/glimmer-dsl-swt/lib/glimmer/swt/swt_proxy.rb:24
           require at org/jruby/RubyKernel.java:974
           require at /Users/User/.rvm/rubies/jruby-9.2.13.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54
            <main> at /Users/User/code/glimmer-dsl-swt/lib/glimmer/data_binding/table_items_binding.rb:26
           require at org/jruby/RubyKernel.java:974
           require at /Users/User/.rvm/rubies/jruby-9.2.13.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54
            <main> at /Users/User/code/glimmer-dsl-swt/lib/glimmer/dsl/swt/table_items_data_binding_expression.rb:24
           require at org/jruby/RubyKernel.java:974
           require at /Users/User/.rvm/rubies/jruby-9.2.13.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54
            <main> at /Users/User/code/glimmer-dsl-swt/lib/glimmer/dsl/swt/dsl.rb:24
              each at org/jruby/RubyArray.java:1809
            <main> at /Users/User/code/glimmer-dsl-swt/lib/glimmer/dsl/swt/dsl.rb:24
           require at org/jruby/RubyKernel.java:974
           require at /Users/User/.rvm/rubies/jruby-9.2.13.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54
            <main> at /Users/User/code/glimmer-dsl-swt/lib/glimmer-dsl-swt.rb:35
           require at org/jruby/RubyKernel.java:974
           require at /Users/User/.rvm/rubies/jruby-9.2.13.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54

Is there a way to configure ${osgi.platform} at install time or runtime so that jbundler quits shouting about it!?

Andy Maleh

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions