Avoid to copy Logstash's classes into the uber jar
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- java
- Área
- build-system
Línea de trabajo
Start in build.gradle, especially the LOGSTASH_CORE_PATH dependency and jar packaging configuration. Run ./gradlew jar, then inspect build/libs/logstash-input-java_input_example-1.0.2.jar with jar tf; done means the uber jar no longer contains org/logstash classes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Logstash information:
Please include the following information:
- Logstash version (e.g.
bin/logstash --version)8.4.0 - Logstash installation source (e.g. built from source, with a package manager: DEB/RPM, expanded from tar or zip archive, docker)
- How is Logstash being run (e.g. as a service/service manager: systemd, upstart, etc. Via command line, docker/kubernetes)
- How was the Logstash Plugin installed
JVM (e.g. java -version):
If the affected version of Logstash is 7.9 (or earlier), or if it is NOT using the bundled JDK or using the 'no-jdk' version in 7.10 (or higher), please provide the following information:
- JVM version (
java -version) (bundled) - JVM installation source (e.g. from the Operating System's package manager, from source, etc).
- Value of the
JAVA_HOMEenvironment variable if set.
OS version (uname -a if on a Unix-like system):
Description of the problem including expected versus actual behavior:
The uber jar (and the gem) created contains also the Logstash classes. This could create weird problems when loaded inside a runtime Logstash, because the classloader could load a class from this jar and not from the runtime Logstash creating weird linkage errors.
Steps to reproduce:
- Build the jar with
./gradlew jar, eventually fixing thebuild.gradlewith:
diff --git a/build.gradle b/build.gradle
index 5f54ad3..4a85c25 100644
--- a/build.gradle
+++ b/build.gradle
@@ -49,7 +49,7 @@ dependencies {
compileOnly 'org.apache.logging.log4j:log4j-api:2.17.0' // provided by Logstash
compileOnly 'org.apache.logging.log4j:log4j-core:2.17.0' // provided by Logstash
- implementation fileTree(dir: LOGSTASH_CORE_PATH, include: "**/logstash-core.jar")
+ implementation fileTree(dir: LOGSTASH_CORE_PATH, include: "**/lib/jars/logstash-core.jar")
testImplementation 'junit:junit:4.12'
testImplementation 'org.jruby:jruby-complete:9.2.20.1'
- verify that the created jar contains classes from Logstash:
$ jar tf ./build/libs/logstash-input-java_input_example-1.0.2.jar
META-INF/
META-INF/MANIFEST.MF
org/
org/logstashplugins/
org/logstashplugins/JavaInputExample.class
org/logstash/
org/logstash/JavaVersionUtils.class
org/logstash/Rubyfier.class
org/logstash/Valuefier$Converter.class
org/logstash/FieldReference$IllegalSyntaxException.class
org/logstash/Timestamp.class
org/logstash/Javafier.class
org/logstash/execution/
org/logstash/execution/ConvergeResultExt$FailedActionExt.class
org/logstash/execution/QueueBatch.class
org/logstash/execution/PipelineReporterExt$SnapshotExt.class
- Lenguaje dominante
- Java
- Estrellas
- 8
- Forks
- 18
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de logstash-plugins/logstash-input-java_input_example
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 55/100
-
build failAbiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
Todos los issues de logstash-plugins/logstash-input-java_input_example
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
redhat-developer/intellij-quarkus#1626 ·
-
Type/Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
wso2/product-integrator-mi#5061 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
quarkiverse/quarkus-roq#1277 ·
Los mantenedores suelen responder en 1 día
-
Typos in page footerAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
apache/logging-site#48 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/maven-surefire#3496 · 3 comentarios ·
Los mantenedores suelen responder en 1 día