pom.xml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <groupId>com.zhixinhuixue.test</groupId>
  6. <artifactId>test-maven-version</artifactId>
  7. <packaging>pom</packaging>
  8. <version>1.0.2-SNAPSHOT</version>
  9. <parent>
  10. <artifactId>zsy</artifactId>
  11. <groupId>com.zhixinhuixue</groupId>
  12. <version>4.0.0-SNAPSHOT</version>
  13. </parent>
  14. <!-- 项目属性配置(常量,别的地方可以引用) -->
  15. <properties>
  16. <zl.java.version>1.8</zl.java.version>
  17. <cloud.version>Hoxton.SR6</cloud.version>
  18. <boot.version>2.2.6.RELEASE</boot.version>
  19. <plugin.boot.version>2.2.6.RELEASE</plugin.boot.version>
  20. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  21. <elasticsearch.version>5.6.16</elasticsearch.version>
  22. <plugin.compiler.version>3.8.1</plugin.compiler.version>
  23. <plugin.jar.version>3.2.0</plugin.jar.version>
  24. <plugin.deploy.version>2.8.2</plugin.deploy.version>
  25. <plugin.source.version>3.2.1</plugin.source.version>
  26. </properties>
  27. <modules>
  28. <module>api</module>
  29. <module>common</module>
  30. <module>model</module>
  31. </modules>
  32. <scm>
  33. <!--release包需要放入的nexus或者其他maven release包的仓库url地址-->
  34. <url>http://192.168.1.240:8847/nexus3/repository/maven-releases/</url>
  35. <!--connection, developerConnection: 都是连接字符串,其中后者是具有write权限的scm连接 -->
  36. <!--需要打包项目的git地址-->
  37. <developerConnection>scm:git:http://gitz.zhixinhuixue.net:18880/trustsun/test-maven-version.git
  38. </developerConnection>
  39. <!--需要打包项目的git地址-->
  40. <connection>scm:git:http://gitz.zhixinhuixue.net:18880/trustsun/test-maven-version.git</connection>
  41. <tag>HEAD</tag>
  42. </scm>
  43. <!--定义snapshots库和releases库的nexus3地址-->
  44. <!-- <distributionManagement>-->
  45. <!-- <snapshotRepository>-->
  46. <!-- <id>nexus-snapshots</id>-->
  47. <!-- <url>http://192.168.1.240:8847/nexus3/repository/maven-snapshots/</url>-->
  48. <!-- </snapshotRepository>-->
  49. <!-- <repository>-->
  50. <!-- <id>nexus-releases</id>-->
  51. <!-- <url>http://192.168.1.240:8847/nexus3/repository/maven-releases/</url>-->
  52. <!-- </repository>-->
  53. <!-- </distributionManagement>-->
  54. <!-- nexus3 -->
  55. <!-- <repositories>-->
  56. <!-- <repository>-->
  57. <!-- <id>nexus-public</id>-->
  58. <!-- <name>maven-public</name>-->
  59. <!-- <url>http://192.168.1.240:8847/nexus3/repository/maven-public/</url>-->
  60. <!-- <snapshots>-->
  61. <!-- <enabled>true</enabled>-->
  62. <!-- </snapshots>-->
  63. <!-- </repository>-->
  64. <!-- </repositories>-->
  65. <build>
  66. <plugins>
  67. <!-- 发布插件 -->
  68. <plugin>
  69. <groupId>org.apache.maven.plugins</groupId>
  70. <artifactId>maven-release-plugin</artifactId>
  71. <version>2.5.3</version>
  72. <configuration>
  73. <!--git用户名-->
  74. <username>trustsun@163.com</username>
  75. <!--git密码-->
  76. <password>q1993326326q</password>
  77. <!--mvn目标指令-->
  78. <goals>-f pom.xml deploy</goals>
  79. <tagNameFormat>v@{project.version}</tagNameFormat>
  80. <!-- 提示为各个子模块输入版本;如果值true,表示所有子模块采用与父模块相同的版本-->
  81. <arguments>-DskipTests -Dmaven.javadoc.skip=true -Dmaven.javadoc.failOnError=false</arguments>
  82. <autoVersionSubmodules>true</autoVersionSubmodules>
  83. <scmCommentPrefix>「版本发布」</scmCommentPrefix>
  84. </configuration>
  85. </plugin>
  86. <plugin>
  87. <groupId>org.apache.maven.plugins</groupId>
  88. <artifactId>maven-compiler-plugin</artifactId>
  89. <configuration>
  90. <source>${java.version}</source>
  91. <target>${java.version}</target>
  92. <encoding>${project.build.sourceEncoding}</encoding>
  93. </configuration>
  94. <version>${plugin.compiler.version}</version>
  95. </plugin>
  96. <plugin>
  97. <groupId>org.apache.maven.plugins</groupId>
  98. <artifactId>maven-jar-plugin</artifactId>
  99. <version>${plugin.jar.version}</version>
  100. </plugin>
  101. <plugin>
  102. <groupId>org.apache.maven.plugins</groupId>
  103. <artifactId>maven-deploy-plugin</artifactId>
  104. <version>${plugin.deploy.version}</version>
  105. </plugin>
  106. <plugin>
  107. <groupId>org.apache.maven.plugins</groupId>
  108. <artifactId>maven-source-plugin</artifactId>
  109. <version>${plugin.source.version}</version>
  110. <executions>
  111. <execution>
  112. <id>attach-sources</id>
  113. <phase>package</phase>
  114. <goals>
  115. <goal>jar-no-fork</goal>
  116. </goals>
  117. </execution>
  118. </executions>
  119. </plugin>
  120. </plugins>
  121. </build>
  122. </project>