JRuby gemspec - local jar dependencies

I would like to include in gemspec 'jar dependencies' which are local, e.g.

/opt/someplugin/lib/somejar.jar

Currently, the only way I found the local jar file in the project is in the * .rb file on require /opt/someplugin/lib/somejar.jar

Gemspec dynamoDB snapshot using jar dependencies will be considered

  # Jar dependencies s.requirements << "jar 'com.amazonaws:amazon-kinesis-client', '1.6.0'" s.requirements << "jar 'log4j:log4j', '1.2.17'" s.requirements << "jar 'com.amazonaws:aws-java-sdk-dynamodb', '1.10.10'" s.requirements << "jar 'com.amazonaws:aws-java-sdk-core', '1.10.10'" s.requirements << "jar 'com.amazonaws:dynamodb-import-export-tool', '1.0.0'" s.requirements << "jar 'commons-logging:commons-logging', '1.1.3'" s.requirements << "jar 'com.amazonaws:dynamodb-streams-kinesis-adapter', '1.0.0'" s.requirements << "jar 'com.google.guava:guava', '15.0'" s.add_runtime_dependency 'jar-dependencies' 

What happens is that gem build downloads jar files from the maven repository.

I want to achieve the same “effect”, but with local banks located in my file system.

An example for a command that will probably look the way I need:

 caution ?not real? gemspec line: s.requirements << "jar '/opt/someplugin/lib/somejar.jar', '1.0.0" 

Thank you for your help.

+8
java jar jruby dependencies
source share
1 answer

You can install the local jar in the local maven repository as described here

For your example, the command might be:

 mvn install:install-file -Dfile=/opt/someplugin/lib/somejar.jar -DgroupId=some.group -DartifactId=somejar -Dversion=0.0.1 -Dpackaging=jar 

Then in gemspec you can link to this jar:

 # Jar dependencies s.requirements << "jar 'some.group:somejar', '0.0.1'" 
0
source share

All Articles