Add -Werror flag to the build (#2712)
* Add -Werror to the build * Add to javadoc also * Run javadoc * Change from "check javadoc" to "build" * Fix javadoc warnings
This commit is contained in:
parent
0bd7b4fd65
commit
b39348d640
|
@ -25,7 +25,7 @@ jobs:
|
|||
run: .github/scripts/deadlock-detector.sh
|
||||
|
||||
- name: Build
|
||||
run: ./gradlew check --stacktrace -x :smoke-tests:test
|
||||
run: ./gradlew build --stacktrace -x :smoke-tests:test
|
||||
|
||||
- name: Upload deadlock detector artifacts
|
||||
if: always()
|
||||
|
|
|
@ -52,6 +52,7 @@ java {
|
|||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.release.set(project.ext.release.majorVersion.toInteger())
|
||||
options.compilerArgs.add("-Werror")
|
||||
}
|
||||
//Groovy and Scala compilers don't actually understand --release option
|
||||
tasks.withType(GroovyCompile) {
|
||||
|
@ -136,6 +137,8 @@ normalization {
|
|||
|
||||
javadoc {
|
||||
options.addStringOption('Xdoclint:none', '-quiet')
|
||||
// non-standard option to fail on warnings, see https://bugs.openjdk.java.net/browse/JDK-8200363
|
||||
options.addStringOption('Xwerror', '-quiet')
|
||||
|
||||
doFirst {
|
||||
if (project.ext.has("apiLinks")) {
|
||||
|
|
|
@ -51,3 +51,14 @@ tasks.withType(Test) {
|
|||
jvmArgs "-Dotel.instrumentation.apache-camel.experimental-span-attributes=true"
|
||||
jvmArgs "-Dotel.instrumentation.aws-sdk.experimental-span-attributes=true"
|
||||
}
|
||||
|
||||
javadoc {
|
||||
dependencies {
|
||||
// without adding this dependency, javadoc fails:
|
||||
// warning: unknown enum constant XmlAccessType.PROPERTY
|
||||
// reason: class file for javax.xml.bind.annotation.XmlAccessType not found
|
||||
// due to usage of org.apache.camel.model.RouteDefinition in CamelTracingService
|
||||
// which has jaxb class-level annotations
|
||||
compileOnly 'javax.xml.bind:jaxb-api:2.3.1'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,8 +11,6 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||
/**
|
||||
* Configuration for {@link io.opentelemetry.exporter.zipkin.ZipkinSpanExporter}.
|
||||
*
|
||||
* <p>Get Exporter Service Name {@link #getServiceName()}
|
||||
*
|
||||
* <p>Get Exporter Endpoint
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "opentelemetry.trace.exporter.zipkin")
|
||||
|
|
|
@ -5,12 +5,8 @@
|
|||
|
||||
package io.opentelemetry.javaagent.instrumentation.api;
|
||||
|
||||
import io.opentelemetry.api.GlobalOpenTelemetry;
|
||||
import io.opentelemetry.api.OpenTelemetry;
|
||||
import io.opentelemetry.api.trace.Span;
|
||||
import io.opentelemetry.api.trace.Tracer;
|
||||
import io.opentelemetry.context.Context;
|
||||
import io.opentelemetry.context.propagation.ContextPropagators;
|
||||
|
||||
/**
|
||||
* A helper for accessing methods that rely on new Java 8 bytecode features such as calling a static
|
||||
|
@ -35,13 +31,4 @@ public final class Java8BytecodeBridge {
|
|||
public static Span spanFromContext(Context context) {
|
||||
return Span.fromContext(context);
|
||||
}
|
||||
|
||||
public static ContextPropagators getGlobalPropagators() {
|
||||
return GlobalOpenTelemetry.getPropagators();
|
||||
}
|
||||
|
||||
/** Calls {@link OpenTelemetry#getGlobalTracer(String)}. */
|
||||
public static Tracer getGlobalTracer(String name) {
|
||||
return GlobalOpenTelemetry.getTracer(name);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue