From f5979b61dd5f52f506007d86908baa5f1b7eab97 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期日, 26 十一月 2023 18:08:52 +0800 Subject: [PATCH] 1、优化代码,去除一些类中的main方法,原因是Maven打包不允许有多个main方法; 2、实现pipIrr-mwTest-server模块; 3、重构pom.xml,配置打包策略。 --- pipIrr-platform/pipIrr-web/pipIrr-web-demo/pom.xml | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 118 insertions(+), 0 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-demo/pom.xml b/pipIrr-platform/pipIrr-web/pipIrr-web-demo/pom.xml index ae0ed8e..84d7f0d 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-demo/pom.xml +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-demo/pom.xml @@ -15,5 +15,123 @@ <name>pipIrr-web-demo</name> <description>web寮�鍙戞紨绀虹郴缁燂紝婕旂ず绀轰緥</description> + <build> + <plugins> + <!-- 鐢熸垚涓嶅寘鍚緷璧杍ar鐨勫彲鎵цjar鍖� + <plugin> + !- spring boot鎻愪緵鐨刴aven鎵撳寘鎻掍欢 - + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <executions> + <execution> + !- + <goals> + <goal>repackage</goal> + </goals> + - + <configuration> + !- 涓嶅姞鐨勮瘽鏈�缁堝寘鍚嶄负: ${artifactId}-${version}.jar, 鍔犱簡鐨勮瘽鏈�缁堝寘鍚�: ${artifactId}-${version}-${classifier}.jar - + <classifier>execute</classifier> + !- 涓嶆寚瀹氱敓鎴愯矾寰勭殑璇�, 榛樿淇濆瓨鍦� ${build.directory} 涓� - + <outputDirectory>${project.build.directory}/execute</outputDirectory> + <finalName>${artifactId}-${version}</finalName> + <layout>ZIP</layout> + <mainClass>com.dy.pipIrrBase.PipIrrBaseApplication</mainClass> + <includes> + <include> + <groupId>com.dy</groupId> + <artifactId>pipIrr-common</artifactId> + </include> + <include> + <groupId>com.dy</groupId> + <artifactId>pipIrr-global</artifactId> + </include> + </includes> + <excludes> + <exclude> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + </exclude> + </excludes> + </configuration> + </execution> + </executions> + </plugin> + --> + <!-- 鎷疯礉渚濊禆鐨刯ar鍖呭埌lib鐩綍--> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <executions> + <execution> + <configuration> + <!-- 涓嶅姞鐨勮瘽鏈�缁堝寘鍚嶄负: ${artifactId}-${version}.jar, 鍔犱簡鐨勮瘽鏈�缁堝寘鍚�: ${artifactId}-${version}-${classifier}.jar + <classifier>execute</classifier> + --> + <!-- ${project.build.directory}鏄痬aven鍙橀噺锛屽唴缃殑锛岃〃绀簍arget鐩綍,濡傛灉涓嶅啓锛屽皢鍦ㄦ牴鐩綍涓嬪垱寤�/lib --> + <outputDirectory>${project.build.directory}/lib</outputDirectory> + <!-- excludeTransitive:鏄惁涓嶅寘鍚棿鎺ヤ緷璧栧寘锛屾瘮濡傛垜浠緷璧朅锛屼絾鏄疉鍙堜緷璧栦簡B锛屾垜浠槸鍚︿篃瑕佹妸B鎵撹繘鍘� 榛樿涓嶆墦--> + <excludeTransitive>false</excludeTransitive> + <!-- 澶嶅埗鐨刯ar鏂囦欢鍘绘帀鐗堟湰淇℃伅 --> + <stripVersion>false</stripVersion> + <finalName>${project.artifactId}-${project.version}</finalName> + <layout>ZIP</layout> + <mainClass>com.dy.pipIrrDemo.PipIrrDemoApplication</mainClass> + <includes> + <include> + <groupId>com.dy</groupId> + <artifactId>pipIrr-common</artifactId> + </include> + <include> + <groupId>com.dy</groupId> + <artifactId>pipIrr-global</artifactId> + </include> + </includes> + <excludes> + <exclude> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + </exclude> + </excludes> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <!-- 璁剧疆java缂栬瘧鐗堟湰锛岃繍琛岀幆澧冪増鏈� --> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <!-- source锛� 婧愪唬鐮佺紪璇戠増鏈紱target锛� 鐩爣骞冲彴缂栬瘧鐗堟湰锛沞ncoding锛� 瀛楃闆嗙紪鐮併�� --> + <configuration> + <source>${java.version}</source> + <target>${java.version}</target> + <encoding>${encoding}</encoding> + </configuration> + </plugin> + <plugin> + <!-- 瑙e喅璧勬簮鏂囦欢鐨勭紪鐮侀棶棰� --> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <configuration> + <encoding>${encoding}</encoding> + </configuration> + </plugin> + <plugin> + <!-- maven閲屾墽琛屾祴璇曠敤渚嬬殑鎻掍欢 --> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <skipTests>true</skipTests> + </configuration> + </plugin> + <plugin> + <!-- 涓嬮潰瑙e喅锛氬綋杩涜Maven Lifecycle package鏃舵姤閿欙細Could not find artifact org.apache.mina:mina-core:bundle:2.2.1 in maven (https://repo1.maven.org/maven2/)--> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + </plugin> + </plugins> + </build> </project> \ No newline at end of file -- Gitblit v1.8.0