From 7a95518f9e4174d7f379c18425c05c47b605289f Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期日, 15 十月 2023 18:00:08 +0800
Subject: [PATCH] pom文件修改
---
Source/UBCS/pom.xml | 132 +++++++++++++++-----------------
Source/UBCS/ubcs-ops/ubcs-swagger/pom.xml | 20 +++-
Source/UBCS/ubcs-ops/ubcs-xxljob-admin/pom.xml | 20 +++-
Source/UBCS/ubcs-ops/ubcs-xxljob/pom.xml | 20 +++-
4 files changed, 104 insertions(+), 88 deletions(-)
diff --git a/Source/UBCS/pom.xml b/Source/UBCS/pom.xml
index bb74ac8..5757e07 100644
--- a/Source/UBCS/pom.xml
+++ b/Source/UBCS/pom.xml
@@ -10,6 +10,7 @@
<properties>
<bladex.project.version>3.0.1.RELEASE</bladex.project.version>
+
<java.version>1.8</java.version>
<maven.plugin.version>3.8.0</maven.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -28,7 +29,6 @@
<docker.password>Harbor12345</docker.password>
<docker.namespace>ubcs</docker.namespace>
<docker.plugin.version>1.4.13</docker.plugin.version>
- <server.lib.path>../../target/libs</server.lib.path>
</properties>
<modules>
@@ -41,7 +41,6 @@
<module>ubcs-plugin-api</module>
<module>ubcs-service</module>
<module>ubcs-service-api</module>
-<!-- <module>ubcs-codeApply</module>-->
</modules>
<dependencyManagement>
@@ -107,13 +106,6 @@
<resources>
<resource>
<directory>src/main/resources</directory>
- <!-- <excludes>
- <exclude>bootstrap.yml</exclude>
- <exclude>application.yml</exclude>
- <exclude>application-dev.yml</exclude>
- <exclude>application-test.yml</exclude>
- <exclude>application-prop.yml</exclude>
- </excludes>-->
</resource>
<resource>
<directory>src/main/java</directory>
@@ -127,91 +119,91 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
- <version>${spring.boot.version}</version> <!-- 濡傛灉 spring.boot.version 鐗堟湰淇敼锛屽垯杩欓噷涔熻璺熺潃淇敼 -->
+ <version>${spring.boot.version}</version>
<configuration>
<fork>true</fork>
- <!--瑙e喅windows鍛戒护琛岀獥鍙d腑鏂囦贡鐮�-->
- <jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
- <!-- 鎷嗗紑渚濊禆-->
- <layout>ZIP</layout>
- <outputDirectory>../../target</outputDirectory>
- <includes>
- <include>
- <!-- 鎺掗櫎鎵�鏈塉ar -->
- <groupId>nothing</groupId>
- <artifactId>nothing</artifactId>
- </include>
- </includes>
+ <finalName>${project.build.finalName}</finalName>
</configuration>
<executions>
<execution>
<goals>
- <goal>repackage</goal> <!-- 灏嗗紩鍏ョ殑 jar 鎵撳叆鍏朵腑 -->
+ <goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
- <!--姝ゆ彃浠剁敤浜庡皢渚濊禆鍖呮娊鍑�-->
+ <plugin>
+ <groupId>com.spotify</groupId>
+ <artifactId>dockerfile-maven-plugin</artifactId>
+ <version>${docker.plugin.version}</version>
+ <configuration>
+ <username>${docker.username}</username>
+ <password>${docker.password}</password>
+ <repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
+ <tag>${project.version}</tag>
+ <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+ <buildArgs>
+ <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
+ </buildArgs>
+ </configuration>
+ <!--瀛愭湇鍔℃坊鍔犲涓嬮厤缃紝杩愯 mvn deploy 鍛戒护渚夸細鑷姩鎵撳寘闀滃儚-->
+ <!--<executions>
+ <execution>
+ <id>default</id>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>-->
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
+ <artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
- <id>copy-dependencies</id>
<phase>package</phase>
<goals>
- <goal>copy-dependencies</goal>
+ <goal>run</goal>
</goals>
<configuration>
- <outputDirectory>${server.lib.path}</outputDirectory>
- <excludeTransitive>false</excludeTransitive>
- <stripVersion>false</stripVersion>
- <includeScope>runtime</includeScope>
+ <tasks>
+ <!--suppress UnresolvedMavenProperty -->
+ <copy overwrite="true"
+ tofile="${session.executionRootDirectory}/target/${project.artifactId}.jar"
+ file="${project.build.directory}/${project.artifactId}.jar" />
+ </tasks>
</configuration>
</execution>
</executions>
</plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${maven.plugin.version}</version>
- <configuration>
- <source>${java.version}</source>
- <target>${java.version}</target>
- <encoding>UTF-8</encoding>
- <compilerArgs>
- <arg>-parameters</arg>
- </compilerArgs>
- </configuration>
- </plugin>
- <!-- 鍩轰簬maven-jar-plugin鎻掍欢瀹炵幇鎶婁緷璧杍ar瀹氫箟鍐欏叆杈撳嚭jar鐨凪ETA-INFO/MANIFEST鏂囦欢 -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- <!--<classpathPrefix>./libs</classpathPrefix>-->
- <classpathPrefix>/data1/ubcs/ubcs-server/libs</classpathPrefix>
- <useUniqueVersions>false</useUniqueVersions>
- </manifest>
- </archive>
- <excludes>
- <exclude>application-dev.yml</exclude>
- <exclude>application-prod.yml</exclude>
- <exclude>application.yml</exclude>
- <exclude>lib/*</exclude>
- </excludes>
- </configuration>
- </plugin>
</plugins>
</pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>com.spotify</groupId>
+ <artifactId>dockerfile-maven-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${maven.plugin.version}</version>
+ <configuration>
+ <source>${java.version}</source>
+ <target>${java.version}</target>
+ <encoding>UTF-8</encoding>
+ <compilerArgs>
+ <arg>-parameters</arg>
+ </compilerArgs>
+ </configuration>
+ </plugin>
+ </plugins>
</build>
<repositories>
diff --git a/Source/UBCS/ubcs-ops/ubcs-swagger/pom.xml b/Source/UBCS/ubcs-ops/ubcs-swagger/pom.xml
index e38382b..0deb14e 100644
--- a/Source/UBCS/ubcs-ops/ubcs-swagger/pom.xml
+++ b/Source/UBCS/ubcs-ops/ubcs-swagger/pom.xml
@@ -33,15 +33,23 @@
<build>
<plugins>
<plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
+ <groupId>com.spotify</groupId>
+ <artifactId>dockerfile-maven-plugin</artifactId>
+ <configuration>
+ <username>${docker.username}</username>
+ <password>${docker.password}</password>
+ <repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
+ <tag>${project.version}</tag>
+ <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+ <buildArgs>
+ <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
+ </buildArgs>
+ <skip>false</skip>
+ </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
+ <artifactId>maven-antrun-plugin</artifactId>
</plugin>
</plugins>
</build>
diff --git a/Source/UBCS/ubcs-ops/ubcs-xxljob-admin/pom.xml b/Source/UBCS/ubcs-ops/ubcs-xxljob-admin/pom.xml
index 8f3fa0e..78079e2 100644
--- a/Source/UBCS/ubcs-ops/ubcs-xxljob-admin/pom.xml
+++ b/Source/UBCS/ubcs-ops/ubcs-xxljob-admin/pom.xml
@@ -102,15 +102,23 @@
<build>
<plugins>
<plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
+ <groupId>com.spotify</groupId>
+ <artifactId>dockerfile-maven-plugin</artifactId>
+ <configuration>
+ <username>${docker.username}</username>
+ <password>${docker.password}</password>
+ <repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
+ <tag>${project.version}</tag>
+ <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+ <buildArgs>
+ <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
+ </buildArgs>
+ <skip>false</skip>
+ </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
+ <artifactId>maven-antrun-plugin</artifactId>
</plugin>
</plugins>
</build>
diff --git a/Source/UBCS/ubcs-ops/ubcs-xxljob/pom.xml b/Source/UBCS/ubcs-ops/ubcs-xxljob/pom.xml
index 52cc39f..a6c2e62 100644
--- a/Source/UBCS/ubcs-ops/ubcs-xxljob/pom.xml
+++ b/Source/UBCS/ubcs-ops/ubcs-xxljob/pom.xml
@@ -38,15 +38,23 @@
<build>
<plugins>
<plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
+ <groupId>com.spotify</groupId>
+ <artifactId>dockerfile-maven-plugin</artifactId>
+ <configuration>
+ <username>${docker.username}</username>
+ <password>${docker.password}</password>
+ <repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
+ <tag>${project.version}</tag>
+ <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+ <buildArgs>
+ <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
+ </buildArgs>
+ <skip>false</skip>
+ </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
+ <artifactId>maven-antrun-plugin</artifactId>
</plugin>
</plugins>
</build>
--
Gitblit v1.9.3