|
16 | 16 | <maven.compiler.source>1.8</maven.compiler.source> |
17 | 17 | <maven.compiler.target>1.8</maven.compiler.target> |
18 | 18 | <spring.version>5.0.3.RELEASE</spring.version> |
| 19 | + <junit.version>4.12</junit.version> |
| 20 | + <log4j.version>2.8.2</log4j.version> |
19 | 21 | </properties> |
20 | 22 |
|
21 | 23 | <dependencies> |
22 | 24 | <dependency> |
23 | 25 | <groupId>com.amazonaws.serverless</groupId> |
24 | 26 | <artifactId>aws-serverless-java-container-spring</artifactId> |
25 | | - <version>1.0.1</version> |
| 27 | + <version>1.1</version> |
26 | 28 | </dependency> |
27 | 29 |
|
28 | 30 | <dependency> |
|
37 | 39 | <version>${spring.version}</version> |
38 | 40 | </dependency> |
39 | 41 |
|
| 42 | + <!-- |
| 43 | + the Spring Context Indexer run an annotation processor at compile time and generates |
| 44 | + a META-INF/spring.components file that Spring can use to speed up component scanning at boot time. |
| 45 | + For small applications, this doesn't make a big difference. However, for large applications with |
| 46 | + complex dependencies this may improve your cold start time significantly. |
| 47 | + --> |
| 48 | + <dependency> |
| 49 | + <groupId>org.springframework</groupId> |
| 50 | + <artifactId>spring-context-indexer</artifactId> |
| 51 | + <version>${spring.version}</version> |
| 52 | + <optional>true</optional> |
| 53 | + </dependency> |
| 54 | + |
| 55 | + <dependency> |
| 56 | + <groupId>org.apache.logging.log4j</groupId> |
| 57 | + <artifactId>log4j-core</artifactId> |
| 58 | + <version>${log4j.version}</version> |
| 59 | + </dependency> |
| 60 | + |
| 61 | + <dependency> |
| 62 | + <groupId>org.apache.logging.log4j</groupId> |
| 63 | + <artifactId>log4j-api</artifactId> |
| 64 | + <version>${log4j.version}</version> |
| 65 | + </dependency> |
| 66 | + |
| 67 | + <dependency> |
| 68 | + <groupId>org.apache.logging.log4j</groupId> |
| 69 | + <artifactId>log4j-slf4j-impl</artifactId> |
| 70 | + <version>${log4j.version}</version> |
| 71 | + </dependency> |
| 72 | + |
| 73 | + <dependency> |
| 74 | + <groupId>com.amazonaws</groupId> |
| 75 | + <artifactId>aws-lambda-java-log4j2</artifactId> |
| 76 | + <version>1.1.0</version> |
| 77 | + </dependency> |
| 78 | + |
40 | 79 | <dependency> |
41 | 80 | <groupId>junit</groupId> |
42 | 81 | <artifactId>junit</artifactId> |
43 | | - <version>4.12</version> |
| 82 | + <version>${junit.version}</version> |
44 | 83 | <scope>test</scope> |
45 | 84 | </dependency> |
46 | 85 |
|
|
52 | 91 | <groupId>org.apache.maven.plugins</groupId> |
53 | 92 | <artifactId>maven-shade-plugin</artifactId> |
54 | 93 | <version>2.3</version> |
55 | | - <configuration> |
56 | | - <createDependencyReducedPom>false</createDependencyReducedPom> |
57 | | - </configuration> |
58 | 94 | <executions> |
59 | 95 | <execution> |
60 | 96 | <phase>package</phase> |
61 | 97 | <goals> |
62 | 98 | <goal>shade</goal> |
63 | 99 | </goals> |
| 100 | + <configuration> |
| 101 | + <createDependencyReducedPom>false</createDependencyReducedPom> |
| 102 | + <transformers> |
| 103 | + <transformer |
| 104 | + implementation="com.github.edwgiz.mavenShadePlugin.log4j2CacheTransformer.PluginsCacheFileTransformer"> |
| 105 | + </transformer> |
| 106 | + </transformers> |
| 107 | + </configuration> |
64 | 108 | </execution> |
65 | 109 | </executions> |
| 110 | + <dependencies> |
| 111 | + <dependency> |
| 112 | + <groupId>com.github.edwgiz</groupId> |
| 113 | + <artifactId>maven-shade-plugin.log4j2-cachefile-transformer</artifactId> |
| 114 | + <version>2.8.1</version> |
| 115 | + </dependency> |
| 116 | + </dependencies> |
66 | 117 | </plugin> |
67 | 118 | </plugins> |
68 | 119 | </build> |
|
0 commit comments