Commit 21e3475d82f1c51edfa11dc9e7cbbf381ab063a3
1 parent
d4cf2074
项目结构调整 x 6
Showing
3 changed files
with
182 additions
and
91 deletions
yudao-admin-server/pom.xml
| ... | ... | @@ -16,23 +16,16 @@ |
| 16 | 16 | |
| 17 | 17 | <properties> |
| 18 | 18 | <revision>1.0.0</revision> |
| 19 | + | |
| 20 | + <!-- Maven 相关 --> | |
| 21 | + <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version> | |
| 22 | + <!-- 统一依赖管理 --> | |
| 19 | 23 | <spring.boot.version>2.4.4</spring.boot.version> |
| 24 | + <!-- 工具类相关 --> | |
| 25 | + <lombok.version>1.16.14</lombok.version> | |
| 26 | + <mapstruct.version>1.4.1.Final</mapstruct.version> | |
| 20 | 27 | </properties> |
| 21 | 28 | |
| 22 | - <!-- 依赖声明 --> | |
| 23 | - <dependencyManagement> | |
| 24 | - <dependencies> | |
| 25 | - <!-- 统一依赖管理 --> | |
| 26 | - <dependency> | |
| 27 | - <groupId>org.springframework.boot</groupId> | |
| 28 | - <artifactId>spring-boot-dependencies</artifactId> | |
| 29 | - <version>${spring.boot.version}</version> | |
| 30 | - <type>pom</type> | |
| 31 | - <scope>import</scope> | |
| 32 | - </dependency> | |
| 33 | - </dependencies> | |
| 34 | - </dependencyManagement> | |
| 35 | - | |
| 36 | 29 | <dependencies> |
| 37 | 30 | <dependency> |
| 38 | 31 | <groupId>cn.iocoder.boot</groupId> |
| ... | ... | @@ -40,49 +33,96 @@ |
| 40 | 33 | <version>${revision}</version> |
| 41 | 34 | </dependency> |
| 42 | 35 | |
| 36 | + <!-- 工具类相关 --> | |
| 37 | + <dependency> | |
| 38 | + <groupId>org.projectlombok</groupId> | |
| 39 | + <artifactId>lombok</artifactId> | |
| 40 | + </dependency> | |
| 41 | + | |
| 42 | + <dependency> | |
| 43 | + <groupId>org.mapstruct</groupId> | |
| 44 | + <artifactId>mapstruct</artifactId> <!-- use mapstruct-jdk8 for Java 8 or higher --> | |
| 45 | + </dependency> | |
| 46 | + <dependency> | |
| 47 | + <groupId>org.mapstruct</groupId> | |
| 48 | + <artifactId>mapstruct-jdk8</artifactId> | |
| 49 | + </dependency> | |
| 50 | + <dependency> | |
| 51 | + <groupId>org.mapstruct</groupId> | |
| 52 | + <artifactId>mapstruct-processor</artifactId> | |
| 53 | + <optional>true</optional> | |
| 54 | + </dependency> | |
| 55 | + | |
| 56 | + <dependency> | |
| 57 | + <groupId>cn.hutool</groupId> | |
| 58 | + <artifactId>hutool-all</artifactId> | |
| 59 | + </dependency> | |
| 60 | + | |
| 61 | + <!-- Test 测试相关 --> | |
| 43 | 62 | <dependency> |
| 44 | 63 | <groupId>org.springframework.boot</groupId> |
| 45 | 64 | <artifactId>spring-boot-starter-test</artifactId> |
| 46 | - <version>2.4.4</version> <!-- TODO bom 调整 --> | |
| 47 | 65 | <scope>test</scope> |
| 48 | - <exclusions> | |
| 49 | - <exclusion> | |
| 50 | - <artifactId>asm</artifactId> | |
| 51 | - <groupId>org.ow2.asm</groupId> | |
| 52 | - </exclusion> | |
| 53 | - </exclusions> | |
| 54 | 66 | </dependency> |
| 55 | 67 | |
| 56 | 68 | <dependency> |
| 57 | 69 | <groupId>com.h2database</groupId> <!-- 单元测试,我们采用 H2 作为数据库 --> |
| 58 | 70 | <artifactId>h2</artifactId> |
| 59 | - <scope>test</scope> <!-- TODO bom 调整 --> | |
| 71 | + <scope>test</scope> | |
| 60 | 72 | </dependency> |
| 61 | 73 | |
| 62 | 74 | <dependency> |
| 63 | 75 | <groupId>com.github.fppt</groupId> <!-- 单元测试,我们采用内嵌的 Redis 数据库 --> |
| 64 | 76 | <artifactId>jedis-mock</artifactId> |
| 65 | - <version>0.1.16</version> <!-- TODO bom 调整 --> | |
| 66 | 77 | <scope>test</scope> |
| 67 | 78 | </dependency> |
| 68 | 79 | |
| 69 | 80 | <dependency> |
| 70 | 81 | <groupId>uk.co.jemos.podam</groupId> <!-- 单元测试,随机生成 POJO 类 --> |
| 71 | 82 | <artifactId>podam</artifactId> |
| 72 | - <version>7.2.6.RELEASE</version> <!-- TODO bom 调整 --> | |
| 73 | 83 | <scope>test</scope> |
| 74 | 84 | </dependency> |
| 75 | 85 | </dependencies> |
| 76 | 86 | |
| 77 | - <!-- TODO 稍后清理掉 --> | |
| 78 | 87 | <build> |
| 79 | 88 | <plugins> |
| 89 | + <!-- 打包 --> | |
| 90 | + <plugin> | |
| 91 | + <groupId>org.springframework.boot</groupId> | |
| 92 | + <artifactId>spring-boot-maven-plugin</artifactId> | |
| 93 | + <version>${spring.boot.version}</version> | |
| 94 | + <configuration> | |
| 95 | + <fork>true</fork> | |
| 96 | + </configuration> | |
| 97 | + <executions> | |
| 98 | + <execution> | |
| 99 | + <goals> | |
| 100 | + <goal>repackage</goal> <!-- 将原来的 jar 打入其中 --> | |
| 101 | + </goals> | |
| 102 | + </execution> | |
| 103 | + </executions> | |
| 104 | + </plugin> | |
| 105 | + | |
| 106 | + <!-- 提供给 mapstruct 使用 --> | |
| 80 | 107 | <plugin> |
| 81 | 108 | <groupId>org.apache.maven.plugins</groupId> |
| 82 | 109 | <artifactId>maven-compiler-plugin</artifactId> |
| 110 | + <version>${maven-compiler-plugin.version}</version> | |
| 83 | 111 | <configuration> |
| 84 | - <source>8</source> | |
| 85 | - <target>8</target> | |
| 112 | + <source>${java.version}</source> | |
| 113 | + <target>${java.version}</target> | |
| 114 | + <annotationProcessorPaths> | |
| 115 | + <path> | |
| 116 | + <groupId>org.mapstruct</groupId> | |
| 117 | + <artifactId>mapstruct-processor</artifactId> | |
| 118 | + <version>${mapstruct.version}</version> | |
| 119 | + </path> | |
| 120 | + <path> | |
| 121 | + <groupId>org.projectlombok</groupId> | |
| 122 | + <artifactId>lombok</artifactId> | |
| 123 | + <version>${lombok.version}</version> | |
| 124 | + </path> | |
| 125 | + </annotationProcessorPaths> | |
| 86 | 126 | </configuration> |
| 87 | 127 | </plugin> |
| 88 | 128 | </plugins> | ... | ... |
yudao-dependencies/pom.xml
| ... | ... | @@ -15,6 +15,19 @@ |
| 15 | 15 | |
| 16 | 16 | <properties> |
| 17 | 17 | <revision>1.0.0</revision> |
| 18 | + <!-- Maven 相关 --> | |
| 19 | + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | |
| 20 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
| 21 | + <resource.delimiter>@</resource.delimiter> | |
| 22 | + <java.version>1.8</java.version> | |
| 23 | + <maven.compiler.source>${java.version}</maven.compiler.source> | |
| 24 | + <maven.compiler.target>${java.version}</maven.compiler.target> | |
| 25 | + <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version> | |
| 26 | + <!-- 统一依赖管理 --> | |
| 27 | + <spring.boot.version>2.4.4</spring.boot.version> | |
| 28 | + <!-- Test 测试相关 --> | |
| 29 | + <podam.version>7.2.6.RELEASE</podam.version> | |
| 30 | + <jedis-mock.version>0.1.16</jedis-mock.version> | |
| 18 | 31 | <!-- 工具类相关 --> |
| 19 | 32 | <lombok.version>1.16.14</lombok.version> |
| 20 | 33 | <mapstruct.version>1.4.1.Final</mapstruct.version> |
| ... | ... | @@ -22,7 +35,6 @@ |
| 22 | 35 | <easyexcel.verion>2.2.7</easyexcel.verion> |
| 23 | 36 | <velocity.version>2.2</velocity.version> |
| 24 | 37 | <screw.version>1.0.5</screw.version> |
| 25 | - | |
| 26 | 38 | <!-- 三方云服务相关 --> |
| 27 | 39 | <aliyun-java-sdk-core.version>4.5.18</aliyun-java-sdk-core.version> |
| 28 | 40 | <aliyun-java-sdk-dysmsapi.version>2.1.0</aliyun-java-sdk-dysmsapi.version> |
| ... | ... | @@ -31,11 +43,51 @@ |
| 31 | 43 | |
| 32 | 44 | <dependencyManagement> |
| 33 | 45 | <dependencies> |
| 46 | + <!-- 统一依赖管理 --> | |
| 47 | + <dependency> | |
| 48 | + <groupId>org.springframework.boot</groupId> | |
| 49 | + <artifactId>spring-boot-dependencies</artifactId> | |
| 50 | + <version>${spring.boot.version}</version> | |
| 51 | + <type>pom</type> | |
| 52 | + <scope>import</scope> | |
| 53 | + </dependency> | |
| 54 | + | |
| 55 | + <!-- Spring 核心 --> | |
| 56 | + | |
| 57 | + <!-- Test 测试相关 --> | |
| 58 | + <dependency> | |
| 59 | + <groupId>org.springframework.boot</groupId> | |
| 60 | + <artifactId>spring-boot-starter-test</artifactId> | |
| 61 | + <version>${spring.boot.version}</version> | |
| 62 | + <scope>test</scope> | |
| 63 | + <exclusions> | |
| 64 | + <exclusion> | |
| 65 | + <artifactId>asm</artifactId> | |
| 66 | + <groupId>org.ow2.asm</groupId> | |
| 67 | + </exclusion> | |
| 68 | + </exclusions> | |
| 69 | + </dependency> | |
| 70 | + | |
| 71 | + <dependency> | |
| 72 | + <groupId>com.github.fppt</groupId> <!-- 单元测试,我们采用内嵌的 Redis 数据库 --> | |
| 73 | + <artifactId>jedis-mock</artifactId> | |
| 74 | + <version>${jedis-mock.version}</version> | |
| 75 | + <scope>test</scope> | |
| 76 | + </dependency> | |
| 77 | + | |
| 78 | + <dependency> | |
| 79 | + <groupId>uk.co.jemos.podam</groupId> <!-- 单元测试,随机生成 POJO 类 --> | |
| 80 | + <artifactId>podam</artifactId> | |
| 81 | + <version>${podam.version}</version> | |
| 82 | + <scope>test</scope> | |
| 83 | + </dependency> | |
| 84 | + | |
| 34 | 85 | <!-- 工具类相关 --> |
| 35 | 86 | <dependency> |
| 36 | 87 | <groupId>org.projectlombok</groupId> |
| 37 | 88 | <artifactId>lombok</artifactId> |
| 38 | 89 | <version>${lombok.version}</version> |
| 90 | + <optional>true</optional> | |
| 39 | 91 | </dependency> |
| 40 | 92 | |
| 41 | 93 | <dependency> |
| ... | ... | @@ -45,14 +97,14 @@ |
| 45 | 97 | </dependency> |
| 46 | 98 | <dependency> |
| 47 | 99 | <groupId>org.mapstruct</groupId> |
| 48 | - <artifactId>mapstruct-processor</artifactId> | |
| 100 | + <artifactId>mapstruct-jdk8</artifactId> | |
| 49 | 101 | <version>${mapstruct.version}</version> |
| 50 | - <optional>true</optional> | |
| 51 | 102 | </dependency> |
| 52 | 103 | <dependency> |
| 53 | 104 | <groupId>org.mapstruct</groupId> |
| 54 | - <artifactId>mapstruct-jdk8</artifactId> | |
| 105 | + <artifactId>mapstruct-processor</artifactId> | |
| 55 | 106 | <version>${mapstruct.version}</version> |
| 107 | + <optional>true</optional> | |
| 56 | 108 | </dependency> |
| 57 | 109 | |
| 58 | 110 | <dependency> |
| ... | ... | @@ -102,4 +154,50 @@ |
| 102 | 154 | </dependencies> |
| 103 | 155 | </dependencyManagement> |
| 104 | 156 | |
| 157 | + <build> | |
| 158 | + <pluginManagement> | |
| 159 | + <plugins> | |
| 160 | + <!-- 打包 --> | |
| 161 | + <plugin> | |
| 162 | + <groupId>org.springframework.boot</groupId> | |
| 163 | + <artifactId>spring-boot-maven-plugin</artifactId> | |
| 164 | + <version>${spring.boot.version}</version> | |
| 165 | + <configuration> | |
| 166 | + <fork>true</fork> | |
| 167 | + </configuration> | |
| 168 | + <executions> | |
| 169 | + <execution> | |
| 170 | + <goals> | |
| 171 | + <goal>repackage</goal> <!-- 将原来的 jar 打入其中 --> | |
| 172 | + </goals> | |
| 173 | + </execution> | |
| 174 | + </executions> | |
| 175 | + </plugin> | |
| 176 | + | |
| 177 | + <!-- 提供给 mapstruct 使用 --> | |
| 178 | + <plugin> | |
| 179 | + <groupId>org.apache.maven.plugins</groupId> | |
| 180 | + <artifactId>maven-compiler-plugin</artifactId> | |
| 181 | + <version>${maven-compiler-plugin.version}</version> | |
| 182 | + <configuration> | |
| 183 | + <source>${java.version}</source> | |
| 184 | + <target>${java.version}</target> | |
| 185 | + <annotationProcessorPaths> | |
| 186 | + <path> | |
| 187 | + <groupId>org.mapstruct</groupId> | |
| 188 | + <artifactId>mapstruct-processor</artifactId> | |
| 189 | + <version>${mapstruct.version}</version> | |
| 190 | + </path> | |
| 191 | + <path> | |
| 192 | + <groupId>org.projectlombok</groupId> | |
| 193 | + <artifactId>lombok</artifactId> | |
| 194 | + <version>${lombok.version}</version> | |
| 195 | + </path> | |
| 196 | + </annotationProcessorPaths> | |
| 197 | + </configuration> | |
| 198 | + </plugin> | |
| 199 | + </plugins> | |
| 200 | + </pluginManagement> | |
| 201 | + </build> | |
| 202 | + | |
| 105 | 203 | </project> | ... | ... |
yudao-framework/pom.xml
| ... | ... | @@ -39,25 +39,8 @@ |
| 39 | 39 | <skywalking.version>8.5.0</skywalking.version> |
| 40 | 40 | <logback.encoder.version>6.1</logback.encoder.version> |
| 41 | 41 | <spring-boot-admin.version>2.3.1</spring-boot-admin.version> |
| 42 | - <!-- Test 测试相关 --> | |
| 43 | - <podam.version>7.2.6.RELEASE</podam.version> | |
| 44 | - <jedis-mock.version>0.1.16</jedis-mock.version> | |
| 45 | 42 | </properties> |
| 46 | 43 | |
| 47 | - <!-- 依赖声明 --> | |
| 48 | - <dependencyManagement> | |
| 49 | - <dependencies> | |
| 50 | - <!-- 统一依赖管理 --> | |
| 51 | - <dependency> | |
| 52 | - <groupId>org.springframework.boot</groupId> | |
| 53 | - <artifactId>spring-boot-dependencies</artifactId> | |
| 54 | - <version>${spring.boot.version}</version> | |
| 55 | - <type>pom</type> | |
| 56 | - <scope>import</scope> | |
| 57 | - </dependency> | |
| 58 | - </dependencies> | |
| 59 | - </dependencyManagement> | |
| 60 | - | |
| 61 | 44 | <dependencies> |
| 62 | 45 | <!-- Spring 核心 --> |
| 63 | 46 | <dependency> |
| ... | ... | @@ -205,34 +188,27 @@ |
| 205 | 188 | <dependency> |
| 206 | 189 | <groupId>org.springframework.boot</groupId> |
| 207 | 190 | <artifactId>spring-boot-starter-test</artifactId> |
| 208 | -<!-- <scope>test</scope>--> <!-- TODO 调整依赖 scope --> | |
| 191 | + <scope>provided</scope> <!-- 特殊,因为默认是 test 类型,会导致编译不通过,所以设置为 provided --> | |
| 209 | 192 | <optional>true</optional> |
| 210 | - <exclusions> | |
| 211 | - <exclusion> | |
| 212 | - <artifactId>asm</artifactId> | |
| 213 | - <groupId>org.ow2.asm</groupId> | |
| 214 | - </exclusion> | |
| 215 | - </exclusions> | |
| 216 | 193 | </dependency> |
| 217 | 194 | |
| 218 | 195 | <dependency> |
| 219 | 196 | <groupId>com.h2database</groupId> <!-- 单元测试,我们采用 H2 作为数据库 --> |
| 220 | 197 | <artifactId>h2</artifactId> |
| 221 | - <scope>test</scope> | |
| 198 | + <optional>true</optional> | |
| 222 | 199 | </dependency> |
| 223 | 200 | |
| 224 | 201 | <dependency> |
| 225 | 202 | <groupId>com.github.fppt</groupId> <!-- 单元测试,我们采用内嵌的 Redis 数据库 --> |
| 226 | 203 | <artifactId>jedis-mock</artifactId> |
| 227 | - <version>${jedis-mock.version}</version> | |
| 228 | - <scope>test</scope> | |
| 204 | + <scope>provided</scope> <!-- 特殊,因为默认是 test 类型,会导致编译不通过,所以设置为 provided --> | |
| 205 | + <optional>true</optional> | |
| 229 | 206 | </dependency> |
| 230 | 207 | |
| 231 | 208 | <dependency> |
| 232 | 209 | <groupId>uk.co.jemos.podam</groupId> <!-- 单元测试,随机生成 POJO 类 --> |
| 233 | 210 | <artifactId>podam</artifactId> |
| 234 | - <version>${podam.version}</version> | |
| 235 | - <!-- <scope>test</scope>--> <!-- TODO 调整依赖 scope --> | |
| 211 | + <scope>provided</scope> <!-- 特殊,因为默认是 test 类型,会导致编译不通过,所以设置为 provided --> | |
| 236 | 212 | <optional>true</optional> |
| 237 | 213 | </dependency> |
| 238 | 214 | |
| ... | ... | @@ -248,12 +224,11 @@ |
| 248 | 224 | </dependency> |
| 249 | 225 | <dependency> |
| 250 | 226 | <groupId>org.mapstruct</groupId> |
| 251 | - <artifactId>mapstruct-processor</artifactId> | |
| 252 | - <optional>true</optional> | |
| 227 | + <artifactId>mapstruct-jdk8</artifactId> | |
| 253 | 228 | </dependency> |
| 254 | 229 | <dependency> |
| 255 | 230 | <groupId>org.mapstruct</groupId> |
| 256 | - <artifactId>mapstruct-jdk8</artifactId> | |
| 231 | + <artifactId>mapstruct-processor</artifactId> | |
| 257 | 232 | </dependency> |
| 258 | 233 | |
| 259 | 234 | <dependency> |
| ... | ... | @@ -264,16 +239,19 @@ |
| 264 | 239 | <dependency> |
| 265 | 240 | <groupId>com.alibaba</groupId> |
| 266 | 241 | <artifactId>easyexcel</artifactId> |
| 242 | + <optional>true</optional> | |
| 267 | 243 | </dependency> |
| 268 | 244 | |
| 269 | 245 | <dependency> |
| 270 | 246 | <groupId>org.apache.velocity</groupId> |
| 271 | 247 | <artifactId>velocity-engine-core</artifactId> |
| 248 | + <optional>true</optional> | |
| 272 | 249 | </dependency> |
| 273 | 250 | |
| 274 | 251 | <dependency> |
| 275 | 252 | <groupId>cn.smallbun.screw</groupId> |
| 276 | 253 | <artifactId>screw-core</artifactId> <!-- 实现数据库文档 --> |
| 254 | + <optional>true</optional> | |
| 277 | 255 | </dependency> |
| 278 | 256 | |
| 279 | 257 | <!-- 三方云服务相关 --> |
| ... | ... | @@ -282,15 +260,18 @@ |
| 282 | 260 | <dependency> |
| 283 | 261 | <groupId>com.yunpian.sdk</groupId> |
| 284 | 262 | <artifactId>yunpian-java-sdk</artifactId> |
| 263 | + <optional>true</optional> | |
| 285 | 264 | </dependency> |
| 286 | 265 | |
| 287 | 266 | <dependency> |
| 288 | 267 | <groupId>com.aliyun</groupId> |
| 289 | 268 | <artifactId>aliyun-java-sdk-core</artifactId> |
| 269 | + <optional>true</optional> | |
| 290 | 270 | </dependency> |
| 291 | 271 | <dependency> |
| 292 | 272 | <groupId>com.aliyun</groupId> |
| 293 | 273 | <artifactId>aliyun-java-sdk-dysmsapi</artifactId> |
| 274 | + <optional>true</optional> | |
| 294 | 275 | </dependency> |
| 295 | 276 | <!-- SMS SDK end --> |
| 296 | 277 | |
| ... | ... | @@ -304,40 +285,12 @@ |
| 304 | 285 | <plugin> |
| 305 | 286 | <groupId>org.springframework.boot</groupId> |
| 306 | 287 | <artifactId>spring-boot-maven-plugin</artifactId> |
| 307 | - <version>${spring.boot.version}</version> | |
| 308 | - <configuration> | |
| 309 | - <fork>true</fork> | |
| 310 | - </configuration> | |
| 311 | - <executions> | |
| 312 | - <execution> | |
| 313 | - <goals> | |
| 314 | - <goal>repackage</goal> <!-- 将原来的 jar 打入其中 --> | |
| 315 | - </goals> | |
| 316 | - </execution> | |
| 317 | - </executions> | |
| 318 | 288 | </plugin> |
| 319 | 289 | |
| 320 | 290 | <!-- 提供给 mapstruct 使用 --> |
| 321 | 291 | <plugin> |
| 322 | 292 | <groupId>org.apache.maven.plugins</groupId> |
| 323 | 293 | <artifactId>maven-compiler-plugin</artifactId> |
| 324 | - <version>${maven-compiler-plugin.version}</version> | |
| 325 | - <configuration> | |
| 326 | - <source>${java.version}</source> <!-- or higher, depending on your project --> | |
| 327 | - <target>${java.version}</target> <!-- or higher, depending on your project --> | |
| 328 | - <annotationProcessorPaths> | |
| 329 | - <path> | |
| 330 | - <groupId>org.mapstruct</groupId> | |
| 331 | - <artifactId>mapstruct-processor</artifactId> | |
| 332 | - <version>${mapstruct.version}</version> | |
| 333 | - </path> | |
| 334 | - <path> | |
| 335 | - <groupId>org.projectlombok</groupId> | |
| 336 | - <artifactId>lombok</artifactId> | |
| 337 | - <version>${lombok.version}</version> | |
| 338 | - </path> | |
| 339 | - </annotationProcessorPaths> | |
| 340 | - </configuration> | |
| 341 | 294 | </plugin> |
| 342 | 295 | </plugins> |
| 343 | 296 | </build> | ... | ... |