pom.xml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <groupId>xinting</groupId>
  7. <packaging>war</packaging>
  8. <artifactId>gsyh</artifactId>
  9. <version>1.0.0</version>
  10. <description>
  11. web服务入口
  12. </description>
  13. <dependencies>
  14. </dependencies>
  15. <build>
  16. <plugins>
  17. <plugin>
  18. <groupId>org.apache.maven.plugins</groupId>
  19. <artifactId>maven-compiler-plugin</artifactId>
  20. <version>3.10.1</version>
  21. <configuration>
  22. <source>1.8</source>
  23. <target>1.8</target>
  24. <encoding>UTF-8</encoding>
  25. <compilerArguments>
  26. <extdirs>${project.basedir}/src/main/webapp/WEB-INF/lib</extdirs>
  27. </compilerArguments>
  28. </configuration>
  29. </plugin>
  30. <!-- <plugin>-->
  31. <!-- <groupId>org.apache.maven.plugins</groupId>-->
  32. <!-- <artifactId>maven-war-plugin</artifactId>-->
  33. <!-- <version>3.2.3</version>-->
  34. <!-- <configuration>-->
  35. <!-- <failOnMissingWebXml>true</failOnMissingWebXml>-->
  36. <!-- &lt;!&ndash; 不想打进war包的xxx.jar的配置 &ndash;&gt;-->
  37. <!-- &lt;!&ndash; <warSourceExcludes>*/lib/xxx.jar</warSourceExcludes>&ndash;&gt;-->
  38. <!-- <webResources>-->
  39. <!-- <resource>-->
  40. <!-- &lt;!&ndash; 元配置文件的目录,相对于pom.xml文件的路径 &ndash;&gt;-->
  41. <!-- <directory>${project.basedir}/src/main/webapp</directory>-->
  42. <!-- &lt;!&ndash; 是否过滤文件,也就是是否启动auto-config的功能 &ndash;&gt;-->
  43. <!-- <filtering>true</filtering>-->
  44. <!-- &lt;!&ndash; 目标路径 &ndash;&gt;-->
  45. <!-- <targetPath>/</targetPath>-->
  46. <!-- </resource>-->
  47. <!-- </webResources>-->
  48. <!-- </configuration>-->
  49. <!-- </plugin>-->
  50. <!--使用jib插件-->
  51. <plugin>
  52. <groupId>com.google.cloud.tools</groupId>
  53. <artifactId>jib-maven-plugin</artifactId>
  54. <version>1.7.0</version>
  55. <configuration>
  56. <!--from节点用来设置镜像的基础镜像,相当于Docerkfile中的FROM关键字-->
  57. <from>
  58. <image>tomcat:8.5.84-jre8-temurin-jammy</image>
  59. </from>
  60. <to>
  61. <!--镜像名称和tag,使用了mvn内置变量${project.version},表示当前工程的version-->
  62. <image>docker.xt.wenhq.top:8083/docker_r/gsyh:v1.0</image>
  63. <auth>
  64. <username>admin</username>
  65. <password>xtwenhongquan</password>
  66. </auth>
  67. </to>
  68. <!--容器相关的属性-->
  69. <container>
  70. <!--容器上放置应用程序内容的根目录。特别适用于WAR打包项目,通过指定放置exploded WAR内容的位置来处理不同的Servlet引擎基础映像-->
  71. <appRoot>/usr/local/tomcat/webapps/ZHDT_Web</appRoot>
  72. <!--使用当前时间-->
  73. <useCurrentTimestamp>true</useCurrentTimestamp>
  74. <!--容器在运行时暴露的端口-->
  75. <ports>
  76. <port>8080</port>
  77. </ports>
  78. </container>
  79. <allowInsecureRegistries>true</allowInsecureRegistries>
  80. </configuration>
  81. <executions>
  82. <execution>
  83. <phase>package</phase>
  84. <goals>
  85. <goal>build</goal>
  86. </goals>
  87. </execution>
  88. </executions>
  89. </plugin>
  90. </plugins>
  91. </build>
  92. </project>