-
Notifications
You must be signed in to change notification settings - Fork 820
Fixes #1431 - shaded exposition-formats/exported-opentelemetry #1441
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,13 +25,61 @@ | |
<dependencies> | ||
<dependency> | ||
<groupId>io.prometheus</groupId> | ||
<artifactId>prometheus-metrics-exposition-formats-no-protobuf</artifactId> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This dependency also has java classes that are missing now There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am sorry, but I didn't catch the point. The classes from I see all classes (using shaded correct "shaded" import statement) in |
||
<artifactId>prometheus-metrics-exposition-textformats</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.protobuf</groupId> | ||
<artifactId>protobuf-java</artifactId> | ||
<version>${protobuf-java.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.prometheus</groupId> | ||
<artifactId>prometheus-metrics-exposition-textformats</artifactId> | ||
<version>${project.version}</version> | ||
<scope>test</scope> | ||
<type>test-jar</type> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy-metrics-exposition-formats-main</id> | ||
<phase>validate</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>target/metrics-exposition-formats/src/main</outputDirectory> | ||
<resources> | ||
<resource> | ||
<directory>../prometheus-metrics-exposition-formats/src/main</directory> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>copy-metrics-exposition-formats-test</id> | ||
<phase>validate</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>target/metrics-exposition-formats/src/test</outputDirectory> | ||
<resources> | ||
<resource> | ||
<directory>../prometheus-metrics-exposition-formats/src/test</directory> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>build-helper-maven-plugin</artifactId> | ||
|
@@ -49,6 +97,31 @@ | |
<failIfNoMatch>true</failIfNoMatch> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>add-metrics-exposition-formats-main</id> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>add-source</goal> | ||
</goals> | ||
<configuration> | ||
<sources> | ||
<source>target/metrics-exposition-formats/src/main/java</source> | ||
<source>target/metrics-exposition-formats/src/main/generated</source> | ||
</sources> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>add-metrics-exposition-formats-test</id> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>add-test-source</goal> | ||
</goals> | ||
<configuration> | ||
<sources> | ||
<source>target/metrics-exposition-formats/src/test/java</source> | ||
</sources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
|
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.
This dependency also has java classes that are missing now
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.
I am sorry, but I didn't catch the point.
The classes from
prometheus-metrics-exporter-opentelemetry-no-otel
artifact (module directoryprometheus-metrics-exporter-opentelemetry
) are copied bymaven-resources-plugin
(see executioncopy-metrics-exporter-opentelemetry-main
) and then are relocated bymaven-shade-plugin
.I see all classes (using correct "shaded" import statements) in
io.prometheus:prometheus-metrics-exporter-opentelemetry
artifact.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.
now I get it - that's a really nice solution!