Andy Seaborne wrote:
>> How can I setup the classpath for the jruby command?
>>
>> The only way I found so far is this:
>>
>> mvn assembly:assembly -DdescriptorId=jar-with-dependencies
>> export
>> CLASSPATH=target/jena-examples-0.1-SNAPSHOT-jar-with-dependencies.jar
>> jruby src/main/jruby/hello_jena.rb
>>
>> If you use JRuby (with Apache Jena), is this what you normally do to
>> run your (J)Ruby scripts from the command line?
>>
>> Cheers,
>> Paolo
> 
> jruby -J-cp 'lib/*' r.rb

Thanks Andy.
I tried what you suggest and it works fine.

mvn dependency:copy-dependencies
jruby -J-cp 'target/dependency/*:target/jena-examples-0.1-SNAPSHOT.jar' 
src/main/jruby/hello_jena.rb

Things can be packaged nicely and the one-jar approach is handy in this case.

Thanks,
Paolo

Reply via email to