-
Notifications
You must be signed in to change notification settings - Fork 6
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
Updating JAR output path to avoid using long path. #114
Conversation
The actual changes here LGTM, but if we were to simply add the jar to the 155 chars: |
|
String vendorPathPrefix = "vendor/jar-dependencies" | ||
String projectGroupPath = project.group.replaceAll('\\.', '/') | ||
File projectJarFile = file("${vendorPathPrefix}/${projectGroupPath}/${project.name}/${project.version}/${project.name}-${project.version}.jar") | ||
String vendorPathPrefix = "vendor/jar-dependencies/co/elastic" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review note: made a minimal change to shorten the path. We may directly place into vendor but we are using jar-dependencies
(in gemspec file) as a required path and include jars as a standard in other Java based plugins.
…g path max limit.
…should fetch this change when creting distributions.
88fbc0c
to
a4cd136
Compare
the minimal change LGTM too. jarRequiresFile.withWriter { w ->
w << "# AUTOGENERATED BY THE GRADLE SCRIPT. DO NOT EDIT.\n\n"
w << '########################################################################\n' +
'# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V.\n' +
'# under one or more contributor license agreements. Licensed under the\n' +
'# Elastic License 2.0; you may not use this file except in compliance\n' +
'# with the Elastic License 2.0.\n' +
'########################################################################\n'
w << '\n'
w << "require_relative(::File.join("..", "vendor", "#{project.name}-#{project.version}.jar")\n"
} |
Description
Embedding the plugin into core and faced an issue that jar path exceeds path limit or TarWriter we used when assembling.
With this change, we will shorten the JAR path.
BEFORE
268 chars:
logstash-8.13.0-SNAPSHOT/vendor/bundle/jruby/3.1.0/gems/logstash-filter-elastic_integration-0.1.2-java/vendor/jar-dependencies/co/elastic/logstash/plugins/filter/elasticintegration/logstash-filter-elastic_integration/0.1.2/logstash-filter-elastic_integration-0.1.2.jar
AFTER
225 chars:
logstash-8.13.0-SNAPSHOT/vendor/bundle/jruby/3.1.0/gems/logstash-filter-elastic_integration-0.1.2-java/vendor/jar-dependencies/co/elastic/logstash-filter-elastic_integration/0.1.2/logstash-filter-elastic_integration-0.1.2.jar