瀏覽代碼

优化pom

mxd 4 年之前
父節點
當前提交
34ce117fcf
共有 1 個文件被更改,包括 28 次插入12 次删除
  1. 28 12
      pom.xml

+ 28 - 12
pom.xml

@@ -3,12 +3,6 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.springframework.boot</groupId>
-        <artifactId>spring-boot-starter-parent</artifactId>
-        <version>2.4.5</version>
-        <relativePath/>
-    </parent>
     <groupId>org.ssssssss</groupId>
     <artifactId>magic-api</artifactId>
     <version>1.1.1</version>
@@ -34,20 +28,30 @@
         <connection>scm:git:https://gitee.com/ssssssss-team/magic-api.git</connection>
         <developerConnection>scm:git:https://gitee.com/ssssssss-team/magic-api.git</developerConnection>
     </scm>
+    <properties>
+        <spring-boot.version>2.4.5</spring-boot.version>
+        <magic-script.version>1.4.5</magic-script.version>
+        <commons-compress.version>1.20</commons-compress.version>
+        <commons-io.version>2.7</commons-io.version>
+        <commons-text.version>1.6</commons-text.version>
+        <commons-beanutils.version>1.9.4</commons-beanutils.version>
+        <spring-boot-starter-log4j.version>1.3.8.RELEASE</spring-boot-starter-log4j.version>
+    </properties>
     <dependencies>
         <dependency>
             <groupId>org.ssssssss</groupId>
             <artifactId>magic-script</artifactId>
-            <version>1.4.5</version>
+            <version>${magic-script.version}</version>
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter</artifactId>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-text</artifactId>
-            <version>1.6</version>
+            <version>${commons-text.version}</version>
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
@@ -57,7 +61,7 @@
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-log4j</artifactId>
-            <version>1.3.8.RELEASE</version>
+            <version>${spring-boot-starter-log4j.version}</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -73,11 +77,12 @@
         <dependency>
             <groupId>commons-beanutils</groupId>
             <artifactId>commons-beanutils</artifactId>
-            <version>1.9.4</version>
+            <version>${commons-beanutils.version}</version>
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-web</artifactId>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
@@ -86,14 +91,25 @@
         <dependency>
             <groupId>commons-io</groupId>
             <artifactId>commons-io</artifactId>
-            <version>2.7</version>
+            <version>${commons-io.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-compress</artifactId>
-            <version>1.20</version>
+            <version>${commons-compress.version}</version>
         </dependency>
     </dependencies>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-dependencies</artifactId>
+                <version>${spring-boot.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
     <profiles>
         <profile>
             <id>release</id>