228 lines
9.7 KiB
XML
228 lines
9.7 KiB
XML
<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>
|
||
<parent>
|
||
<groupId>com.alibaba.polardbx</groupId>
|
||
<artifactId>polardbx</artifactId>
|
||
<version>5.4.15-SNAPSHOT</version>
|
||
<relativePath>../pom.xml</relativePath>
|
||
</parent>
|
||
<groupId>com.alibaba.polardbx</groupId>
|
||
<artifactId>polardbx-server</artifactId>
|
||
<packaging>jar</packaging>
|
||
<name>${project.artifactId} module for polardbx ${project.version}</name>
|
||
|
||
<dependencies>
|
||
<dependency>
|
||
<groupId>${project.groupId}</groupId>
|
||
<artifactId>polardbx-rpc</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>${project.groupId}</groupId>
|
||
<artifactId>polardbx-transaction</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>${project.groupId}</groupId>
|
||
<artifactId>polardbx-optimizer</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>${project.groupId}</groupId>
|
||
<artifactId>polardbx-executor</artifactId>
|
||
<version>${project.version}</version>
|
||
<exclusions>
|
||
<exclusion>
|
||
<artifactId>commons-beanutils</artifactId>
|
||
<groupId>commons-beanutils</groupId>
|
||
</exclusion>
|
||
</exclusions>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>${project.groupId}</groupId>
|
||
<artifactId>polardbx-net</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.slf4j</groupId>
|
||
<artifactId>slf4j-api</artifactId>
|
||
<scope>compile</scope>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.slf4j</groupId>
|
||
<artifactId>jcl-over-slf4j</artifactId>
|
||
<scope>compile</scope>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>ch.qos.logback</groupId>
|
||
<artifactId>logback-classic</artifactId>
|
||
<scope>compile</scope>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>log4j</groupId>
|
||
<artifactId>log4j</artifactId>
|
||
<scope>compile</scope>
|
||
</dependency>
|
||
<!-- <dependency>-->
|
||
<!-- <groupId>org.jdom</groupId>-->
|
||
<!-- <artifactId>jdom</artifactId>-->
|
||
<!-- </dependency>-->
|
||
<dependency>
|
||
<groupId>com.googlecode.java-ipv6</groupId>
|
||
<artifactId>java-ipv6</artifactId>
|
||
<version>${java-ipv6.version}</version>
|
||
</dependency>
|
||
<!-- Test libs -->
|
||
<dependency>
|
||
<groupId>junit</groupId>
|
||
<artifactId>junit</artifactId>
|
||
<scope>test</scope>
|
||
</dependency>
|
||
</dependencies>
|
||
|
||
<build>
|
||
<plugins>
|
||
<!-- deploy模块的packaging通常是jar,如果项目中没有java 源代码或资源文件,加上这一段配置使项目能通过构建 -->
|
||
<plugin>
|
||
<artifactId>maven-jar-plugin</artifactId>
|
||
<configuration>
|
||
<archive>
|
||
<addMavenDescriptor>true</addMavenDescriptor>
|
||
</archive>
|
||
<excludes>
|
||
<exclude>**/logback.xml</exclude>
|
||
<exclude>**/server.properties</exclude>
|
||
</excludes>
|
||
</configuration>
|
||
</plugin>
|
||
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-assembly-plugin</artifactId>
|
||
<!-- 这是最新版本,推荐使用这个版本 -->
|
||
<version>2.2.1</version>
|
||
<executions>
|
||
<execution>
|
||
<id>assemble</id>
|
||
<goals>
|
||
<goal>single</goal>
|
||
</goals>
|
||
<phase>package</phase>
|
||
</execution>
|
||
</executions>
|
||
<configuration>
|
||
<appendAssemblyId>false</appendAssemblyId>
|
||
<attach>false</attach>
|
||
</configuration>
|
||
</plugin>
|
||
</plugins>
|
||
</build>
|
||
|
||
<profiles>
|
||
<profile>
|
||
<id>dev</id>
|
||
<activation>
|
||
<activeByDefault>true</activeByDefault>
|
||
<property>
|
||
<name>env</name>
|
||
<value>!release</value>
|
||
</property>
|
||
</activation>
|
||
|
||
<build>
|
||
<plugins>
|
||
<plugin>
|
||
<artifactId>maven-assembly-plugin</artifactId>
|
||
<configuration>
|
||
<!-- maven assembly插件需要一个描述文件 来告诉插件包的结构以及打包所需的文件来自哪里 -->
|
||
<descriptors>
|
||
<descriptor>${basedir}/src/main/assembly/dev.xml</descriptor>
|
||
</descriptors>
|
||
<finalName>polardbx-server</finalName>
|
||
<outputDirectory>${project.build.directory}</outputDirectory>
|
||
</configuration>
|
||
</plugin>
|
||
</plugins>
|
||
</build>
|
||
|
||
</profile>
|
||
|
||
<profile>
|
||
<id>release</id>
|
||
<activation>
|
||
<property>
|
||
<name>env</name>
|
||
<value>release</value>
|
||
</property>
|
||
</activation>
|
||
|
||
<build>
|
||
<plugins>
|
||
<plugin>
|
||
<groupId>pl.project13.maven</groupId>
|
||
<artifactId>git-commit-id-plugin</artifactId>
|
||
<version>2.1.15</version>
|
||
<executions>
|
||
<execution>
|
||
<goals>
|
||
<goal>revision</goal>
|
||
</goals>
|
||
</execution>
|
||
</executions>
|
||
<configuration>
|
||
<verbose>true</verbose>
|
||
<skip>false</skip>
|
||
<prefix>git</prefix>
|
||
<dotGitDirectory>../.git</dotGitDirectory>
|
||
<generateGitPropertiesFile>true</generateGitPropertiesFile>
|
||
<generateGitPropertiesFilename>
|
||
${project.basedir}/src/main/resources/META-INF/polardbx/git.properties
|
||
</generateGitPropertiesFilename>
|
||
<dateFormat>yyyy.MM.dd-HH.mm.ss</dateFormat>
|
||
<useNativeGit>false</useNativeGit>
|
||
<abbrevLength>7</abbrevLength>
|
||
<format>properties</format>
|
||
<gitDescribe>
|
||
<skip>false</skip>
|
||
<always>false</always>
|
||
<abbrev>7</abbrev>
|
||
<match>*</match>
|
||
<dirty>-DEVEL</dirty>
|
||
<forceLongFormat>false</forceLongFormat>
|
||
</gitDescribe>
|
||
<excludeProperties>
|
||
<excludeProperty>git.remote.origin.url</excludeProperty>
|
||
<excludeProperty>git.commit.message.short</excludeProperty>
|
||
<excludeProperty>git.commit.user.email</excludeProperty>
|
||
<excludeProperty>git.build.user.email</excludeProperty>
|
||
<excludeProperty>git.build.host</excludeProperty>
|
||
<excludeProperty>git.commit.id.describe-short</excludeProperty>
|
||
<excludeProperty>git.commit.id.abbrev</excludeProperty>
|
||
<excludeProperty>git.commit.id.describe</excludeProperty>
|
||
<excludeProperty>git.closest.tag.name</excludeProperty>
|
||
</excludeProperties>
|
||
<failOnNoGitDirectory>false</failOnNoGitDirectory>
|
||
<failOnUnableToExtractRepoInfo>true</failOnUnableToExtractRepoInfo>
|
||
</configuration>
|
||
</plugin>
|
||
|
||
<plugin>
|
||
<artifactId>maven-assembly-plugin</artifactId>
|
||
<configuration>
|
||
<!-- 发布模式使用的maven assembly插件描述文件 -->
|
||
<descriptors>
|
||
<descriptor>${basedir}/src/main/assembly/release.xml</descriptor>
|
||
</descriptors>
|
||
<!-- 如果一个应用的包含多个deploy模块,如果使用同样的包名, 如果把它们复制的一个目录中可能会失败,所以包名加了 artifactId以示区分 -->
|
||
<finalName>${project.artifactId}-${project.version}</finalName>
|
||
<!-- scm 要求 release 模式打出的包放到顶级目录下的target子目录中 -->
|
||
<outputDirectory>${project.parent.build.directory}</outputDirectory>
|
||
</configuration>
|
||
</plugin>
|
||
</plugins>
|
||
</build>
|
||
</profile>
|
||
</profiles>
|
||
</project>
|