|
|
@@ -2,134 +2,155 @@
|
|
|
|
|
|
<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>
|
|
|
+ <modelVersion>4.0.0</modelVersion>
|
|
|
|
|
|
- <groupId>org.example</groupId>
|
|
|
- <artifactId>ethereum_viewer_interface</artifactId>
|
|
|
- <version>1.0-SNAPSHOT</version>
|
|
|
- <packaging>war</packaging>
|
|
|
+ <groupId>org.example</groupId>
|
|
|
+ <artifactId>ethereum_viewer_interface</artifactId>
|
|
|
+ <version>1.0-SNAPSHOT</version>
|
|
|
+ <packaging>jar</packaging>
|
|
|
|
|
|
- <name>ethereum viewer interface</name>
|
|
|
- <url>http://www.example.com</url>
|
|
|
+ <name>ethereum viewer interface</name>
|
|
|
+ <url>http://www.example.com</url>
|
|
|
|
|
|
- <properties>
|
|
|
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
- <maven.compiler.source>1.7</maven.compiler.source>
|
|
|
- <maven.compiler.target>1.7</maven.compiler.target>
|
|
|
- </properties>
|
|
|
+ <properties>
|
|
|
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
+ <maven.compiler.source>1.7</maven.compiler.source>
|
|
|
+ <maven.compiler.target>1.7</maven.compiler.target>
|
|
|
+ </properties>
|
|
|
|
|
|
- <dependencies>
|
|
|
- <dependency>
|
|
|
- <groupId>com.jfinal</groupId>
|
|
|
- <artifactId>jfinal-undertow</artifactId>
|
|
|
- <version>2.2</version>
|
|
|
- </dependency>
|
|
|
+ <dependencies>
|
|
|
+ <dependency>
|
|
|
+ <groupId>com.jfinal</groupId>
|
|
|
+ <artifactId>jfinal-undertow</artifactId>
|
|
|
+ <version>2.2</version>
|
|
|
+ </dependency>
|
|
|
|
|
|
- <dependency>
|
|
|
- <groupId>com.jfinal</groupId>
|
|
|
- <artifactId>jfinal</artifactId>
|
|
|
- <version>5.0.5</version>
|
|
|
- </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>com.jfinal</groupId>
|
|
|
+ <artifactId>jfinal</artifactId>
|
|
|
+ <version>5.0.5</version>
|
|
|
+ </dependency>
|
|
|
|
|
|
- <!--mysql驱动包-->
|
|
|
- <dependency>
|
|
|
- <groupId>mysql</groupId>
|
|
|
- <artifactId>mysql-connector-java</artifactId>
|
|
|
- <version>8.0.12</version>
|
|
|
- </dependency>
|
|
|
+ <!--mysql驱动包-->
|
|
|
+ <dependency>
|
|
|
+ <groupId>mysql</groupId>
|
|
|
+ <artifactId>mysql-connector-java</artifactId>
|
|
|
+ <version>8.0.12</version>
|
|
|
+ </dependency>
|
|
|
|
|
|
- <dependency>
|
|
|
- <groupId>com.alibaba</groupId>
|
|
|
- <artifactId>druid</artifactId>
|
|
|
- <version>1.1.6</version>
|
|
|
- </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>com.alibaba</groupId>
|
|
|
+ <artifactId>druid</artifactId>
|
|
|
+ <version>1.1.6</version>
|
|
|
+ </dependency>
|
|
|
|
|
|
- <dependency>
|
|
|
- <groupId>com.alibaba</groupId>
|
|
|
- <artifactId>fastjson</artifactId>
|
|
|
- <version>1.2.28</version>
|
|
|
- </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>com.alibaba</groupId>
|
|
|
+ <artifactId>fastjson</artifactId>
|
|
|
+ <version>1.2.28</version>
|
|
|
+ </dependency>
|
|
|
|
|
|
- <dependency>
|
|
|
- <groupId>javax.validation</groupId>
|
|
|
- <artifactId>validation-api</artifactId>
|
|
|
- <version>1.0.0.GA</version>
|
|
|
- </dependency>
|
|
|
- </dependencies>
|
|
|
+ <dependency>
|
|
|
+ <groupId>javax.validation</groupId>
|
|
|
+ <artifactId>validation-api</artifactId>
|
|
|
+ <version>1.0.0.GA</version>
|
|
|
+ </dependency>
|
|
|
+ </dependencies>
|
|
|
|
|
|
- <build>
|
|
|
- <finalName>ethereum_viewer_interface</finalName>
|
|
|
+ <build>
|
|
|
+ <finalName>ethereum_viewer_interface</finalName>
|
|
|
|
|
|
- <!--
|
|
|
- 添加 includes 配置后,excludes 默认为所有文件 **/*.*,反之亦然
|
|
|
- 该规则在 maven-jar-plugin 等插件中同样适用
|
|
|
- -->
|
|
|
- <resources>
|
|
|
- <!-- 添加该配置是为了将 .sql 文件打入 jar 包 -->
|
|
|
- <resource>
|
|
|
- <!-- 注意 IDEA maven 多模块下必须要使用 ${project.basedir}/ 前缀 -->
|
|
|
- <directory>${project.basedir}/src/main/java</directory>
|
|
|
- <includes>
|
|
|
- <!-- **/* 前缀用法,可以匹配所有路径 -->
|
|
|
- <include>**/*.sql</include>
|
|
|
- <include>**/*.sqlt</include>
|
|
|
- <include>**/*.jf</include>
|
|
|
- </includes>
|
|
|
- </resource>
|
|
|
+ <!--
|
|
|
+ 添加 includes 配置后,excludes 默认为所有文件 **/*.*,反之亦然
|
|
|
+ 该规则在 maven-jar-plugin 等插件中同样适用
|
|
|
+-->
|
|
|
+ <resources>
|
|
|
+ <!-- 添加该配置是为了将 .sql 文件打入 jar 包 -->
|
|
|
+ <resource>
|
|
|
+ <!-- 注意 IDEA maven 多模块下必须要使用 ${project.basedir}/ 前缀 -->
|
|
|
+ <directory>${project.basedir}/src/main/java</directory>
|
|
|
+ <includes>
|
|
|
+ <!-- **/* 前缀用法,可以匹配所有路径 -->
|
|
|
+ <include>**/*.sql</include>
|
|
|
+ <include>**/*.sqlt</include>
|
|
|
+ <include>**/*.jf</include>
|
|
|
+ </includes>
|
|
|
+ </resource>
|
|
|
|
|
|
- <!--
|
|
|
- 没有添加 resources 配置时,src/main/resources 目录是默认配置
|
|
|
- 一旦添加 resources 配置指向 src/main/java 目录时,原先的默认配置被取代,
|
|
|
- 所以需要添加如下配置将默认配置再添加进来,否则无法使用 src/main/resources
|
|
|
- 下的资源文件
|
|
|
- -->
|
|
|
- <resource>
|
|
|
- <directory>${project.basedir}/src/main/resources</directory>
|
|
|
- </resource>
|
|
|
- </resources>
|
|
|
+ <!--
|
|
|
+ 没有添加 resources 配置时,src/main/resources 目录是默认配置
|
|
|
+ 一旦添加 resources 配置指向 src/main/java 目录时,原先的默认配置被取代,
|
|
|
+ 所以需要添加如下配置将默认配置再添加进来,否则无法使用 src/main/resources
|
|
|
+ 下的资源文件
|
|
|
+ -->
|
|
|
+ <resource>
|
|
|
+ <directory>${project.basedir}/src/main/resources</directory>
|
|
|
+ </resource>
|
|
|
+ </resources>
|
|
|
|
|
|
- <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
|
|
|
- <plugins>
|
|
|
- <plugin>
|
|
|
- <artifactId>maven-clean-plugin</artifactId>
|
|
|
- <version>3.1.0</version>
|
|
|
- </plugin>
|
|
|
- <!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
|
|
|
- <plugin>
|
|
|
- <artifactId>maven-resources-plugin</artifactId>
|
|
|
- <version>3.0.2</version>
|
|
|
- </plugin>
|
|
|
- <plugin>
|
|
|
- <artifactId>maven-compiler-plugin</artifactId>
|
|
|
- <version>3.8.0</version>
|
|
|
- </plugin>
|
|
|
- <plugin>
|
|
|
- <artifactId>maven-surefire-plugin</artifactId>
|
|
|
- <version>2.22.1</version>
|
|
|
- </plugin>
|
|
|
- <plugin>
|
|
|
- <artifactId>maven-war-plugin</artifactId>
|
|
|
- <version>3.2.2</version>
|
|
|
- </plugin>
|
|
|
- <plugin>
|
|
|
- <artifactId>maven-install-plugin</artifactId>
|
|
|
- <version>2.5.2</version>
|
|
|
- </plugin>
|
|
|
- <plugin>
|
|
|
- <artifactId>maven-deploy-plugin</artifactId>
|
|
|
- <version>2.8.2</version>
|
|
|
- </plugin>
|
|
|
- </plugins>
|
|
|
- </pluginManagement>
|
|
|
- <plugins>
|
|
|
- <plugin>
|
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
|
- <artifactId>maven-compiler-plugin</artifactId>
|
|
|
- <configuration>
|
|
|
- <source>8</source>
|
|
|
- <target>8</target>
|
|
|
- </configuration>
|
|
|
- </plugin>
|
|
|
- </plugins>
|
|
|
- </build>
|
|
|
+ <!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
|
|
|
+ <plugins>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-compiler-plugin</artifactId>
|
|
|
+ <version>3.6.1</version>
|
|
|
+ <configuration>
|
|
|
+ <source>1.8</source>
|
|
|
+ <target>1.8</target>
|
|
|
+ <encoding>UTF-8</encoding>
|
|
|
+ <!-- java8 保留参数名编译参数 -->
|
|
|
+ <compilerArgument>-parameters</compilerArgument>
|
|
|
+ <compilerArguments><verbose /></compilerArguments>
|
|
|
+ </configuration>
|
|
|
+ </plugin>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ jar 包中的配置文件优先级高于 config 目录下的 "同名文件"
|
|
|
+ 因此,打包时需要排除掉 jar 包中来自 src/main/resources 目录的
|
|
|
+ 配置文件,否则部署时 config 目录中的同名配置文件不会生效
|
|
|
+ -->
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-jar-plugin</artifactId>
|
|
|
+ <version>2.6</version>
|
|
|
+ <configuration>
|
|
|
+ <excludes>
|
|
|
+ <exclude>*.txt</exclude>
|
|
|
+ <exclude>*.xml</exclude>
|
|
|
+ <exclude>*.properties</exclude>
|
|
|
+ </excludes>
|
|
|
+ </configuration>
|
|
|
+ </plugin>
|
|
|
+
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-assembly-plugin</artifactId>
|
|
|
+ <version>3.1.0</version>
|
|
|
+ <executions>
|
|
|
+ <execution>
|
|
|
+ <id>make-assembly</id>
|
|
|
+ <phase>package</phase>
|
|
|
+ <goals>
|
|
|
+ <goal>single</goal>
|
|
|
+ </goals>
|
|
|
+
|
|
|
+ <configuration>
|
|
|
+ <!-- 打包生成的文件名 -->
|
|
|
+ <finalName>${project.artifactId}</finalName>
|
|
|
+ <!-- jar 等压缩文件在被打包进入 zip、tar.gz 时是否压缩,设置为 false 可加快打包速度 -->
|
|
|
+ <recompressZippedFiles>false</recompressZippedFiles>
|
|
|
+ <!-- 打包生成的文件是否要追加 release.xml 中定义的 id 值 -->
|
|
|
+ <appendAssemblyId>true</appendAssemblyId>
|
|
|
+ <!-- 指向打包描述文件 package.xml -->
|
|
|
+ <descriptors>
|
|
|
+ <descriptor>package.xml</descriptor>
|
|
|
+ </descriptors>
|
|
|
+ <!-- 打包结果输出的基础目录 -->
|
|
|
+ <outputDirectory>${project.build.directory}/</outputDirectory>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
+ </plugins>
|
|
|
+ </build>
|
|
|
</project>
|