Skip to content

Commit 6782524

Browse files
committed
ci: Remove Java 6 support test on ci pipeline (+6 squashed commits)
Squashed commits: [394d432] fix: docs pipeline [8736629] docs: update maven artifactId and groupId to new one [15fa2e0] fix: Rename Java ArtifactId and GroupId to be compliant with new AWS standard. [ab1eadf] ci: Improve docs build phase and test dependencies [17598e8] fix: Fix Readme.md documentation and remove unecessary parts. [9a436e3] docs: Improving README file
1 parent 563ecdc commit 6782524

File tree

8 files changed

+111
-132
lines changed

8 files changed

+111
-132
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ assignees: ''
4141

4242
> [How to enable debug mode](https://awslabs.github.io/aws-lambda-powertools-java/#debug-mode)**
4343
44-
```python
44+
```java
4545
# paste logs here
4646
```

.github/workflows/build.yml

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
max-parallel: 4
1414
matrix:
1515
# test against latest update of each major Java version, as well as specific updates of LTS versions:
16-
java: [ 1.6, 6.0.83, 7, 7.0.181, 8, 8.0.192, 9.0.x, 10, 11.0.x, 11.0.3, 12, 13 ]
16+
java: [7, 7.0.181, 8, 8.0.192, 9.0.x, 10, 11.0.x, 11.0.3, 12, 13 ]
1717
name: Java ${{ matrix.java }}
1818
env:
1919
OS: ${{ matrix.os }}
@@ -25,23 +25,4 @@ jobs:
2525
with:
2626
java-version: ${{ matrix.java }}
2727
- name: Build with Maven
28-
run: mvn -B package --file pom.xml -P release-github
29-
- name: Publish to GitHub Packages Apache Maven
30-
run: mvn deploy -P release-github
31-
env:
32-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GITHUB_TOKEN is the default env for the password
33-
34-
35-
# - name: Set up Apache Maven Central
36-
# uses: actions/setup-java@v1
37-
# with: # running setup-java again overwrites the settings.xml
38-
# java-version: 1.8
39-
# server-id: maven # Value of the distributionManagement/repository/id field of the pom.xml
40-
# server-username: MAVEN_USERNAME # env variable for username in deploy
41-
# server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
42-
#
43-
# - name: Publish to Apache Maven Central
44-
# run: mvn deploy -P release-maven
45-
# env:
46-
# MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
47-
# MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
28+
run: mvn -B package --file pom.xml -P release

.github/workflows/deploy.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
name: Deploy
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up JDK 1.8
16+
uses: actions/setup-java@v1
17+
with:
18+
java-version: 1.8
19+
- name: Publish
20+
run: mvn deploy -P release
21+
22+
23+
# - name: Set up Apache Maven Central
24+
# uses: actions/setup-java@v1
25+
# with: # running setup-java again overwrites the settings.xml
26+
# java-version: 1.8
27+
# server-id: maven # Value of the distributionManagement/repository/id field of the pom.xml
28+
# server-username: MAVEN_USERNAME # env variable for username in deploy
29+
# server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
30+
#
31+
# - name: Publish to Apache Maven Central
32+
# run: mvn deploy -P release-maven
33+
# env:
34+
# MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
35+
# MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}

.github/workflows/docs.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
1414
docs:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v1
17+
- uses: actions/checkout@v2
18+
- uses: borales/actions-yarn@v2.0.0
1819
- name: Set up Python
1920
uses: actions/setup-python@v1
2021
with:
@@ -24,6 +25,9 @@ jobs:
2425
run: |
2526
echo ::set-env name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
2627
echo ::set-env name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
28+
29+
- name: install dependencies
30+
run: make dev-docs
2731
- name: Build docs website
2832
run: make build-docs-website
2933
- name: Deploy all docs

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11

22
dev-docs:
3-
cd docs && npm install
3+
cd docs && yarn install
44

55
build-docs:
66
@$(MAKE) build-docs-website
77

88
build-docs-website: dev-docs
99
mkdir -p dist
10-
cd docs && npm run build
10+
cd docs && yarn build
1111
cp -R docs/public/* dist/
1212

1313
docs-local:
14-
cd docs && npm run start
14+
cd docs && yarn start
1515

1616
test:
1717
mvn test

README.md

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,45 @@
1-
## My Project
1+
# Lambda Powertools
22

3-
TODO: Fill this README out!
3+
![aws provider](https://img.shields.io/badge/provider-AWS-orange?logo=amazon-aws&color=ff9900)
44

5-
Be sure to:
65

7-
* Change the title in this README
8-
* Edit your repository description on GitHub
6+
A suite of utilities for AWS Lambda Functions that makes tracing with AWS X-Ray, structured logging and creating custom metrics asynchronously easier.
97

10-
## Security
8+
**[📜Documentation](https://awslabs.github.io/aws-lambda-powertools-java/)** | **[Feature request](https://github.com/awslabs/aws-lambda-powertools-java/issues/new?assignees=&labels=feature-request%2C+triage&template=feature_request.md&title=)** | **[🐛Bug Report](https://github.com/awslabs/aws-lambda-powertools-java/issues/new?assignees=&labels=bug%2C+triage&template=bug_report.md&title=)** | **[Detailed blog post](https://aws.amazon.com/blogs/opensource/simplifying-serverless-best-practices-with-lambda-powertools/)**
119

12-
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
10+
### Installation
11+
12+
Powertools is available in Maven Central. You can use your favourite dependency management tool to install it
13+
14+
* [maven](https://maven.apache.org/):
15+
```xml
16+
<dependencies>
17+
...
18+
<dependency>
19+
<groupId>software.aws.lambda</groupId>
20+
<artifactId>aws-lambda-powertools-java</artifactId>
21+
<version>YOUR_REQUIRED_VERSION</version>
22+
</dependency>
23+
...
24+
</dependencies>
25+
```
26+
* [gradle](https://gradle.org/):
27+
```
28+
repositories {
29+
mavenCentral()
30+
}
31+
32+
dependencies {
33+
powertools 'software.aws.lambda:aws-lambda-powertools-java:YOUR_REQUIRED_VERSION'
34+
}
35+
```
36+
37+
## Credits
38+
39+
* Structured logging initial implementation from [aws-lambda-logging](https://gitlab.com/hadrien/aws_lambda_logging)
40+
* Powertools idea [DAZN Powertools](https://github.com/getndazn/dazn-lambda-powertools/)
41+
* [Gatsby Apollo Theme for Docs](https://github.com/apollographql/gatsby-theme-apollo/tree/master/packages/gatsby-theme-apollo-docs)
1342

1443
## License
1544

1645
This library is licensed under the MIT-0 License. See the LICENSE file.
17-

docs/content/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Powertools is available in Maven Central. You can use your favourite dependency
1414
<dependencies>
1515
...
1616
<dependency>
17-
<groupId>com.amazonaws</groupId>
17+
<groupId>software.aws.lambda</groupId>
1818
<artifactId>aws-lambda-powertools-java</artifactId>
1919
<version>YOUR_REQUIRED_VERSION</version>
2020
</dependency>
@@ -28,7 +28,7 @@ repositories {
2828
}
2929
3030
dependencies {
31-
powertools 'com.amazonaws:aws-lambda-powertools-java:YOUR_REQUIRED_VERSION'
31+
powertools 'software.aws.lambda:aws-lambda-powertools-java:YOUR_REQUIRED_VERSION'
3232
}
3333
```
3434

pom.xml

Lines changed: 27 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

7-
<groupId>com.amazonaws</groupId>
7+
<groupId>software.aws.lambda</groupId>
88
<artifactId>aws-lambda-powertools-java</artifactId>
99
<version>0.1.0-SNAPSHOT</version>
1010
<packaging>jar</packaging>
@@ -42,18 +42,27 @@
4242
</properties>
4343

4444
<distributionManagement>
45+
<snapshotRepository>
46+
<id>ossrh</id>
47+
<url>https://aws.oss.sonatype.org/content/repositories/snapshots</url>
48+
</snapshotRepository>
4549
<repository>
46-
<id>github</id>
47-
<name>GitHub OWNER Apache Maven Packages</name>
48-
<url>https://maven.pkg.github.com/awslabs/aws-lambda-powertools-java</url>
50+
<id>ossrh</id>
51+
<url>https://aws.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
4952
</repository>
5053
</distributionManagement>
5154

5255
<dependencies>
5356
<dependency>
54-
<groupId>junit</groupId>
55-
<artifactId>junit</artifactId>
56-
<version>4.10</version>
57+
<groupId>org.junit.jupiter</groupId>
58+
<artifactId>junit-jupiter-api</artifactId>
59+
<version>5.6.2</version>
60+
<scope>test</scope>
61+
</dependency>
62+
<dependency>
63+
<groupId>org.junit.jupiter</groupId>
64+
<artifactId>junit-jupiter-engine</artifactId>
65+
<version>5.6.2</version>
5766
<scope>test</scope>
5867
</dependency>
5968
</dependencies>
@@ -63,56 +72,11 @@
6372
<id>dev</id>
6473
<build>
6574
<plugins>
66-
<plugin>
67-
<groupId>org.jacoco</groupId>
68-
<artifactId>jacoco-maven-plugin</artifactId>
69-
<version>0.8.2</version>
70-
<executions>
71-
<execution>
72-
<goals>
73-
<goal>prepare-agent</goal>
74-
</goals>
75-
</execution>
76-
<!-- attached to Maven test phase -->
77-
<execution>
78-
<id>report</id>
79-
<phase>test</phase>
80-
<goals>
81-
<goal>report</goal>
82-
</goals>
83-
</execution>
84-
</executions>
85-
</plugin>
8675
<plugin>
8776
<groupId>org.apache.maven.plugins</groupId>
88-
<artifactId>maven-javadoc-plugin</artifactId>
89-
<version>2.9.1</version>
90-
<configuration>
91-
<additionalparam>-Xdoclint:none</additionalparam>
92-
</configuration>
93-
<executions>
94-
<execution>
95-
<id>attach-javadocs</id>
96-
<goals>
97-
<goal>jar</goal>
98-
</goals>
99-
</execution>
100-
</executions>
77+
<artifactId>maven-surefire-plugin</artifactId>
78+
<version>2.22.2</version>
10179
</plugin>
102-
</plugins>
103-
</build>
104-
</profile>
105-
<profile>
106-
<id>release-github</id>
107-
<distributionManagement>
108-
<repository>
109-
<id>github</id>
110-
<name>GitHub OWNER Apache Maven Packages</name>
111-
<url>https://maven.pkg.github.com/awslabs/aws-lambda-powertools-java</url>
112-
</repository>
113-
</distributionManagement>
114-
<build>
115-
<plugins>
11680
<plugin>
11781
<groupId>org.jacoco</groupId>
11882
<artifactId>jacoco-maven-plugin</artifactId>
@@ -133,19 +97,6 @@
13397
</execution>
13498
</executions>
13599
</plugin>
136-
<plugin>
137-
<groupId>org.apache.maven.plugins</groupId>
138-
<artifactId>maven-source-plugin</artifactId>
139-
<version>2.2.1</version>
140-
<executions>
141-
<execution>
142-
<id>attach-sources</id>
143-
<goals>
144-
<goal>jar-no-fork</goal>
145-
</goals>
146-
</execution>
147-
</executions>
148-
</plugin>
149100
<plugin>
150101
<groupId>org.apache.maven.plugins</groupId>
151102
<artifactId>maven-javadoc-plugin</artifactId>
@@ -162,38 +113,18 @@
162113
</execution>
163114
</executions>
164115
</plugin>
165-
<plugin>
166-
<groupId>org.apache.maven.plugins</groupId>
167-
<artifactId>maven-gpg-plugin</artifactId>
168-
<version>1.5</version>
169-
<executions>
170-
<execution>
171-
<id>sign-artifacts</id>
172-
<phase>verify</phase>
173-
<goals>
174-
<goal>sign</goal>
175-
</goals>
176-
</execution>
177-
</executions>
178-
</plugin>
179-
<plugin>
180-
<groupId>org.sonatype.plugins</groupId>
181-
<artifactId>nexus-staging-maven-plugin</artifactId>
182-
<version>1.6.3</version>
183-
<extensions>true</extensions>
184-
<configuration>
185-
<serverId>sonatype-nexus-staging</serverId>
186-
<nexusUrl>https://aws.oss.sonatype.org/</nexusUrl>
187-
<autoReleaseAfterClose>false</autoReleaseAfterClose>
188-
</configuration>
189-
</plugin>
190116
</plugins>
191117
</build>
192118
</profile>
193119
<profile>
194-
<id>release-maven</id>
120+
<id>release</id>
195121
<build>
196122
<plugins>
123+
<plugin>
124+
<groupId>org.apache.maven.plugins</groupId>
125+
<artifactId>maven-surefire-plugin</artifactId>
126+
<version>2.22.1</version>
127+
</plugin>
197128
<plugin>
198129
<groupId>org.jacoco</groupId>
199130
<artifactId>jacoco-maven-plugin</artifactId>
@@ -246,7 +177,7 @@
246177
<plugin>
247178
<groupId>org.apache.maven.plugins</groupId>
248179
<artifactId>maven-gpg-plugin</artifactId>
249-
<version>1.5</version>
180+
<version>1.6</version>
250181
<executions>
251182
<execution>
252183
<id>sign-artifacts</id>
@@ -260,11 +191,11 @@
260191
<plugin>
261192
<groupId>org.sonatype.plugins</groupId>
262193
<artifactId>nexus-staging-maven-plugin</artifactId>
263-
<version>1.6.3</version>
194+
<version>1.6.8</version>
264195
<extensions>true</extensions>
265196
<configuration>
266197
<serverId>sonatype-nexus-staging</serverId>
267-
<nexusUrl>https://aws.oss.sonatype.org/</nexusUrl>
198+
<nexusUrl>https://aws.oss.sonatype.org</nexusUrl>
268199
<autoReleaseAfterClose>false</autoReleaseAfterClose>
269200
</configuration>
270201
</plugin>

0 commit comments

Comments
 (0)