Browse Source

+ 打包工具

chen.cheng 11 tháng trước cách đây
mục cha
commit
983d1b4496
2 tập tin đã thay đổi với 35 bổ sung0 xóa
  1. 13 0
      ruoyi-admin/build.xml
  2. 22 0
      ruoyi-admin/pom.xml

+ 13 - 0
ruoyi-admin/build.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="tfc-minapp-be" basedir=".">
+    <property environment="SystemVariable"/>
+    <property name="buildName" value="ruoyi-admin"/>
+    <!--默认目标-->
+    <target name="Build" depends="copy-out"/>
+    <!--所有的打包最终需要文件copy到特定目录,方便jenkins上取包-->
+    <target name="copy-out">
+        <copy todir="${basedir}/../out" overwrite="true" failonerror="no">
+            <fileset file="${basedir}/target/${buildName}.jar"/>
+        </copy>
+    </target>
+</project>

+ 22 - 0
ruoyi-admin/pom.xml

@@ -92,6 +92,28 @@
                     <warName>${project.artifactId}</warName>
                 </configuration>
            </plugin>
+            <!--The configuration of maven-antrun-plugin 打zip包-->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>1.8</version>
+                <executions>
+                    <execution>
+                        <id>package</id>
+                        <phase>package</phase>
+                        <configuration>
+                            <target>
+                                <ant antfile="build.xml">
+                                    <target name="Build"/>
+                                </ant>
+                            </target>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
         <finalName>${project.artifactId}</finalName>
     </build>