Skip to content

Commit 62ccaf9

Browse files
authored
chore(v2): clean examples (#1495)
1 parent b05a16c commit 62ccaf9

File tree

4 files changed

+86
-149
lines changed

4 files changed

+86
-149
lines changed

examples/powertools-examples-core-utilities/cdk/app/pom.xml

+1-8
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44

5+
<name>Powertools for AWS Lambda (Java) library Examples - Core Utilities (logging, tracing, metrics) with CDK</name>
56
<groupId>software.amazon.lambda.examples</groupId>
67
<!-- TODO TODO TODO this should build from SNAPSHOT, but it doesn't, because the snapshots
78
don't appear in the docker environment CDK builds it in in our CDK tests. How to procede? V2 blocker -->
89
<version>1.17.0</version>
910
<artifactId>powertools-examples-core-utilities-cdk</artifactId>
1011
<packaging>jar</packaging>
11-
<name>Powertools for AWS Lambda (Java) library Examples - Core</name>
1212

1313
<properties>
1414
<log4j.version>2.20.0</log4j.version>
@@ -58,13 +58,6 @@
5858
<artifactId>aspectjrt</artifactId>
5959
<version>${aspectj.version}</version>
6060
</dependency>
61-
62-
<dependency>
63-
<groupId>junit</groupId>
64-
<artifactId>junit</artifactId>
65-
<version>4.13.2</version>
66-
<scope>test</scope>
67-
</dependency>
6861
</dependencies>
6962

7063
<build>

examples/powertools-examples-core-utilities/sam/pom.xml

+66-72
Original file line numberDiff line numberDiff line change
@@ -56,81 +56,75 @@
5656
<artifactId>aspectjrt</artifactId>
5757
<version>${aspectj.version}</version>
5858
</dependency>
59-
60-
<dependency>
61-
<groupId>junit</groupId>
62-
<artifactId>junit</artifactId>
63-
<version>4.13.2</version>
64-
<scope>test</scope>
65-
</dependency>
6659
</dependencies>
6760

6861
<build>
69-
<plugins>
70-
<plugin>
71-
<groupId>dev.aspectj</groupId>
72-
<artifactId>aspectj-maven-plugin</artifactId>
73-
<version>1.13.1</version>
74-
<configuration>
75-
<source>${maven.compiler.source}</source>
76-
<target>${maven.compiler.target}</target>
77-
<complianceLevel>${maven.compiler.target}</complianceLevel>
78-
<aspectLibraries>
79-
<aspectLibrary>
80-
<groupId>software.amazon.lambda</groupId>
81-
<artifactId>powertools-tracing</artifactId>
82-
</aspectLibrary>
83-
<aspectLibrary>
84-
<groupId>software.amazon.lambda</groupId>
85-
<artifactId>powertools-logging</artifactId>
86-
</aspectLibrary>
87-
<aspectLibrary>
88-
<groupId>software.amazon.lambda</groupId>
89-
<artifactId>powertools-metrics</artifactId>
90-
</aspectLibrary>
91-
</aspectLibraries>
92-
</configuration>
93-
<executions>
94-
<execution>
95-
<goals>
96-
<goal>compile</goal>
97-
</goals>
98-
</execution>
99-
</executions>
100-
<dependencies>
101-
<dependency>
102-
<groupId>org.aspectj</groupId>
103-
<artifactId>aspectjtools</artifactId>
104-
<version>${aspectj.version}</version>
105-
</dependency>
106-
</dependencies>
107-
</plugin>
108-
<plugin>
109-
<groupId>org.apache.maven.plugins</groupId>
110-
<artifactId>maven-shade-plugin</artifactId>
111-
<version>3.5.0</version>
112-
<executions>
113-
<execution>
114-
<phase>package</phase>
115-
<goals>
116-
<goal>shade</goal>
117-
</goals>
118-
<configuration>
119-
<transformers>
120-
<transformer implementation="org.apache.logging.log4j.maven.plugins.shade.transformer.Log4j2PluginCacheFileTransformer"/>
121-
</transformers>
122-
</configuration>
123-
</execution>
124-
</executions>
125-
<dependencies>
126-
<dependency>
127-
<groupId>org.apache.logging.log4j</groupId>
128-
<artifactId>log4j-transform-maven-shade-plugin-extensions</artifactId>
129-
<version>0.1.0</version>
130-
</dependency>
131-
</dependencies>
132-
</plugin>
133-
</plugins>
62+
<plugins>
63+
<plugin>
64+
<groupId>dev.aspectj</groupId>
65+
<artifactId>aspectj-maven-plugin</artifactId>
66+
<version>1.13.1</version>
67+
<configuration>
68+
<source>${maven.compiler.source}</source>
69+
<target>${maven.compiler.target}</target>
70+
<complianceLevel>${maven.compiler.target}</complianceLevel>
71+
<aspectLibraries>
72+
<aspectLibrary>
73+
<groupId>software.amazon.lambda</groupId>
74+
<artifactId>powertools-tracing</artifactId>
75+
</aspectLibrary>
76+
<aspectLibrary>
77+
<groupId>software.amazon.lambda</groupId>
78+
<artifactId>powertools-logging</artifactId>
79+
</aspectLibrary>
80+
<aspectLibrary>
81+
<groupId>software.amazon.lambda</groupId>
82+
<artifactId>powertools-metrics</artifactId>
83+
</aspectLibrary>
84+
</aspectLibraries>
85+
</configuration>
86+
<executions>
87+
<execution>
88+
<goals>
89+
<goal>compile</goal>
90+
</goals>
91+
</execution>
92+
</executions>
93+
<dependencies>
94+
<dependency>
95+
<groupId>org.aspectj</groupId>
96+
<artifactId>aspectjtools</artifactId>
97+
<version>${aspectj.version}</version>
98+
</dependency>
99+
</dependencies>
100+
</plugin>
101+
<plugin>
102+
<groupId>org.apache.maven.plugins</groupId>
103+
<artifactId>maven-shade-plugin</artifactId>
104+
<version>3.5.0</version>
105+
<executions>
106+
<execution>
107+
<phase>package</phase>
108+
<goals>
109+
<goal>shade</goal>
110+
</goals>
111+
<configuration>
112+
<createDependencyReducedPom>false</createDependencyReducedPom>
113+
<transformers>
114+
<transformer implementation="org.apache.logging.log4j.maven.plugins.shade.transformer.Log4j2PluginCacheFileTransformer"/>
115+
</transformers>
116+
</configuration>
117+
</execution>
118+
</executions>
119+
<dependencies>
120+
<dependency>
121+
<groupId>org.apache.logging.log4j</groupId>
122+
<artifactId>log4j-transform-maven-shade-plugin-extensions</artifactId>
123+
<version>0.1.0</version>
124+
</dependency>
125+
</dependencies>
126+
</plugin>
127+
</plugins>
134128
</build>
135129
<profiles>
136130
<!-- Use a profile to enforce AspectJ version 1.9.7 if we are Java 1.8 otherwise we'll get class

examples/powertools-examples-core-utilities/serverless/pom.xml

+1-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44

5-
<name>Powertools for AWS Lambda (Java) library Examples - Core Utilities (logging, tracing, metrics) with SAM</name>
5+
<name>Powertools for AWS Lambda (Java) library Examples - Core Utilities (logging, tracing, metrics) with Serverless</name>
66
<groupId>software.amazon.lambda.examples</groupId>
77
<version>2.0.0-SNAPSHOT</version>
88
<artifactId>powertools-examples-core-utilities-serverless</artifactId>
@@ -56,13 +56,6 @@
5656
<artifactId>aspectjrt</artifactId>
5757
<version>${aspectj.version}</version>
5858
</dependency>
59-
60-
<dependency>
61-
<groupId>junit</groupId>
62-
<artifactId>junit</artifactId>
63-
<version>4.13.2</version>
64-
<scope>test</scope>
65-
</dependency>
6659
</dependencies>
6760

6861
<build>

examples/powertools-examples-core-utilities/terraform/pom.xml

+18-61
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44

5+
<name>Powertools for AWS Lambda (Java) library Examples - Core Utilities (logging, tracing, metrics) with Terraform</name>
56
<groupId>software.amazon.lambda.examples</groupId>
67
<version>2.0.0-SNAPSHOT</version>
7-
<artifactId>powertools-examples-core-terraform</artifactId>
8+
<artifactId>powertools-examples-core-utilities-terraform</artifactId>
89
<packaging>jar</packaging>
910

10-
<name>Powertools for AWS Lambda (Java) library Examples - Core</name>
11-
1211
<properties>
1312
<log4j.version>2.20.0</log4j.version>
1413
<maven.compiler.source>1.8</maven.compiler.source>
1514
<maven.compiler.target>1.8</maven.compiler.target>
15+
<aspectj.version>1.9.20</aspectj.version>
1616
</properties>
1717

1818
<dependencies>
@@ -34,12 +34,12 @@
3434
<dependency>
3535
<groupId>com.amazonaws</groupId>
3636
<artifactId>aws-lambda-java-core</artifactId>
37-
<version>1.2.2</version>
37+
<version>1.2.3</version>
3838
</dependency>
3939
<dependency>
4040
<groupId>com.amazonaws</groupId>
4141
<artifactId>aws-lambda-java-events</artifactId>
42-
<version>3.11.2</version>
42+
<version>3.11.3</version>
4343
</dependency>
4444
<dependency>
4545
<groupId>org.apache.logging.log4j</groupId>
@@ -51,6 +51,11 @@
5151
<artifactId>log4j-api</artifactId>
5252
<version>${log4j.version}</version>
5353
</dependency>
54+
<dependency>
55+
<groupId>org.aspectj</groupId>
56+
<artifactId>aspectjrt</artifactId>
57+
<version>${aspectj.version}</version>
58+
</dependency>
5459
</dependencies>
5560

5661
<build>
@@ -86,6 +91,13 @@
8691
</goals>
8792
</execution>
8893
</executions>
94+
<dependencies>
95+
<dependency>
96+
<groupId>org.aspectj</groupId>
97+
<artifactId>aspectjtools</artifactId>
98+
<version>${aspectj.version}</version>
99+
</dependency>
100+
</dependencies>
89101
</plugin>
90102
<plugin>
91103
<groupId>org.apache.maven.plugins</groupId>
@@ -100,7 +112,7 @@
100112
<configuration>
101113
<createDependencyReducedPom>false</createDependencyReducedPom>
102114
<transformers>
103-
<transformer implementation="org.apache.logging.log4j.maven.plugins.shade.transformer.Log4j2PluginCacheFileTransformer"/>
115+
<transformer implementation="org.apache.logging.log4j.maven.plugins.shade.transformer.Log4j2PluginCacheFileTransformer"/>
104116
</transformers>
105117
</configuration>
106118
</execution>
@@ -151,61 +163,6 @@
151163
<properties>
152164
<aspectj.version>1.9.7</aspectj.version>
153165
</properties>
154-
<dependencyManagement>
155-
<dependencies>
156-
<dependency>
157-
<groupId>org.aspectj</groupId>
158-
<artifactId>aspectjtools</artifactId>
159-
<version>${aspectj.version}</version>
160-
</dependency>
161-
</dependencies>
162-
</dependencyManagement>
163-
<build>
164-
<pluginManagement>
165-
<plugins>
166-
<plugin>
167-
<groupId>dev.aspectj</groupId>
168-
<artifactId>aspectj-maven-plugin</artifactId>
169-
<version>${aspectj.plugin.version}</version>
170-
<configuration>
171-
<source>${maven.compiler.source}</source>
172-
<target>${maven.compiler.target}</target>
173-
<complianceLevel>${maven.compiler.target}</complianceLevel>
174-
<aspectLibraries>
175-
<aspectLibrary>
176-
<groupId>software.amazon.lambda</groupId>
177-
<artifactId>powertools-tracing</artifactId>
178-
</aspectLibrary>
179-
<aspectLibrary>
180-
<groupId>software.amazon.lambda</groupId>
181-
<artifactId>powertools-logging</artifactId>
182-
</aspectLibrary>
183-
<aspectLibrary>
184-
<groupId>software.amazon.lambda</groupId>
185-
<artifactId>powertools-metrics</artifactId>
186-
</aspectLibrary>
187-
</aspectLibraries>
188-
</configuration>
189-
<executions>
190-
<execution>
191-
<goals>
192-
<goal>compile</goal>
193-
<goal>test-compile</goal>
194-
</goals>
195-
</execution>
196-
</executions>
197-
<!-- Enforce aspectJ 1.9.7 -->
198-
<dependencies>
199-
<dependency>
200-
<groupId>org.aspectj</groupId>
201-
<artifactId>aspectjtools</artifactId>
202-
<version>${aspectj.version}</version>
203-
</dependency>
204-
</dependencies>
205-
</plugin>
206-
</plugins>
207-
</pluginManagement>
208-
</build>
209166
</profile>
210167
</profiles>
211168
</project>

0 commit comments

Comments
 (0)