mirror of
https://github.com/actiontech/dble.git
synced 2026-01-24 22:08:30 -06:00
946 lines
28 KiB
XML
946 lines
28 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/maven-v4_0_0.xsd">
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<groupId>com.actionsky</groupId>
|
|
<artifactId>UShard</artifactId>
|
|
<version>2.17.07.0-dev</version>
|
|
<packaging>jar</packaging>
|
|
<name>UShard-server</name>
|
|
<description>The project of UShard-server</description>
|
|
|
|
<properties>
|
|
<app.encoding>UTF-8</app.encoding>
|
|
<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
|
|
<version.template.file>ushard.version.txt.template</version.template.file>
|
|
<version.file>version.txt</version.file>
|
|
<sever.comment>UShard Server</sever.comment>
|
|
<project.build.sourceEncoding>
|
|
UTF-8
|
|
</project.build.sourceEncoding>
|
|
<need.obfuscate>true</need.obfuscate>
|
|
</properties>
|
|
<repositories>
|
|
<repository>
|
|
<id>nexus-actiontech</id>
|
|
<name>nexus-actiontech</name>
|
|
<url>http://10.186.19.52:8081/nexus/content/groups/public</url>
|
|
</repository>
|
|
<repository>
|
|
<id>jenkins</id>
|
|
<name> Jenkins Releases Repository</name>
|
|
<url>http://repo.jenkins-ci.org/releases/</url>
|
|
</repository>
|
|
</repositories>
|
|
<pluginRepositories>
|
|
<pluginRepository>
|
|
<id>nexus-actiontech</id>
|
|
<name>nexus-actiontech</name>
|
|
<url>http://10.186.19.52:8081/nexus/content/groups/public</url>
|
|
</pluginRepository>
|
|
<pluginRepository>
|
|
<id>jenkins</id>
|
|
<name> Jenkins Releases Repository</name>
|
|
<url>http://repo.jenkins-ci.org/releases/</url>
|
|
</pluginRepository>
|
|
</pluginRepositories>
|
|
|
|
<dependencies>
|
|
<!-- <dependency> <groupId>com.google.guava</groupId> <artifactId>guava-parent</artifactId>
|
|
<version>18.0</version> </dependency> -->
|
|
<dependency>
|
|
<groupId>com.google.protobuf</groupId>
|
|
<artifactId>protobuf-java</artifactId>
|
|
<version>2.6.1</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.iq80.leveldb</groupId>
|
|
<artifactId>leveldb</artifactId>
|
|
<version>0.7</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.iq80.leveldb</groupId>
|
|
<artifactId>leveldb-api</artifactId>
|
|
<version>0.7</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.guava</groupId>
|
|
<artifactId>guava</artifactId>
|
|
<version>19.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.alibaba</groupId>
|
|
<artifactId>druid</artifactId>
|
|
<version>1.0.31</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>mysql</groupId>
|
|
<artifactId>mysql-connector-java</artifactId>
|
|
<version>5.1.35</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>net.sf.ehcache</groupId>
|
|
<artifactId>ehcache-core</artifactId>
|
|
<version>2.6.11</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.mapdb</groupId>
|
|
<artifactId>mapdb</artifactId>
|
|
<version>1.0.7</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>junit</groupId>
|
|
<artifactId>junit</artifactId>
|
|
<version>4.12</version>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.velocity</groupId>
|
|
<artifactId>velocity</artifactId>
|
|
<version>1.7</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.codehaus.jsr166-mirror</groupId>
|
|
<artifactId>jsr166y</artifactId>
|
|
<version>1.7.0</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.lmax</groupId>
|
|
<artifactId>disruptor</artifactId>
|
|
<version>3.3.6</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.logging.log4j</groupId>
|
|
<artifactId>log4j-slf4j-impl</artifactId>
|
|
<version>2.7</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.logging.log4j</groupId>
|
|
<artifactId>log4j-core</artifactId>
|
|
<version>2.7</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.logging.log4j</groupId>
|
|
<artifactId>log4j-1.2-api</artifactId>
|
|
<version>2.7</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>log4j</groupId>
|
|
<artifactId>log4j</artifactId>
|
|
<version>1.2.17</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.univocity</groupId>
|
|
<artifactId>univocity-parsers</artifactId>
|
|
<version>2.2.1</version>
|
|
<type>jar</type>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.google.code.gson</groupId>
|
|
<artifactId>gson</artifactId>
|
|
<version>2.8.0</version>
|
|
</dependency>
|
|
|
|
<!--DOM4J FOR XML -->
|
|
<dependency>
|
|
<groupId>dom4j</groupId>
|
|
<artifactId>dom4j</artifactId>
|
|
<version>1.6.1</version>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>xml-apis</groupId>
|
|
<artifactId>xml-apis</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
|
|
<!-- zookeeper -->
|
|
<dependency>
|
|
<groupId>org.apache.curator</groupId>
|
|
<artifactId>curator-framework</artifactId>
|
|
<version>2.11.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.curator</groupId>
|
|
<artifactId>curator-recipes</artifactId>
|
|
<version>2.11.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.curator</groupId>
|
|
<artifactId>curator-test</artifactId>
|
|
<version>2.11.0</version>
|
|
<scope>test</scope>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>log4j</groupId>
|
|
<artifactId>log4j</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.alibaba</groupId>
|
|
<artifactId>fastjson</artifactId>
|
|
<version>1.2.12</version>
|
|
</dependency>
|
|
<!-- joda日期处理工具 -->
|
|
<dependency>
|
|
<groupId>joda-time</groupId>
|
|
<artifactId>joda-time</artifactId>
|
|
<version>2.9.3</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.mockito</groupId>
|
|
<artifactId>mockito-all</artifactId>
|
|
<version>1.8.5</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.google.code.findbugs</groupId>
|
|
<artifactId>jsr305</artifactId>
|
|
<version>2.0.3</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.esotericsoftware.kryo</groupId>
|
|
<artifactId>kryo</artifactId>
|
|
<version>2.10</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.hamcrest</groupId>
|
|
<artifactId>hamcrest-library</artifactId>
|
|
<version>1.3</version>
|
|
</dependency>
|
|
|
|
|
|
<!-- https://mvnrepository.com/artifact/commons-lang/commons-lang -->
|
|
<dependency>
|
|
<groupId>commons-lang</groupId>
|
|
<artifactId>commons-lang</artifactId>
|
|
<version>2.6</version>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
|
|
<build>
|
|
<!-- finalName>${artifactId}-${version}-${buildNumber}</finalName -->
|
|
<resources>
|
|
<resource>
|
|
<directory>src/main/resources</directory>
|
|
<includes>
|
|
<include>*.dtd</include>
|
|
</includes>
|
|
</resource>
|
|
</resources>
|
|
<testResources>
|
|
<testResource>
|
|
<directory>src/test/resources</directory>
|
|
<excludes>
|
|
<exclude>**/.svn/**</exclude>
|
|
<exclude>rule_template.xml</exclude>
|
|
<exclude>schema_template.xml</exclude>
|
|
<exclude>server_template.xml</exclude>
|
|
</excludes>
|
|
</testResource>
|
|
</testResources>
|
|
<pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.eclipse.m2e</groupId>
|
|
<artifactId>lifecycle-mapping</artifactId>
|
|
<version>1.0.0</version>
|
|
<configuration>
|
|
<lifecycleMappingMetadata>
|
|
<pluginExecutions>
|
|
<pluginExecution>
|
|
<pluginExecutionFilter>
|
|
<groupId>com.google.code.maven-replacer-plugin</groupId>
|
|
<artifactId>replacer</artifactId>
|
|
<versionRange>[1.0.0,)</versionRange>
|
|
<goals>
|
|
<goal>replace</goal>
|
|
</goals>
|
|
</pluginExecutionFilter>
|
|
<action>
|
|
<ignore />
|
|
</action>
|
|
</pluginExecution>
|
|
<pluginExecution>
|
|
<pluginExecutionFilter>
|
|
<groupId>
|
|
org.apache.maven.plugins
|
|
</groupId>
|
|
<artifactId>
|
|
maven-compiler-plugin
|
|
</artifactId>
|
|
<versionRange>
|
|
[3.1,)
|
|
</versionRange>
|
|
<goals>
|
|
<goal>compile</goal>
|
|
</goals>
|
|
</pluginExecutionFilter>
|
|
<action>
|
|
<ignore></ignore>
|
|
</action>
|
|
</pluginExecution>
|
|
</pluginExecutions>
|
|
</lifecycleMappingMetadata>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<configuration>
|
|
<compilerId>javac-with-errorprone</compilerId>
|
|
<forceJavacCompilerUse>true</forceJavacCompilerUse>
|
|
<!-- maven-compiler-plugin defaults to targeting Java 5, but our javac
|
|
only supports >=6 -->
|
|
<source>1.7</source>
|
|
<target>1.7</target>
|
|
<encoding>${app.encoding}</encoding>
|
|
</configuration>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.codehaus.plexus</groupId>
|
|
<artifactId>plexus-compiler-javac-errorprone</artifactId>
|
|
<version>2.8</version>
|
|
</dependency>
|
|
<!-- override plexus-compiler-javac-errorprone's dependency on Error Prone
|
|
with the latest version -->
|
|
<dependency>
|
|
<groupId>com.google.errorprone</groupId>
|
|
<artifactId>error_prone_core</artifactId>
|
|
<version>2.0.5</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-source-plugin</artifactId>
|
|
<version>2.1.2</version>
|
|
<configuration>
|
|
<encoding>${app.encoding}</encoding>
|
|
<attach>true</attach>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>attach-sources</id>
|
|
<goals>
|
|
<goal>jar-no-fork</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<configuration>
|
|
<excludes>
|
|
<exclude>**/.svn/**</exclude>
|
|
</excludes>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>test-jar</goal>
|
|
</goals>
|
|
<!-- configuration> <finalName>${project.build.finalName}-${buildNumber}</finalName>
|
|
</configuration -->
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-eclipse-plugin</artifactId>
|
|
<configuration>
|
|
<sourceExcludes>
|
|
<sourceExclude>**/.svn/**</sourceExclude>
|
|
</sourceExcludes>
|
|
<downloadSources>true</downloadSources>
|
|
<outputDirectory>classes</outputDirectory>
|
|
<additionalConfig>
|
|
<file>
|
|
<name>.settings/org.eclipse.core.resources.prefs</name>
|
|
<content>
|
|
<![CDATA[eclipse.preferences.version=1${line.separator}encoding/<project>=${app.encoding}${line.separator}]]>
|
|
</content>
|
|
</file>
|
|
</additionalConfig>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<artifactId>maven-resources-plugin</artifactId>
|
|
<version>3.0.2</version>
|
|
<executions>
|
|
<execution>
|
|
<id>copy-resources</id>
|
|
<!-- here the phase you need -->
|
|
<phase>validate</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>src/main/resources</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>ushard</directory>
|
|
<filtering>true</filtering>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>buildnumber-maven-plugin</artifactId>
|
|
<version>1.3</version>
|
|
<executions>
|
|
<execution>
|
|
<phase>validate</phase>
|
|
<goals>
|
|
<goal>create-timestamp</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<timestampFormat>yyyyMMddHHmmss</timestampFormat>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>com.github.os72</groupId>
|
|
<artifactId>protoc-jar-maven-plugin</artifactId>
|
|
<version>3.3.0.1</version>
|
|
<executions>
|
|
<execution>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>run</goal>
|
|
</goals>
|
|
<configuration>
|
|
<protocVersion>2.6.1</protocVersion> <!-- 2.4.1, 2.5.0, 2.6.1, 3.3.0 -->
|
|
<inputDirectories>
|
|
<include>src/main/assembly/ushard</include>
|
|
</inputDirectories>
|
|
<outputTargets>
|
|
<outputTarget>
|
|
<type>java</type>
|
|
<addSources>none</addSources>
|
|
<outputDirectory>src/main/java</outputDirectory>
|
|
</outputTarget>
|
|
</outputTargets>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>com.google.code.maven-replacer-plugin</groupId>
|
|
<artifactId>replacer</artifactId>
|
|
<version>1.5.3</version>
|
|
<executions>
|
|
<execution>
|
|
<id>version</id>
|
|
<phase>process-sources</phase>
|
|
<goals>
|
|
<goal>replace</goal>
|
|
</goals>
|
|
<configuration>
|
|
<file>${project.basedir}/${version.template.file}</file>
|
|
<outputFile>${project.basedir}/${version.file}</outputFile>
|
|
<replacements>
|
|
<replacement>
|
|
<token>@buildtime@</token>
|
|
<value>${maven.build.timestamp}</value>
|
|
</replacement>
|
|
<replacement>
|
|
<token>@pomversion@</token>
|
|
<value>${project.version}</value>
|
|
</replacement>
|
|
</replacements>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>rule.dtd</id>
|
|
<phase>process-sources</phase>
|
|
<goals>
|
|
<goal>replace</goal>
|
|
</goals>
|
|
<configuration>
|
|
<file>${project.basedir}/src/main/resources/rule.dtd</file>
|
|
<outputFile>${project.basedir}/src/main/resources/rule.dtd</outputFile>
|
|
<replacements>
|
|
<replacement>
|
|
<token>mycat</token>
|
|
<value>ushard</value>
|
|
</replacement>
|
|
</replacements>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>SystemConfig</id>
|
|
<phase>process-sources</phase>
|
|
<goals>
|
|
<goal>replace</goal>
|
|
</goals>
|
|
<configuration>
|
|
<file>${project.basedir}/src/main/java/io/mycat/config/model/SystemConfig.java</file>
|
|
<outputFile>${project.basedir}/src/main/java/io/mycat/config/model/SystemConfig.java</outputFile>
|
|
<replacements>
|
|
<replacement>
|
|
<token>MYCAT_HOME</token>
|
|
<value>USHARD_HOME</value>
|
|
</replacement>
|
|
</replacements>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>IncrSequenceMySQLHandler</id>
|
|
<phase>process-sources</phase>
|
|
<goals>
|
|
<goal>replace</goal>
|
|
</goals>
|
|
<configuration>
|
|
<file>${project.basedir}/src/main/java/io/mycat/route/sequence/handler/SequenceVal.java</file>
|
|
<outputFile>${project.basedir}/src/main/java/io/mycat/route/sequence/handler/SequenceVal.java</outputFile>
|
|
<replacements>
|
|
<replacement>
|
|
<token>mycat_seq_nextval</token>
|
|
<value>ushard_seq_nextval</value>
|
|
</replacement>
|
|
</replacements>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>init_zk_data</id>
|
|
<phase>process-sources</phase>
|
|
<goals>
|
|
<goal>replace</goal>
|
|
</goals>
|
|
<configuration>
|
|
<file>${project.basedir}/src/main/assembly/bin/init_zk_data.sh</file>
|
|
<outputFile>${project.basedir}/src/main/assembly/bin/init_zk_data.sh</outputFile>
|
|
<replacements>
|
|
<replacement>
|
|
<token>MYCAT</token>
|
|
<value>USHARD</value>
|
|
</replacement>
|
|
<replacement>
|
|
<token>io.mycat.MycatStartup</token>
|
|
<value>com.actionsky.ushard.UshardStartup</value>
|
|
</replacement>
|
|
</replacements>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>startup_nowrap</id>
|
|
<phase>process-sources</phase>
|
|
<goals>
|
|
<goal>replace</goal>
|
|
</goals>
|
|
<configuration>
|
|
<file>${project.basedir}/src/main/assembly/bin/startup_nowrap.sh</file>
|
|
<outputFile>${project.basedir}/src/main/assembly/bin/startup_nowrap.sh</outputFile>
|
|
<replacements>
|
|
<replacement>
|
|
<token>MYCAT</token>
|
|
<value>USHARD</value>
|
|
</replacement>
|
|
</replacements>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>schema.dtd</id>
|
|
<phase>process-sources</phase>
|
|
<goals>
|
|
<goal>replace</goal>
|
|
</goals>
|
|
<configuration>
|
|
<file>${project.basedir}/src/main/resources/schema.dtd</file>
|
|
<outputFile>${project.basedir}/src/main/resources/schema.dtd</outputFile>
|
|
<replacements>
|
|
<replacement>
|
|
<token>mycat</token>
|
|
<value>ushard</value>
|
|
</replacement>
|
|
</replacements>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>dbseq.sql</id>
|
|
<phase>process-sources</phase>
|
|
<goals>
|
|
<goal>replace</goal>
|
|
</goals>
|
|
<configuration>
|
|
<file>${project.basedir}/src/main/resources/dbseq.sql</file>
|
|
<outputFile>${project.basedir}/src/main/resources/dbseq.sql</outputFile>
|
|
<replacements>
|
|
<replacement>
|
|
<token>mycat</token>
|
|
<value>ushard</value>
|
|
</replacement>
|
|
<replacement>
|
|
<token>MYCAT</token>
|
|
<value>USHARD</value>
|
|
</replacement>
|
|
</replacements>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>log4j2.xml</id>
|
|
<phase>process-sources</phase>
|
|
<goals>
|
|
<goal>replace</goal>
|
|
</goals>
|
|
<configuration>
|
|
<file>${project.basedir}/src/main/assembly/conf/log4j2.xml</file>
|
|
<outputFile>${project.basedir}/src/main/assembly/conf/log4j2.xml</outputFile>
|
|
<replacements>
|
|
<replacement>
|
|
<token>mycat</token>
|
|
<value>ushard</value>
|
|
</replacement>
|
|
<replacement>
|
|
<token>MYCAT_HOME</token>
|
|
<value>USHARD_HOME</value>
|
|
</replacement>
|
|
|
|
</replacements>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>server.dtd</id>
|
|
<phase>process-sources</phase>
|
|
<goals>
|
|
<goal>replace</goal>
|
|
</goals>
|
|
<configuration>
|
|
<file>${project.basedir}/src/main/resources/server.dtd</file>
|
|
<outputFile>${project.basedir}/src/main/resources/server.dtd</outputFile>
|
|
<replacements>
|
|
<replacement>
|
|
<token>mycat</token>
|
|
<value>ushard</value>
|
|
</replacement>
|
|
</replacements>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>MycatServer.java</id>
|
|
<phase>process-sources</phase>
|
|
<goals>
|
|
<goal>replace</goal>
|
|
</goals>
|
|
<configuration>
|
|
<file>${project.basedir}/src/main/java/io/mycat/MycatServer.java</file>
|
|
<outputFile>${project.basedir}/src/main/java/io/mycat/MycatServer.java</outputFile>
|
|
<replacements>
|
|
<replacement>
|
|
<token>MyCat_</token>
|
|
<value>Ushard_</value>
|
|
</replacement>
|
|
</replacements>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>GlobalTableUtil.java</id>
|
|
<phase>process-sources</phase>
|
|
<goals>
|
|
<goal>replace</goal>
|
|
</goals>
|
|
<configuration>
|
|
<file>${project.basedir}/src/main/java/io/mycat/server/util/GlobalTableUtil.java</file>
|
|
<outputFile>${project.basedir}/src/main/java/io/mycat/server/util/GlobalTableUtil.java</outputFile>
|
|
<replacements>
|
|
<replacement>
|
|
<token>_mycat_op_time</token>
|
|
<value>_ushard_op_time</value>
|
|
</replacement>
|
|
</replacements>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>ShowServerLog.java</id>
|
|
<phase>process-sources</phase>
|
|
<goals>
|
|
<goal>replace</goal>
|
|
</goals>
|
|
<configuration>
|
|
<file>${project.basedir}/src/main/java/io/mycat/manager/handler/ShowServerLog.java</file>
|
|
<outputFile>${project.basedir}/src/main/java/io/mycat/manager/handler/ShowServerLog.java</outputFile>
|
|
<replacements>
|
|
<replacement>
|
|
<token>mycat.log</token>
|
|
<value>ushard.log</value>
|
|
</replacement>
|
|
</replacements>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>version2</id>
|
|
<phase>process-sources</phase>
|
|
<goals>
|
|
<goal>replace</goal>
|
|
</goals>
|
|
<configuration>
|
|
<file>${project.basedir}/src/main/java/io/mycat/config/Versions.template</file>
|
|
<outputFile>${project.basedir}/src/main/java/io/mycat/config/Versions.java</outputFile>
|
|
<replacements>
|
|
<replacement>
|
|
<token>@server-version@</token>
|
|
<value>5.6.29-ushard-${project.version}-${timestamp}</value>
|
|
</replacement>
|
|
<replacement>
|
|
<token>@version-comment@</token>
|
|
<value>${sever.comment}</value>
|
|
</replacement>
|
|
<replacement>
|
|
<token>@annotation-name@</token>
|
|
<value>ushard:</value>
|
|
</replacement>
|
|
<replacement>
|
|
<token>@root_prefix@</token>
|
|
<value>ushard</value>
|
|
</replacement>
|
|
</replacements>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-shade-plugin</artifactId>
|
|
<version>3.0.0</version>
|
|
<executions>
|
|
<execution>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>shade</goal>
|
|
</goals>
|
|
<configuration>
|
|
<filters>
|
|
<filter>
|
|
<artifact>*:*</artifact>
|
|
<includes>
|
|
<include>com/actionsky/ushard/**</include>
|
|
<include>io/mycat/**</include>
|
|
<include>server.dtd</include>
|
|
<include>schema.dtd</include>
|
|
<include>rule.dtd</include>
|
|
<include>META-INF/MANIFEST.MF</include>
|
|
</includes>
|
|
<excludes>
|
|
<exclude>io/mycat/meta/protocol/**</exclude>
|
|
</excludes>
|
|
</filter>
|
|
</filters>
|
|
<relocations>
|
|
<relocation>
|
|
<pattern>io.mycat.Mycat</pattern>
|
|
<shadedPattern>com.actionsky.ushard.Ushard</shadedPattern>
|
|
</relocation>
|
|
<relocation>
|
|
<pattern>io.mycat.config.Mycat</pattern>
|
|
<shadedPattern>com.actionsky.ushard.config.Ushard</shadedPattern>
|
|
</relocation>
|
|
<relocation>
|
|
<pattern>io.mycat.config.model.Mycat</pattern>
|
|
<shadedPattern>com.actionsky.ushard.config.model.Ushard</shadedPattern>
|
|
</relocation>
|
|
<relocation>
|
|
<pattern>io.mycat.memory.MyCat</pattern>
|
|
<shadedPattern>com.actionsky.ushard.memory.Ushard</shadedPattern>
|
|
</relocation>
|
|
<relocation>
|
|
<pattern>io.mycat.memory.unsafe.utils.Mycat</pattern>
|
|
<shadedPattern>com.actionsky.ushard.memory.unsafe.utils.Ushard</shadedPattern>
|
|
</relocation>
|
|
<relocation>
|
|
<pattern>io.mycat.route.parser.druid.Mycat</pattern>
|
|
<shadedPattern>com.actionsky.ushard.route.parser.druid.Ushard</shadedPattern>
|
|
</relocation>
|
|
<relocation>
|
|
<pattern>io.mycat.route.impl.DruidMycatRouteStrategy</pattern>
|
|
<shadedPattern>com.actionsky.ushard.route.impl.DruidUshardRouteStrategy</shadedPattern>
|
|
</relocation>
|
|
<relocation>
|
|
<pattern>io.mycat</pattern>
|
|
<shadedPattern>com.actionsky.ushard</shadedPattern>
|
|
</relocation>
|
|
</relocations>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>com.github.wvengen</groupId>
|
|
<artifactId>proguard-maven-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>proguard</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<obfuscate>${need.obfuscate}</obfuscate>
|
|
<options>
|
|
<option>-ignorewarnings</option> <!--忽略所有告警-->
|
|
<option>-dontshrink</option> <!--不做 shrink -->
|
|
<option>-dontoptimize</option> <!--不做 optimize -->
|
|
<option>-dontskipnonpubliclibraryclasses</option>
|
|
<option>-dontskipnonpubliclibraryclassmembers</option>
|
|
<option>-keep class **.package-info</option><!--保持包注解类-->
|
|
<option>-keepattributes Signature</option><!--JAXB NEED-->
|
|
<option>-keepattributes SourceFile,LineNumberTable,*Annotation*</option><!--保持源码名与行号-->
|
|
<option>-keepclassmembers enum com.actionsky.ushard.**{ *;}</option><!--保持枚举中的名子,确保枚举 valueOf 可以使用-->
|
|
<option>-keep class com.actionsky.ushard.UshardStartup{*;}</option><!--启动类-->
|
|
<option>-keep class com.actionsky.ushard.util.ResourceUtil{*;}</option><!--外部资源加载类-->
|
|
<option>-keep class com.actionsky.ushard.route.function.**{*;}</option><!--算法加载-->
|
|
<option>-keep class com.actionsky.ushard.config.model.SystemConfig{*;}</option><!--配置类-->
|
|
</options>
|
|
<injar>${project.build.finalName}.jar</injar>
|
|
<outjar>${project.build.finalName}.jar</outjar>
|
|
<libs>
|
|
<lib>${java.home}/lib/rt.jar</lib>
|
|
</libs>
|
|
</configuration>
|
|
</plugin>
|
|
<!-- -->
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>appassembler-maven-plugin</artifactId>
|
|
<version>1.7</version>
|
|
<configuration>
|
|
<configurationDirectory>conf</configurationDirectory>
|
|
<includeConfigurationDirectoryInClasspath>true</includeConfigurationDirectoryInClasspath>
|
|
<repositoryLayout>flat</repositoryLayout>
|
|
<useWildcardClassPath>true</useWildcardClassPath>
|
|
<daemons>
|
|
<daemon>
|
|
<id>ushard</id>
|
|
<mainClass>com.actionsky.ushard.UshardStartup</mainClass>
|
|
<commandLineArguments>
|
|
<commandLineArgument>start</commandLineArgument>
|
|
</commandLineArguments>
|
|
<platforms>
|
|
<platform>jsw</platform>
|
|
</platforms>
|
|
<jvmSettings>
|
|
<!-- 启动内存配置 -->
|
|
<maxStackSize>128</maxStackSize>
|
|
<systemProperties>
|
|
<systemProperty>USHARD_HOME=.</systemProperty>
|
|
</systemProperties>
|
|
<extraArguments>
|
|
<extraArgument>-server </extraArgument>
|
|
<extraArgument>-XX:MaxPermSize=64M</extraArgument>
|
|
<extraArgument>-XX:+AggressiveOpts</extraArgument>
|
|
<extraArgument>-XX:MaxDirectMemorySize=2G</extraArgument>
|
|
<!-- 远程JMX -->
|
|
<extraArgument>-Dcom.sun.management.jmxremote </extraArgument>
|
|
<extraArgument>-Dcom.sun.management.jmxremote.port=1984</extraArgument>
|
|
<extraArgument>-Dcom.sun.management.jmxremote.authenticate=false </extraArgument>
|
|
<extraArgument>-Dcom.sun.management.jmxremote.ssl=false </extraArgument>
|
|
<extraArgument>-Xmx4G</extraArgument>
|
|
<extraArgument>-Xms1G</extraArgument>
|
|
</extraArguments>
|
|
</jvmSettings>
|
|
<generatorConfigurations>
|
|
<generatorConfiguration>
|
|
<generator>jsw</generator>
|
|
<includes>
|
|
<include>aix-ppc-32</include>
|
|
<include>aix-ppc-64</include>
|
|
<include>hpux-parisc-64</include>
|
|
<include>linux-x86-32</include>
|
|
<include>linux-x86-64</include>
|
|
<include>linux-ppc-64</include>
|
|
<include>macosx-ppc-32</include>
|
|
<include>macosx-x86-universal-32</include>
|
|
<include>macosx-universal-32</include>
|
|
<include>macosx-universal-64</include>
|
|
<include>solaris-sparc-32</include>
|
|
<include>solaris-sparc-64</include>
|
|
<include>solaris-x86-32</include>
|
|
<include>windows-x86-32</include>
|
|
<include>windows-x86-64</include>
|
|
</includes>
|
|
|
|
<configuration>
|
|
<property>
|
|
<name>configuration.directory.in.classpath.first</name>
|
|
<value>conf</value>
|
|
</property>
|
|
<property>
|
|
<name>wrapper.ping.timeout</name>
|
|
<value>120</value>
|
|
</property>
|
|
<property>
|
|
<name>set.default.REPO_DIR</name>
|
|
<value>lib</value>
|
|
</property>
|
|
<property>
|
|
<name>wrapper.logfile</name>
|
|
<value>logs/wrapper.log</value>
|
|
</property>
|
|
</configuration>
|
|
|
|
</generatorConfiguration>
|
|
</generatorConfigurations>
|
|
</daemon>
|
|
|
|
</daemons>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>generate-jsw</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>generate-daemons</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|
<configuration>
|
|
<descriptors>
|
|
<descriptor>src/main/assembly/ushard/assembly-ushard-linux.xml</descriptor>
|
|
</descriptors>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>make-assembly</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>single</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
|
|
</plugins>
|
|
</build>
|
|
|
|
|
|
</project>
|