mirror of
https://gitee.com/willfree/min-dev-java.git
synced 2026-06-03 16:16:14 +08:00
404 lines
16 KiB
XML
404 lines
16 KiB
XML
<?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>min</groupId>
|
|
<artifactId>min-dev-java</artifactId>
|
|
<version>1.0</version>
|
|
<properties>
|
|
<maven.compiler.target>1.8</maven.compiler.target>
|
|
<maven.compiler.source>1.8</maven.compiler.source>
|
|
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
|
</properties>
|
|
|
|
<build>
|
|
<resources>
|
|
<resource>
|
|
<directory>lib</directory>
|
|
<includes>
|
|
<include>**/*.jar</include>
|
|
</includes>
|
|
</resource>
|
|
<resource>
|
|
<directory>src/main/resources</directory>
|
|
<includes>
|
|
<include>**/*</include>
|
|
</includes>
|
|
</resource>
|
|
</resources>
|
|
<plugins>
|
|
<!-- 第三种方案:maven-shade-plugin-->
|
|
<!-- <plugin>-->
|
|
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
|
<!-- <artifactId>maven-shade-plugin</artifactId>-->
|
|
<!-- <version>2.4.3</version>-->
|
|
<!-- <executions>-->
|
|
<!-- <execution>-->
|
|
<!-- <phase>package</phase>-->
|
|
<!-- <goals>-->
|
|
<!-- <goal>shade</goal>-->
|
|
<!-- </goals>-->
|
|
<!--<!– <configuration>–>-->
|
|
<!--<!– <transformers>–>-->
|
|
<!--<!– <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">–>-->
|
|
<!--<!– <mainClass>com.saferycom.batch.job.ApplicationV2</mainClass>–>-->
|
|
<!--<!– </transformer>–>-->
|
|
<!--<!– </transformers>–>-->
|
|
<!--<!– </configuration>–>-->
|
|
<!-- </execution>-->
|
|
<!-- </executions>-->
|
|
<!-- </plugin>-->
|
|
|
|
<!-- 第二种方案:maven-assembly-plugin,非轻量化时的首选方案-->
|
|
<!-- Maven Assembly Plugin 2.4.1-->
|
|
<!-- <plugin>-->
|
|
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
|
<!-- <artifactId>maven-assembly-plugin</artifactId>-->
|
|
<!-- <version>3.3.0</version>-->
|
|
<!-- <configuration>-->
|
|
<!--<!– get all project dependencies –>-->
|
|
<!--<!– <descriptorRefs>–>-->
|
|
<!--<!– <descriptorRef>jar-with-dependencies</descriptorRef>–>-->
|
|
<!--<!– </descriptorRefs>–>-->
|
|
<!-- <descriptors>-->
|
|
<!-- <!–assembly配置文件路径,注意需要在项目中新建文件properties/assembly-release.xml–>-->
|
|
<!-- <descriptor>properties/assembly-release.xml</descriptor>-->
|
|
<!-- </descriptors>-->
|
|
<!-- <!– MainClass in mainfest make a executable jar –>-->
|
|
<!-- <archive>-->
|
|
<!-- <manifest>-->
|
|
<!-- <mainClass>min.Main</mainClass>-->
|
|
<!-- </manifest>-->
|
|
<!-- <manifestEntries>-->
|
|
<!-- <Class-Path>lib/*.jar</Class-Path>-->
|
|
<!-- </manifestEntries>-->
|
|
<!-- </archive>-->
|
|
<!-- </configuration>-->
|
|
<!-- <executions>-->
|
|
<!-- <execution>-->
|
|
<!-- <id>make-assembly</id>-->
|
|
<!-- <!– bind to the packaging phase –>-->
|
|
<!-- <phase>package</phase>-->
|
|
<!-- <goals>-->
|
|
<!-- <goal>single</goal>-->
|
|
<!-- </goals>-->
|
|
<!-- </execution>-->
|
|
<!-- </executions>-->
|
|
<!-- </plugin>-->
|
|
|
|
<!-- 第n种方案,中移要求的安卓SDK轻量化,那么这个项目也要尽可能的小,使用minimizeJar来轻量化-->
|
|
<!-- 引入 maven-shade-plugin 插件 -->
|
|
<!-- 使用这个插件,lib目录下的commons-codec-1.15.jar要手动放在安卓端,否则会报错缺少类-->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-shade-plugin</artifactId>
|
|
<version>3.3.0</version>
|
|
<executions>
|
|
<execution>
|
|
<!-- 绑定 Maven 生命周期的 package 阶段 -->
|
|
<phase>package</phase>
|
|
<goals>
|
|
<!-- package 阶段执行时,让其调用插件的 repackage 目标 -->
|
|
<goal>shade</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<transformers>
|
|
<!-- 设置 META-INF/spring.handlers 文件追加而非覆盖 -->
|
|
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
|
|
<resource>META-INF/spring.handlers</resource>
|
|
</transformer>
|
|
<!-- 设置 META-INF/spring.schemas 文件追加而非覆盖 -->
|
|
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
|
|
<resource>META-INF/spring.schemas</resource>
|
|
</transformer>
|
|
<!-- 设置 META-INF/spring.factories文件追加而非覆盖 -->
|
|
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
|
|
<resource>META-INF/spring.factories</resource>
|
|
</transformer>
|
|
<!-- 设置 Java SPI 追加而非覆盖 -->
|
|
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
|
|
</transformers>
|
|
<minimizeJar>true</minimizeJar>
|
|
<filters>
|
|
<filter>
|
|
<artifact>org.bouncycastle:bcpkix-jdk15on</artifact>
|
|
<includes>
|
|
<include>**</include>
|
|
</includes>
|
|
</filter>
|
|
</filters>
|
|
</configuration>
|
|
</plugin>
|
|
<!-- 第一种方案:onejar-->
|
|
<!-- <plugin>-->
|
|
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
|
<!-- <artifactId>maven-jar-plugin</artifactId>-->
|
|
<!-- <configuration>-->
|
|
<!-- <archive>-->
|
|
<!-- <manifest>-->
|
|
<!-- <mainClass>org.noahx.onejartest.Launcher</mainClass>-->
|
|
<!-- </manifest>-->
|
|
<!-- </archive>-->
|
|
<!-- </configuration>-->
|
|
<!-- </plugin>-->
|
|
|
|
<!-- <plugin>-->
|
|
<!-- <groupId>com.jolira</groupId>-->
|
|
<!-- <artifactId>onejar-maven-plugin</artifactId>-->
|
|
<!-- <version>1.4.4</version>-->
|
|
<!-- <executions>-->
|
|
<!-- <execution>-->
|
|
<!-- <configuration>-->
|
|
<!-- <attachToBuild>true</attachToBuild>-->
|
|
<!-- <classifier>onejar</classifier>-->
|
|
<!-- </configuration>-->
|
|
<!-- <goals>-->
|
|
<!-- <goal>one-jar</goal>-->
|
|
<!-- </goals>-->
|
|
<!-- </execution>-->
|
|
<!-- </executions>-->
|
|
<!-- </plugin>-->
|
|
<!-- <plugin>-->
|
|
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
|
<!-- <artifactId>maven-assembly-plugin</artifactId>-->
|
|
<!-- <version>2.4.1</version>-->
|
|
<!-- <configuration>-->
|
|
<!-- <!– get all project dependencies –>-->
|
|
<!-- <descriptorRefs>-->
|
|
<!-- <descriptorRef>jar-with-dependencies</descriptorRef>-->
|
|
<!-- </descriptorRefs>-->
|
|
<!-- <!– MainClass in mainfest make a executable jar –>-->
|
|
<!--<!– <archive>–>-->
|
|
<!--<!– <manifest>–>-->
|
|
<!--<!– <mainClass></mainClass>–>-->
|
|
<!--<!– </manifest>–>-->
|
|
<!--<!– </archive>–>-->
|
|
<!-- </configuration>-->
|
|
<!-- <executions>-->
|
|
<!-- <execution>-->
|
|
<!-- <id>make-assembly</id>-->
|
|
<!-- <!– bind to the packaging phase –>-->
|
|
<!-- <phase>package</phase>-->
|
|
<!-- <goals>-->
|
|
<!-- <goal>single</goal>-->
|
|
<!-- </goals>-->
|
|
<!-- </execution>-->
|
|
<!-- </executions>-->
|
|
<!-- </plugin>-->
|
|
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<configuration>
|
|
<source>8</source>
|
|
<target>8</target>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<configuration>
|
|
<skipTests>true</skipTests>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
<dependencies>
|
|
<!-- 摘要运算-->
|
|
<!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
|
|
<!-- <dependency>-->
|
|
<!-- <groupId>commons-codec</groupId>-->
|
|
<!-- <artifactId>commons-codec</artifactId>-->
|
|
<!-- <version>1.15</version>-->
|
|
<!-- </dependency>-->
|
|
<dependency>
|
|
<groupId>edu.pku.commons-codec</groupId>
|
|
<artifactId>commons-codec</artifactId>
|
|
<version>1.15</version>
|
|
<scope>system</scope>
|
|
<systemPath>${project.basedir}/lib/commons-codec-1.15.jar</systemPath>
|
|
</dependency>
|
|
|
|
<!-- https://mvnrepository.com/artifact/junit/junit -->
|
|
<!-- 单元测试 -->
|
|
<dependency>
|
|
<groupId>junit</groupId>
|
|
<artifactId>junit</artifactId>
|
|
<version>4.12</version>
|
|
<scope>test</scope>
|
|
<exclusions>
|
|
<exclusion>
|
|
<artifactId>hamcrest-core</artifactId>
|
|
<groupId>org.hamcrest</groupId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter-api</artifactId>
|
|
<version>5.6.0</version>
|
|
<scope>test</scope>
|
|
<exclusions>
|
|
<exclusion>
|
|
<artifactId>apiguardian-api</artifactId>
|
|
<groupId>org.apiguardian</groupId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<artifactId>junit-platform-commons</artifactId>
|
|
<groupId>org.junit.platform</groupId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
|
|
<!-- bc库, 国密算法-->
|
|
<dependency>
|
|
<groupId>org.bouncycastle</groupId>
|
|
<artifactId>bcprov-jdk15on</artifactId>
|
|
<version>1.65</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.bouncycastle</groupId>
|
|
<artifactId>bcpkix-jdk15on</artifactId>
|
|
<version>1.65</version>
|
|
</dependency>
|
|
|
|
<!-- 日志 为了与安卓适配,本项目所有日志均采用java原生logging库-->
|
|
<!-- <dependency>-->
|
|
<!-- <groupId>org.slf4j</groupId>-->
|
|
<!-- <artifactId>slf4j-api</artifactId>-->
|
|
<!-- <version>1.7.5</version>-->
|
|
<!-- </dependency>-->
|
|
<!-- <dependency>-->
|
|
<!-- <groupId>ch.qos.logback</groupId>-->
|
|
<!-- <artifactId>logback-core</artifactId>-->
|
|
<!-- <version>1.2.3</version>-->
|
|
<!-- </dependency>-->
|
|
<!-- <dependency>-->
|
|
<!-- <groupId>ch.qos.logback</groupId>-->
|
|
<!-- <artifactId>logback-classic</artifactId>-->
|
|
<!-- <version>1.2.3</version>-->
|
|
<!-- </dependency>-->
|
|
|
|
<!-- json -->
|
|
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
<artifactId>jackson-core</artifactId>
|
|
<version>2.2.3</version>
|
|
</dependency>
|
|
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
<artifactId>jackson-annotations</artifactId>
|
|
<version>2.2.3</version>
|
|
</dependency>
|
|
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
<artifactId>jackson-databind</artifactId>
|
|
<version>2.2.3</version>
|
|
</dependency>
|
|
<!-- https://mvnrepository.com/artifact/org.json/json -->
|
|
<dependency>
|
|
<groupId>com.alibaba</groupId>
|
|
<artifactId>fastjson</artifactId>
|
|
<version>1.2.76</version>
|
|
</dependency>
|
|
|
|
<!-- mapDB kv存储 -->
|
|
<!-- https://mvnrepository.com/artifact/org.mapdb/mapdb -->
|
|
<!-- <dependency>-->
|
|
<!-- <groupId>org.mapdb</groupId>-->
|
|
<!-- <artifactId>mapdb</artifactId>-->
|
|
<!-- <version>3.0.8</version>-->
|
|
<!-- </dependency>-->
|
|
|
|
<!-- Sqlite Driver compatible with sqlcipher-->
|
|
<!-- https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc -->
|
|
<dependency>
|
|
<groupId>io.github.willena</groupId>
|
|
<artifactId>sqlite-jdbc</artifactId>
|
|
<version>3.35.5.1</version>
|
|
</dependency>
|
|
|
|
<!--jmh 基准测试 -->
|
|
<dependency>
|
|
<groupId>org.openjdk.jmh</groupId>
|
|
<artifactId>jmh-core</artifactId>
|
|
<version>1.23</version>
|
|
<exclusions>
|
|
<exclusion>
|
|
<artifactId>jopt-simple</artifactId>
|
|
<groupId>net.sf.jopt-simple</groupId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.openjdk.jmh</groupId>
|
|
<artifactId>jmh-generator-annprocess</artifactId>
|
|
<version>1.23</version>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
|
|
<!-- Unix Socket -->
|
|
<!-- https://mvnrepository.com/artifact/com.github.jnr/jnr-unixsocket -->
|
|
<dependency>
|
|
<groupId>com.github.jnr</groupId>
|
|
<artifactId>jnr-unixsocket</artifactId>
|
|
<version>0.18</version>
|
|
<exclusions>
|
|
<exclusion>
|
|
<artifactId>jffi</artifactId>
|
|
<groupId>com.github.jnr</groupId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<artifactId>jnr-posix</artifactId>
|
|
<groupId>com.github.jnr</groupId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<artifactId>jnr-x86asm</artifactId>
|
|
<groupId>com.github.jnr</groupId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<artifactId>asm</artifactId>
|
|
<groupId>org.ow2.asm</groupId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<artifactId>asm-tree</artifactId>
|
|
<groupId>org.ow2.asm</groupId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<artifactId>asm-commons</artifactId>
|
|
<groupId>org.ow2.asm</groupId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<artifactId>asm-util</artifactId>
|
|
<groupId>org.ow2.asm</groupId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<artifactId>asm-analysis</artifactId>
|
|
<groupId>org.ow2.asm</groupId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<artifactId>jnr-constants</artifactId>
|
|
<groupId>com.github.jnr</groupId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<!-- <!– https://mvnrepository.com/artifact/com.cloudbees.util/jnr-unixsocket-nodep –>-->
|
|
<!-- <dependency>-->
|
|
<!-- <groupId>com.cloudbees.util</groupId>-->
|
|
<!-- <artifactId>jnr-unixsocket-nodep</artifactId>-->
|
|
<!-- <version>0.3.1</version>-->
|
|
<!-- </dependency>-->
|
|
|
|
</dependencies>
|
|
|
|
</project> |