Skip to content

Commit 4a50e70

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

3 files changed

Lines changed: 45 additions & 1 deletion

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: 17 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,10 @@ 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: mvn -q versions:set -DnewVersion=${{ github.event.inputs.otel_plugin_version }} -DgenerateBackupPoms=false -pl otel-plugin
283+
272284
- name: Commit release version
273285
run: |
274286
git config user.email "${{ github.actor }}+github-actions[bot]@users.noreply.github.com"
@@ -294,6 +306,7 @@ jobs:
294306
files: |
295307
sdk/target/aws-durable-execution-sdk-java-${{ github.event.inputs.release_version }}.jar
296308
sdk-testing/target/aws-durable-execution-sdk-java-testing-${{ github.event.inputs.release_version }}.jar
309+
${{ github.event.inputs.otel_plugin_version != '' && format('otel-plugin/target/aws-durable-execution-sdk-java-otel-{0}.jar', github.event.inputs.otel_plugin_version) || '' }}
297310
298311
- name: Sign and publish
299312
run: bash .github/scripts/maven_publish.sh
@@ -307,6 +320,10 @@ jobs:
307320
- name: Set next development version
308321
run: mvn -q versions:set -DnewVersion=${{ github.event.inputs.next_version }} -DgenerateBackupPoms=false
309322

323+
- name: Set otel-plugin next development version
324+
if: github.event.inputs.otel_next_version != ''
325+
run: mvn -q versions:set -DnewVersion=${{ github.event.inputs.otel_next_version }} -DgenerateBackupPoms=false -pl otel-plugin
326+
310327
- name: Commit release version
311328
run: |
312329
git add .

otel-plugin/pom.xml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,21 @@
1111
</parent>
1212

1313
<artifactId>aws-durable-execution-sdk-java-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

1718
<properties>
1819
<opentelemetry.version>1.63.0</opentelemetry.version>
20+
<durable.sdk.version>1.2.1</durable.sdk.version>
1921
</properties>
2022

2123
<dependencies>
2224
<!-- Durable Execution SDK (for plugin interface) -->
2325
<dependency>
2426
<groupId>software.amazon.lambda.durable</groupId>
2527
<artifactId>aws-durable-execution-sdk-java</artifactId>
26-
<version>${project.version}</version>
28+
<version>[${durable.sdk.version},)</version>
2729
</dependency>
2830

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

0 commit comments

Comments
 (0)