Skip to content

Commit

Permalink
Start switch to bnd, integration-tests don't work yet and serviceload…
Browse files Browse the repository at this point in the history
…er is still missing
  • Loading branch information
royteeuwen committed Sep 28, 2024
1 parent 6697465 commit bb7706c
Show file tree
Hide file tree
Showing 21 changed files with 123 additions and 75 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-instrumentation-annotations</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.instrumentation.groupId}</opentelemetry.groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-instrumentation-api</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.instrumentation.groupId}</opentelemetry.groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-logback-appender-1.0</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.instrumentation.groupId}</opentelemetry.groupId>
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-java/opentelemetry-api-incubator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-api-incubator</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.groupId}</opentelemetry.groupId>
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-java/opentelemetry-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-api</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.groupId}</opentelemetry.groupId>
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-java/opentelemetry-context/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-context</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.groupId}</opentelemetry.groupId>
Expand Down
32 changes: 18 additions & 14 deletions opentelemetry-java/opentelemetry-exporter-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-exporter-common</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.groupId}</opentelemetry.groupId>
Expand All @@ -23,19 +23,23 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Import-Package>
io.grpc*;resolution:=optional, <!-- We are using okhttp as sender, which does not have a dependency on grpc -->
sun.misc;resolution:=optional, <!-- Unsafe is only used when it is available / enabled, see https://github.com/open-telemetry/opentelemetry-java/pull/6433 -->
*
</Import-Package>
</instructions>
</configuration>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<executions>
<execution>
<id>bnd-process</id>
<goals>
<goal>bnd-process</goal>
</goals>
<configuration>
<bnd><![CDATA[
# We are using okhttp as sender, which does not have a dependency on grpc
# Unsafe is only used when it is available / enabled, see https://github.com/open-telemetry/opentelemetry-java/pull/6433
Import-Package: io.grpc*;resolution:=optional,sun.misc;resolution:=optional,*
]]></bnd>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-java/opentelemetry-exporter-logging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-exporter-logging</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.groupId}</opentelemetry.groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-exporter-otlp-common</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.groupId}</opentelemetry.groupId>
Expand Down
34 changes: 23 additions & 11 deletions opentelemetry-java/opentelemetry-exporter-otlp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-exporter-otlp</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.groupId}</opentelemetry.groupId>
Expand All @@ -23,16 +23,22 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>
<extensions>true</extensions>
<configuration>
<instructions>
<!-- We are using okhttp as sender, which does not have a dependency on grpc -->
<Import-Package>io.grpc*;resolution:=optional,*</Import-Package>
</instructions>
</configuration>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<executions>
<execution>
<id>bnd-process</id>
<goals>
<goal>bnd-process</goal>
</goals>
<configuration>
<bnd><![CDATA[
# We are using okhttp as sender, which does not have a dependency on grpc
Import-Package: io.grpc*;resolution:=optional,*
]]></bnd>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand All @@ -42,6 +48,12 @@
<groupId>${opentelemetry.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${opentelemetry.version}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
28 changes: 17 additions & 11 deletions opentelemetry-java/opentelemetry-exporter-sender-okhttp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-exporter-sender-okhttp</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.groupId}</opentelemetry.groupId>
Expand All @@ -23,16 +23,22 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>
<extensions>true</extensions>
<configuration>
<instructions>
<!-- We are using okhttp as sender, which does not have a dependency on grpc -->
<Import-Package>io.grpc*;resolution:=optional,*</Import-Package>
</instructions>
</configuration>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<executions>
<execution>
<id>bnd-process</id>
<goals>
<goal>bnd-process</goal>
</goals>
<configuration>
<bnd><![CDATA[
# We are using okhttp as sender, which does not have a dependency on grpc
Import-Package: io.grpc*;resolution:=optional,*
]]></bnd>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-java/opentelemetry-sdk-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-sdk-common</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.groupId}</opentelemetry.groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-sdk-extension-autoconfigure-spi</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.groupId}</opentelemetry.groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-sdk-extension-autoconfigure</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.groupId}</opentelemetry.groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-sdk-extension-incubator</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.groupId}</opentelemetry.groupId>
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-java/opentelemetry-sdk-logs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-sdk-logs</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.groupId}</opentelemetry.groupId>
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-java/opentelemetry-sdk-metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-sdk-metrics</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.groupId}</opentelemetry.groupId>
Expand Down
28 changes: 17 additions & 11 deletions opentelemetry-java/opentelemetry-sdk-trace/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-sdk-trace</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.groupId}</opentelemetry.groupId>
Expand All @@ -23,16 +23,22 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>
<extensions>true</extensions>
<configuration>
<instructions>
<!-- Unsafe is only used when it is available / enabled, see https://github.com/open-telemetry/opentelemetry-java/pull/6433 -->
<Import-Package>sun.misc;resolution:=optional,*</Import-Package>
</instructions>
</configuration>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<executions>
<execution>
<id>bnd-process</id>
<goals>
<goal>bnd-process</goal>
</goals>
<configuration>
<bnd><![CDATA[
# Unsafe is only used when it is available / enabled, see https://github.com/open-telemetry/opentelemetry-java/pull/6433
Import-Package: sun.misc;resolution:=optional,*
]]></bnd>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-java/opentelemetry-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-sdk</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.java.groupId}</opentelemetry.groupId>
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-semconv/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>opentelemetry-semconv</artifactId>
<version>${opentelemetry.version}.000-SNAPSHOT</version>
<packaging>bundle</packaging>


<properties>
<opentelemetry.groupId>${opentelemetry.semconv.groupId}</opentelemetry.groupId>
Expand Down
44 changes: 32 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -115,17 +115,37 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>
<extensions>true</extensions>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<version>7.0.0</version>
<executions>
<execution>
<id>bnd-process</id>
<goals>
<goal>bnd-process</goal>
</goals>
<configuration>
<bnd><![CDATA[
Export-Package: ${opentelemetry.groupId}.*
# reproducible builds (https://github.com/bndtools/bnd/issues/3521)
-noextraheaders: true
-snapshot: SNAPSHOT
-includeresource: @*.jar;lib:=true
]]></bnd>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<instructions>
<Export-Package>${opentelemetry.groupId}.*</Export-Package>
<Embed-Dependency>*</Embed-Dependency>
<Bundle-Category>${project.organization.name}</Bundle-Category>
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
</instructions>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
<!-- Sonatype Release -->
Expand Down

0 comments on commit bb7706c

Please sign in to comment.