Repository navigation
Expand file tree
/
Copy pathpom.xml
More file actions
271 lines (265 loc) · 10.4 KB
/
Copy pathpom.xml
File metadata and controls
271 lines (265 loc) · 10.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>dev.pydantic</groupId>
<artifactId>opamp-javaagent-extension</artifactId>
<version>0.1.0-SNAPSHOT</version>
<name>OpAMP for the OpenTelemetry Java agent</name>
<description>An extension for the upstream OpenTelemetry Java agent: the agent joins an OpAMP server's
fleet and takes its SDK settings (sampling, what to send, which instrumentations) from it</description>
<url>https://github.com/pydantic/opamp-clients</url>
<licenses>
<license>
<name>MIT License</name>
<url>https://opensource.org/license/mit</url>
</license>
<!-- The compiled core it carries (in the client's classes, shaded in): not MIT, but its own license. -->
<license>
<name>Pydantic OpAMP Core Binary License</name>
<url>https://github.com/pydantic/opamp-clients/blob/main/licenses/core/LICENSE.txt</url>
<comments>LicenseRef-Pydantic-OpAMP-Core-Binary; in the jar at META-INF/opamp-core/, with THIRD_PARTY_NOTICES.txt</comments>
</license>
</licenses>
<developers>
<developer>
<id>pydantic</id>
<name>Pydantic</name>
<organization>Pydantic Services Inc.</organization>
<organizationUrl>https://pydantic.dev</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/pydantic/opamp-clients.git</connection>
<developerConnection>scm:git:ssh://git@github.com/pydantic/opamp-clients.git</developerConnection>
<url>https://github.com/pydantic/opamp-clients</url>
</scm>
<properties>
<maven.compiler.release>17</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- The agent release the extension is built and tested against. -->
<otel.agent.version>2.31.1</otel.agent.version>
<otel.sdk.version>1.66.0</otel.sdk.version>
<!-- The declarative configuration model the agent bundles: the model changes from one release to
the next, so this must be the agent's own. -->
<otel.declarative.version>1.65.0-alpha</otel.declarative.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-bom</artifactId>
<version>${otel.sdk.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Ours, shaded into the extension. -->
<dependency>
<groupId>dev.pydantic</groupId>
<artifactId>opamp-client</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>
<!-- The agent provides these. -->
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk-extension-autoconfigure-spi</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk-extension-autoconfigure</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.opentelemetry.javaagent</groupId>
<artifactId>opentelemetry-javaagent-extension-api</artifactId>
<version>${otel.agent.version}-alpha</version>
<scope>provided</scope>
</dependency>
<!-- Declarative configuration (otel.config.file): its customizer SPI and model. -->
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk-extension-declarative-config</artifactId>
<version>${otel.declarative.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>6.1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk-testing</artifactId>
<scope>test</scope>
</dependency>
<!-- Reads the SDK settings layer's shared test vectors (testdata/sdk-settings). -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.22.3</version>
<scope>test</scope>
</dependency>
<!-- The console exporters, for building an SDK from a configuration file in the tests. -->
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-exporter-logging</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<resources>
<!-- The version, as the inventory reports it; nothing else is filtered. -->
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>dev/pydantic/opamp/javaagent/version.properties</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>dev/pydantic/opamp/javaagent/version.properties</exclude>
</excludes>
</resource>
</resources>
<plugins>
<!-- Pinned, as in the client: an older Maven's default (3.1) compiles for Java 5 and
ignores maven.compiler.release. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.16.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.4</version>
</plugin>
<!-- The application's side of its own settings (docs/app-settings.md): a second, small jar,
opamp-javaagent-extension-<version>-app-settings.jar, holding dev.pydantic.opamp.AppSettings
and its listener alone, for the application to compile against and run with. The
extension fills it through the bootstrap class loader (AppSettingsSink). -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>app-settings</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>app-settings</classifier>
<includes>
<include>dev/pydantic/opamp/AppSettings.class</include>
<include>dev/pydantic/opamp/AppSettings$*.class</include>
<include>dev/pydantic/opamp/AppSettingsListener.class</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
<!-- One jar for -Dotel.javaagent.extensions: the client, its WebAssembly runtime and protobuf,
relocated so nothing collides with what the agent or the application loads. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<!-- The pom Maven Central gets (scripts/sdk_release.py): without the dependencies this
jar holds, so an application taking the app-settings jar takes nothing else. -->
<createDependencyReducedPom>true</createDependencyReducedPom>
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<relocations>
<relocation>
<pattern>com.google.protobuf</pattern>
<shadedPattern>dev.pydantic.opamp.javaagent.shaded.protobuf</shadedPattern>
</relocation>
<relocation>
<pattern>com.dylibso.chicory</pattern>
<shadedPattern>dev.pydantic.opamp.javaagent.shaded.chicory</shadedPattern>
</relocation>
</relocations>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>module-info.class</exclude>
<exclude>META-INF/versions/*/module-info.class</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<!-- What Maven Central takes beside the jar (scripts/sdk_release.py pack: -Prelease): its
sources and its javadoc. -->
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.11.2</version>
<configuration>
<doclint>none</doclint>
<quiet>true</quiet>
</configuration>
<executions>
<execution>
<id>javadoc</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>