|
1 | 1 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
2 | 2 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
3 | 3 | <modelVersion>4.0.0</modelVersion> |
| 4 | + |
| 5 | + <groupId>software.amazon.lambda.examples</groupId> |
| 6 | + <version>1.15.0</version> |
4 | 7 | <artifactId>powertools-examples-core</artifactId> |
5 | 8 | <packaging>jar</packaging> |
6 | | - <name>Powertools for AWS Lambda (Java) library Examples - Core</name> |
7 | 9 |
|
8 | | - <parent> |
9 | | - <artifactId>powertools-examples</artifactId> |
10 | | - <groupId>software.amazon.lambda</groupId> |
11 | | - <version>1.15.0</version> |
12 | | - </parent> |
| 10 | + <name>Powertools for AWS Lambda (Java) library Examples - Core</name> |
| 11 | + |
| 12 | + <properties> |
| 13 | + <log4j.version>2.20.0</log4j.version> |
| 14 | + <maven.compiler.source>1.8</maven.compiler.source> |
| 15 | + <maven.compiler.target>1.8</maven.compiler.target> |
| 16 | + </properties> |
13 | 17 |
|
14 | 18 | <dependencies> |
15 | 19 | <dependency> |
|
118 | 122 | </plugin> |
119 | 123 | </plugins> |
120 | 124 | </build> |
| 125 | + <profiles> |
| 126 | + <!-- Use a profile to enforce AspectJ version 1.9.7 if we are Java 1.8 otherwise we'll get class |
| 127 | + version mismatch issues. All subsequent Java releases build with the default AspectJ configuration |
| 128 | + on the project. |
| 129 | + |
| 130 | + Note: |
| 131 | + - if you are running Java > 1.8, you can remove this profile altogether |
| 132 | + - If you are running on Java 1.8, you should apply the aspectJ version here to the project, and remove |
| 133 | + the profile. |
| 134 | + --> |
| 135 | + <profile> |
| 136 | + <id>jdk8</id> |
| 137 | + <activation> |
| 138 | + <jdk>(,11)</jdk> <!-- 8 --> |
| 139 | + </activation> |
| 140 | + <properties> |
| 141 | + <aspectj.version>1.9.7</aspectj.version> |
| 142 | + </properties> |
| 143 | + <dependencyManagement> |
| 144 | + <dependencies> |
| 145 | + <dependency> |
| 146 | + <groupId>org.aspectj</groupId> |
| 147 | + <artifactId>aspectjtools</artifactId> |
| 148 | + <version>${aspectj.version}</version> |
| 149 | + </dependency> |
| 150 | + </dependencies> |
| 151 | + </dependencyManagement> |
| 152 | + <build> |
| 153 | + <pluginManagement> |
| 154 | + <plugins> |
| 155 | + <plugin> |
| 156 | + <groupId>dev.aspectj</groupId> |
| 157 | + <artifactId>aspectj-maven-plugin</artifactId> |
| 158 | + <version>${aspectj.plugin.version}</version> |
| 159 | + <configuration> |
| 160 | + <source>${maven.compiler.source}</source> |
| 161 | + <target>${maven.compiler.target}</target> |
| 162 | + <complianceLevel>${maven.compiler.target}</complianceLevel> |
| 163 | + <aspectLibraries> |
| 164 | + <aspectLibrary> |
| 165 | + <groupId>software.amazon.lambda</groupId> |
| 166 | + <artifactId>powertools-tracing</artifactId> |
| 167 | + </aspectLibrary> |
| 168 | + <aspectLibrary> |
| 169 | + <groupId>software.amazon.lambda</groupId> |
| 170 | + <artifactId>powertools-logging</artifactId> |
| 171 | + </aspectLibrary> |
| 172 | + <aspectLibrary> |
| 173 | + <groupId>software.amazon.lambda</groupId> |
| 174 | + <artifactId>powertools-metrics</artifactId> |
| 175 | + </aspectLibrary> |
| 176 | + </aspectLibraries> |
| 177 | + </configuration> |
| 178 | + <executions> |
| 179 | + <execution> |
| 180 | + <goals> |
| 181 | + <goal>compile</goal> |
| 182 | + <goal>test-compile</goal> |
| 183 | + </goals> |
| 184 | + </execution> |
| 185 | + </executions> |
| 186 | + <!-- Enforce aspectJ 1.9.7 --> |
| 187 | + <dependencies> |
| 188 | + <dependency> |
| 189 | + <groupId>org.aspectj</groupId> |
| 190 | + <artifactId>aspectjtools</artifactId> |
| 191 | + <version>${aspectj.version}</version> |
| 192 | + </dependency> |
| 193 | + </dependencies> |
| 194 | + </plugin> |
| 195 | + </plugins> |
| 196 | + </pluginManagement> |
| 197 | + </build> |
| 198 | + </profile> |
| 199 | + </profiles> |
121 | 200 | </project> |
0 commit comments