diff --git a/.github/workflows/docs-v2-snapshot.yml b/.github/workflows/docs-v2-snapshot.yml
new file mode 100644
index 000000000..55803c737
--- /dev/null
+++ b/.github/workflows/docs-v2-snapshot.yml
@@ -0,0 +1,40 @@
+name: Docs
+on:
+ push:
+ branches:
+ - v2
+ workflow_dispatch: {}
+
+permissions:
+ id-token: write
+ contents: write
+ pages: write
+
+jobs:
+ docs:
+ runs-on: ubuntu-latest
+ environment: Docs
+ steps:
+ - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
+ - name: Set up Python
+ uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1
+ with:
+ python-version: "3.8"
+ - name: Capture branch and tag
+ id: branch_name
+ run: |
+ echo "SOURCE_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
+ echo "SOURCE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
+ - name: Build docs website
+ run: |
+ make build-docs-website
+ - name: Configure AWS credentials
+ uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef
+ with:
+ aws-region: us-east-1
+ role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}
+ - name: Deploy Docs
+ run: |
+ aws s3 sync \
+ dist \
+ s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-java/preview/
diff --git a/.github/workflows/publish-v2-snapshot.yml b/.github/workflows/publish-v2-snapshot.yml
new file mode 100644
index 000000000..d5a683261
--- /dev/null
+++ b/.github/workflows/publish-v2-snapshot.yml
@@ -0,0 +1,29 @@
+name: Publish v2
+on:
+ push:
+ branches:
+ - v2
+ workflow_dispatch: {}
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ environment: snapshot
+ steps:
+ - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
+ - name: Set up Maven Central Repository
+ uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
+ with:
+ distribution: 'corretto'
+ java-version: 11
+ server-id: ossrh
+ server-username: MAVEN_USERNAME
+ server-password: MAVEN_PASSWORD
+ # TODO: use environments https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment
+ gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} # Value of the GPG private key to import
+ gpg-passphrase: GPG_PASSPHRASE # env variable for GPG private key passphrase
+ - name: Publish package
+ run: mvn -Prelease clean validate deploy -DskipTests # We use validate here to run maven enforcer, to make sure we are only publishing SNAPSHOT builds
+ env:
+ MAVEN_USERNAME: ${{ secrets.SNAPSHOT_PUBLISH_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.SNAPSHOT_PUBLISH_PASSWORD }}
+ GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 03f04e0f4..d2d47b308 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -27,8 +27,8 @@ jobs:
- name: Publish package
run: mvn -Prelease clean deploy -DskipTests
env:
- MAVEN_USERNAME: ${{ secrets.OSSRH_JIRA_USERNAME }}
- MAVEN_PASSWORD: ${{ secrets.OSSRH_JIRA_PASSWORD }}
+ MAVEN_USERNAME: ${{ secrets.SNAPSHOT_PUBLISH_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.SNAPSHOT_PUBLISH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Close issues related to this release
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
diff --git a/docs/index.md b/docs/index.md
index 06c9beb6d..1c5dfac85 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -3,7 +3,13 @@ title: Homepage
description: Powertools for AWS Lambda (Java)
---
-  
+  
+
+???+ warning
+ You are browsing the documentation for Powertools for AWS Lambda (Java) - v2. This is a snapshot release and not stable!
+ Check out our stable [v1](https://docs.powertools.aws.dev/lambda/java/) documentation if this is not what you wanted.
+ The v2 maven snapshot repository can be found [here](https://aws.oss.sonatype.org/content/repositories/snapshots/software/amazon/lambda/) .
Powertools for AWS Lambda (Java) is a suite of utilities for AWS Lambda Functions that makes tracing with AWS X-Ray, structured logging and creating custom metrics asynchronously easier.
diff --git a/examples/powertools-examples-core-utilities/sam/pom.xml b/examples/powertools-examples-core-utilities/sam/pom.xml
index 75821f851..86fa52425 100644
--- a/examples/powertools-examples-core-utilities/sam/pom.xml
+++ b/examples/powertools-examples-core-utilities/sam/pom.xml
@@ -113,6 +113,15 @@
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+ 3.1.2
+
+ true
+
+
diff --git a/examples/powertools-examples-core-utilities/serverless/pom.xml b/examples/powertools-examples-core-utilities/serverless/pom.xml
index a83050b0a..0b5b06152 100644
--- a/examples/powertools-examples-core-utilities/serverless/pom.xml
+++ b/examples/powertools-examples-core-utilities/serverless/pom.xml
@@ -114,6 +114,15 @@
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+ 3.1.2
+
+ true
+
+
diff --git a/mkdocs.yml b/mkdocs.yml
index b7f793e18..aa7b0e314 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -1,5 +1,5 @@
-site_name: Powertools for AWS Lambda (Java)
-site_description: Powertools for AWS Lambda (Java)
+site_name: Powertools for AWS Lambda (Java) Preview
+site_description: Powertools for AWS Lambda (Java) Preview
site_author: Amazon Web Services
site_url: https://docs.powertools.aws.dev/lambda-java/
nav:
@@ -85,7 +85,7 @@ extra_javascript:
extra:
powertools:
- version: 2.0.0 # to update after each release (we do not want snapshot version here)
+ version: 2.0.0-SNAPSHOT
repo_url: https://github.com/aws-powertools/powertools-lambda-java
edit_uri: edit/main/docs
diff --git a/pom.xml b/pom.xml
index 8055c41a8..2f4e327e6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -97,6 +97,13 @@
${maven.multiModuleProjectDirectory}
+
+
+ ossrh
+ https://aws.oss.sonatype.org/content/repositories/snapshots
+
+
+
@@ -457,6 +464,28 @@
release
+
+ org.apache.maven.plugins
+ maven-enforcer-plugin
+ 3.5.0
+
+
+ enforce-snapshot-versions
+ validate
+
+ enforce
+
+
+
+
+ Release build should not have snapshot dependencies!
+
+
+ true
+
+
+
+
org.apache.maven.plugins
maven-gpg-plugin
diff --git a/powertools-idempotency/powertools-idempotency-dynamodb/dynamodb-local-metadata.json b/powertools-idempotency/powertools-idempotency-dynamodb/dynamodb-local-metadata.json
new file mode 100644
index 000000000..c76c2c76d
--- /dev/null
+++ b/powertools-idempotency/powertools-idempotency-dynamodb/dynamodb-local-metadata.json
@@ -0,0 +1 @@
+{"installationId":"e43b8515-8484-485c-8315-bead4568972b","telemetryEnabled":"true"}
\ No newline at end of file
diff --git a/spotbugs-exclude.xml b/spotbugs-exclude.xml
index a4eb3756f..ee44f7b4d 100644
--- a/spotbugs-exclude.xml
+++ b/spotbugs-exclude.xml
@@ -8,6 +8,22 @@
https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html
-->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+