Skip to content

Commit aa3f786

Browse files
committed
feat(otel): Prepare otel-plugin for independent publishing to Maven Central
1 parent cc076e4 commit aa3f786

6 files changed

Lines changed: 54 additions & 6 deletions

File tree

.github/scripts/maven_publish.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,6 @@ echo "=== Step 3: Deploy to Maven Central ==="
4444

4545
mvn clean deploy -s "${SETTINGS_FILE}" -pl sdk -P publishing -DskipTests --no-transfer-progress
4646
mvn clean deploy -s "${SETTINGS_FILE}" -pl sdk-testing -P publishing -DskipTests --no-transfer-progress
47+
mvn clean deploy -s "${SETTINGS_FILE}" -pl otel-plugin -P publishing -DskipTests --no-transfer-progress
4748

4849
echo "=== Release ${RELEASE_VERSION} published successfully! ==="

.github/workflows/release_maven.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ on:
1717
required: false
1818
default: false
1919
type: boolean
20+
otel_plugin_version:
21+
description: 'OTel plugin release version (e.g. 0.1.0). Leave empty to skip otel-plugin release.'
22+
required: false
23+
type: string
24+
otel_next_version:
25+
description: 'OTel plugin next development version (e.g. 0.2.0-SNAPSHOT). Required if otel_plugin_version is set.'
26+
required: false
27+
type: string
2028

2129
permissions:
2230
contents: write
@@ -269,6 +277,12 @@ jobs:
269277
- name: Set release version
270278
run: mvn -q versions:set -DnewVersion=${{ github.event.inputs.release_version }} -DgenerateBackupPoms=false
271279

280+
- name: Set otel-plugin release version
281+
if: github.event.inputs.otel_plugin_version != ''
282+
run: |
283+
mvn -q versions:set -DnewVersion=${{ github.event.inputs.otel_plugin_version }} -DgenerateBackupPoms=false -pl otel-plugin
284+
mvn -q versions:set-property -Dproperty=otel.plugin.version -DnewVersion=${{ github.event.inputs.otel_plugin_version }} -DgenerateBackupPoms=false -N
285+
272286
- name: Commit release version
273287
run: |
274288
git config user.email "${{ github.actor }}+github-actions[bot]@users.noreply.github.com"
@@ -294,6 +308,7 @@ jobs:
294308
files: |
295309
sdk/target/aws-durable-execution-sdk-java-${{ github.event.inputs.release_version }}.jar
296310
sdk-testing/target/aws-durable-execution-sdk-java-testing-${{ github.event.inputs.release_version }}.jar
311+
${{ github.event.inputs.otel_plugin_version != '' && format('otel-plugin/target/aws-durable-execution-sdk-java-plugin-otel-{0}.jar', github.event.inputs.otel_plugin_version) || '' }}
297312
298313
- name: Sign and publish
299314
run: bash .github/scripts/maven_publish.sh
@@ -307,6 +322,12 @@ jobs:
307322
- name: Set next development version
308323
run: mvn -q versions:set -DnewVersion=${{ github.event.inputs.next_version }} -DgenerateBackupPoms=false
309324

325+
- name: Set otel-plugin next development version
326+
if: github.event.inputs.otel_next_version != ''
327+
run: |
328+
mvn -q versions:set -DnewVersion=${{ github.event.inputs.otel_next_version }} -DgenerateBackupPoms=false -pl otel-plugin
329+
mvn -q versions:set-property -Dproperty=otel.plugin.version -DnewVersion=${{ github.event.inputs.otel_next_version }} -DgenerateBackupPoms=false -N
330+
310331
- name: Commit release version
311332
run: |
312333
git add .

examples/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
<!-- OTel Plugin -->
3535
<dependency>
3636
<groupId>software.amazon.lambda.durable</groupId>
37-
<artifactId>aws-durable-execution-sdk-java-otel</artifactId>
38-
<version>${project.version}</version>
37+
<artifactId>aws-durable-execution-sdk-java-plugin-otel</artifactId>
38+
<version>${otel.plugin.version}</version>
3939
</dependency>
4040

4141
<!-- OpenTelemetry SDK (required for OTel example) -->

otel-plugin/pom.xml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
<version>1.2.2-SNAPSHOT</version>
1111
</parent>
1212

13-
<artifactId>aws-durable-execution-sdk-java-otel</artifactId>
13+
<artifactId>aws-durable-execution-sdk-java-plugin-otel</artifactId>
14+
<version>0.1.0-SNAPSHOT</version>
1415
<name>AWS Lambda Durable Execution SDK OpenTelemetry Plugin</name>
1516
<description>OpenTelemetry instrumentation plugin for AWS Lambda Durable Execution SDK</description>
1617

@@ -23,7 +24,7 @@
2324
<dependency>
2425
<groupId>software.amazon.lambda.durable</groupId>
2526
<artifactId>aws-durable-execution-sdk-java</artifactId>
26-
<version>${project.version}</version>
27+
<version>${project.parent.version}</version>
2728
</dependency>
2829

2930
<!-- OpenTelemetry API (compile dependency — users bring the SDK implementation) -->
@@ -93,6 +94,30 @@
9394
<groupId>com.diffplug.spotless</groupId>
9495
<artifactId>spotless-maven-plugin</artifactId>
9596
</plugin>
97+
<plugin>
98+
<groupId>org.apache.maven.plugins</groupId>
99+
<artifactId>maven-source-plugin</artifactId>
100+
<executions>
101+
<execution>
102+
<id>attach-sources</id>
103+
<goals>
104+
<goal>jar-no-fork</goal>
105+
</goals>
106+
</execution>
107+
</executions>
108+
</plugin>
109+
<plugin>
110+
<groupId>org.apache.maven.plugins</groupId>
111+
<artifactId>maven-javadoc-plugin</artifactId>
112+
<executions>
113+
<execution>
114+
<id>attach-javadocs</id>
115+
<goals>
116+
<goal>jar</goal>
117+
</goals>
118+
</execution>
119+
</executions>
120+
</plugin>
96121
</plugins>
97122
</build>
98123
</project>

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
<slf4j.version>2.0.18</slf4j.version>
5959
<jacoco.version>0.8.15</jacoco.version>
6060
<spotless.version>3.7.0</spotless.version>
61+
<otel.plugin.version>0.1.0-SNAPSHOT</otel.plugin.version>
6162
</properties>
6263

6364
<dependencyManagement>

sdk-integration-tests/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
</dependency>
3939
<dependency>
4040
<groupId>software.amazon.lambda.durable</groupId>
41-
<artifactId>aws-durable-execution-sdk-java-otel</artifactId>
42-
<version>${project.version}</version>
41+
<artifactId>aws-durable-execution-sdk-java-plugin-otel</artifactId>
42+
<version>${otel.plugin.version}</version>
4343
<scope>test</scope>
4444
</dependency>
4545
<dependency>

0 commit comments

Comments
 (0)