|
27 | 27 | <maven.compiler.source>1.8</maven.compiler.source> |
28 | 28 | <maven.compiler.target>1.8</maven.compiler.target> |
29 | 29 | <spring.version>5.0.3.RELEASE</spring.version> |
| 30 | + <junit.version>4.12</junit.version> |
| 31 | + <log4j.version>2.8.2</log4j.version> |
30 | 32 | </properties> |
31 | 33 |
|
32 | 34 | <dependencies> |
|
42 | 44 | <version>1.2.0</version> |
43 | 45 | </dependency> |
44 | 46 |
|
45 | | - <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc --> |
46 | 47 | <dependency> |
47 | 48 | <groupId>org.springframework</groupId> |
48 | 49 | <artifactId>spring-webmvc</artifactId> |
|
55 | 56 | <version>${spring.version}</version> |
56 | 57 | </dependency> |
57 | 58 |
|
58 | | - <!-- https://mvnrepository.com/artifact/io.symphonia/lambda-logging --> |
| 59 | + <!-- |
| 60 | + the Spring Context Indexer run an annotation processor at compile time and generates |
| 61 | + a META-INF/spring.components file that Spring can use to speed up component scanning at boot time. |
| 62 | + For small applications, this doesn't make a big difference. However, for large applications with |
| 63 | + complex dependencies this may improve your cold start time significantly. |
| 64 | + --> |
59 | 65 | <dependency> |
60 | | - <groupId>io.symphonia</groupId> |
61 | | - <artifactId>lambda-logging</artifactId> |
62 | | - <version>1.0.1</version> |
| 66 | + <groupId>org.springframework</groupId> |
| 67 | + <artifactId>spring-context-indexer</artifactId> |
| 68 | + <version>${spring.version}</version> |
| 69 | + <optional>true</optional> |
| 70 | + </dependency> |
| 71 | + |
| 72 | + <dependency> |
| 73 | + <groupId>org.apache.logging.log4j</groupId> |
| 74 | + <artifactId>log4j-core</artifactId> |
| 75 | + <version>${log4j.version}</version> |
| 76 | + </dependency> |
| 77 | + |
| 78 | + <dependency> |
| 79 | + <groupId>org.apache.logging.log4j</groupId> |
| 80 | + <artifactId>log4j-api</artifactId> |
| 81 | + <version>${log4j.version}</version> |
| 82 | + </dependency> |
| 83 | + |
| 84 | + <dependency> |
| 85 | + <groupId>org.apache.logging.log4j</groupId> |
| 86 | + <artifactId>log4j-slf4j-impl</artifactId> |
| 87 | + <version>${log4j.version}</version> |
| 88 | + </dependency> |
| 89 | + |
| 90 | + <dependency> |
| 91 | + <groupId>com.amazonaws</groupId> |
| 92 | + <artifactId>aws-lambda-java-log4j2</artifactId> |
| 93 | + <version>1.1.0</version> |
| 94 | + </dependency> |
| 95 | + |
| 96 | + <dependency> |
| 97 | + <groupId>junit</groupId> |
| 98 | + <artifactId>junit</artifactId> |
| 99 | + <version>${junit.version}</version> |
| 100 | + <scope>test</scope> |
63 | 101 | </dependency> |
64 | 102 | </dependencies> |
65 | 103 |
|
|
69 | 107 | <groupId>org.apache.maven.plugins</groupId> |
70 | 108 | <artifactId>maven-shade-plugin</artifactId> |
71 | 109 | <version>2.3</version> |
72 | | - <configuration> |
73 | | - <createDependencyReducedPom>false</createDependencyReducedPom> |
74 | | - </configuration> |
75 | 110 | <executions> |
76 | 111 | <execution> |
77 | 112 | <phase>package</phase> |
78 | 113 | <goals> |
79 | 114 | <goal>shade</goal> |
80 | 115 | </goals> |
| 116 | + <configuration> |
| 117 | + <createDependencyReducedPom>false</createDependencyReducedPom> |
| 118 | + <transformers> |
| 119 | + <transformer |
| 120 | + implementation="com.github.edwgiz.mavenShadePlugin.log4j2CacheTransformer.PluginsCacheFileTransformer"> |
| 121 | + </transformer> |
| 122 | + </transformers> |
| 123 | + </configuration> |
81 | 124 | </execution> |
82 | 125 | </executions> |
| 126 | + <dependencies> |
| 127 | + <dependency> |
| 128 | + <groupId>com.github.edwgiz</groupId> |
| 129 | + <artifactId>maven-shade-plugin.log4j2-cachefile-transformer</artifactId> |
| 130 | + <version>2.8.1</version> |
| 131 | + </dependency> |
| 132 | + </dependencies> |
83 | 133 | </plugin> |
84 | 134 | </plugins> |
85 | 135 | </build> |
|
0 commit comments