123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <?xml version="1.0" encoding="UTF-8"?>
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>com.zhixinhuixue.test</groupId>
- <artifactId>test-maven-version</artifactId>
- <packaging>pom</packaging>
- <version>1.0.2</version>
- <!-- 项目属性配置(常量,别的地方可以引用) -->
- <properties>
- <java.version>1.8</java.version>
- <cloud.version>Hoxton.SR6</cloud.version>
- <boot.version>2.2.6.RELEASE</boot.version>
- <plugin.boot.version>2.2.6.RELEASE</plugin.boot.version>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <elasticsearch.version>5.6.16</elasticsearch.version>
- <plugin.compiler.version>3.8.1</plugin.compiler.version>
- <plugin.jar.version>3.2.0</plugin.jar.version>
- <plugin.deploy.version>2.8.2</plugin.deploy.version>
- <plugin.source.version>3.2.1</plugin.source.version>
- </properties>
- <modules>
- <module>api</module>
- <module>common</module>
- <module>model</module>
- </modules>
- <scm>
- <!--release包需要放入的nexus或者其他maven release包的仓库url地址-->
- <url>http://192.168.1.240:8847/nexus3/repository/maven-releases/</url>
- <!--connection, developerConnection: 都是连接字符串,其中后者是具有write权限的scm连接 -->
- <!--需要打包项目的git地址-->
- <developerConnection>scm:git:http://gitz.zhixinhuixue.net:18880/trustsun/test-maven-version.git
- </developerConnection>
- <!--需要打包项目的git地址-->
- <connection>scm:git:http://gitz.zhixinhuixue.net:18880/trustsun/test-maven-version.git</connection>
- <tag>v1.0.2</tag>
- </scm>
- <!--定义snapshots库和releases库的nexus3地址-->
- <distributionManagement>
- <snapshotRepository>
- <id>nexus-snapshots</id>
- <url>http://192.168.1.240:8847/nexus3/repository/maven-snapshots/</url>
- </snapshotRepository>
- <repository>
- <id>nexus-releases</id>
- <url>http://192.168.1.240:8847/nexus3/repository/maven-releases/</url>
- </repository>
- </distributionManagement>
- <!-- nexus3 -->
- <repositories>
- <repository>
- <id>nexus-public</id>
- <name>maven-public</name>
- <url>http://192.168.1.240:8847/nexus3/repository/maven-public/</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- </repositories>
- <build>
- <plugins>
- <!-- 发布插件 -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-release-plugin</artifactId>
- <version>2.5.3</version>
- <configuration>
- <!--git用户名-->
- <username>trustsun@163.com</username>
- <!--git密码-->
- <password>q1993326326q</password>
- <!--mvn目标指令-->
- <goals>-f pom.xml deploy</goals>
- <tagNameFormat>v@{project.version}</tagNameFormat>
- <!-- 提示为各个子模块输入版本;如果值true,表示所有子模块采用与父模块相同的版本-->
- <arguments>-DskipTests -Dmaven.javadoc.skip=true -Dmaven.javadoc.failOnError=false</arguments>
- <autoVersionSubmodules>true</autoVersionSubmodules>
- <scmCommentPrefix>「版本发布」</scmCommentPrefix>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>${java.version}</source>
- <target>${java.version}</target>
- <encoding>${project.build.sourceEncoding}</encoding>
- </configuration>
- <version>${plugin.compiler.version}</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>${plugin.jar.version}</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId>
- <version>${plugin.deploy.version}</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <version>${plugin.source.version}</version>
- <executions>
- <execution>
- <id>attach-sources</id>
- <phase>package</phase>
- <goals>
- <goal>jar-no-fork</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </project>
|