|
@@ -0,0 +1,281 @@
|
|
|
+<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
|
+ <modelVersion>4.0.0</modelVersion>
|
|
|
+ <parent>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-starter-parent</artifactId>
|
|
|
+ <version>2.2.2.RELEASE</version>
|
|
|
+ <relativePath/> <!-- lookup parent from repository -->
|
|
|
+ </parent>
|
|
|
+ <groupId>com.persagy</groupId>
|
|
|
+ <artifactId>alarm-engine</artifactId>
|
|
|
+ <version>0.0.1-SNAPSHOT</version>
|
|
|
+ <name>alarm-engine</name>
|
|
|
+ <description>project alarm program</description>
|
|
|
+
|
|
|
+ <properties>
|
|
|
+ <java.version>1.8</java.version>
|
|
|
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
|
|
+ </properties>
|
|
|
+
|
|
|
+ <dependencies>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-starter</artifactId>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-starter-web</artifactId>
|
|
|
+ </dependency>
|
|
|
+ <!-- swagger -->
|
|
|
+ <dependency>
|
|
|
+ <groupId>com.github.xiaoymin</groupId>
|
|
|
+ <artifactId>knife4j-spring-boot-starter</artifactId>
|
|
|
+ <!--在引用时请在maven中央仓库搜索最新版本号 -->
|
|
|
+ <version>2.0.2</version>
|
|
|
+ </dependency>
|
|
|
+ <!--guava-->
|
|
|
+ <dependency>
|
|
|
+ <groupId>com.google.guava</groupId>
|
|
|
+ <artifactId>guava</artifactId>
|
|
|
+ <version>20.0</version>
|
|
|
+ </dependency>
|
|
|
+ <!--lombok-->
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.projectlombok</groupId>
|
|
|
+ <artifactId>lombok</artifactId>
|
|
|
+ <optional>true</optional>
|
|
|
+ </dependency>
|
|
|
+ <!-- 数学逻辑运算解析库-->
|
|
|
+ <dependency>
|
|
|
+ <groupId>com.googlecode.aviator</groupId>
|
|
|
+ <artifactId>aviator</artifactId>
|
|
|
+ <version>5.1.4</version>
|
|
|
+ </dependency>
|
|
|
+ <!-- netty -->
|
|
|
+ <dependency>
|
|
|
+ <groupId>io.netty</groupId>
|
|
|
+ <artifactId>netty-all</artifactId>
|
|
|
+ <version>4.1.42.Final</version>
|
|
|
+ </dependency>
|
|
|
+ <!--测试工具-->
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-starter-test</artifactId>
|
|
|
+ <scope>test</scope>
|
|
|
+ <exclusions>
|
|
|
+ <exclusion>
|
|
|
+ <groupId>org.junit.vintage</groupId>
|
|
|
+ <artifactId>junit-vintage-engine</artifactId>
|
|
|
+ </exclusion>
|
|
|
+ </exclusions>
|
|
|
+ </dependency>
|
|
|
+ <!--WebSocket核心依赖包-->
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-starter-websocket</artifactId>
|
|
|
+ </dependency>
|
|
|
+ <!--WebSocket核心依赖包-->
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.java-websocket</groupId>
|
|
|
+ <artifactId>Java-WebSocket</artifactId>
|
|
|
+ <version>1.3.8</version>
|
|
|
+ </dependency>
|
|
|
+<!-- <dependency>-->
|
|
|
+<!-- <groupId>junit</groupId>-->
|
|
|
+<!-- <artifactId>junit</artifactId>-->
|
|
|
+<!-- </dependency>-->
|
|
|
+ <!-- commons-lang3常用工具类-->
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.apache.commons</groupId>
|
|
|
+ <artifactId>commons-lang3</artifactId>
|
|
|
+ </dependency>
|
|
|
+ <!--fastjson JSON组件-->
|
|
|
+ <dependency>
|
|
|
+ <groupId>com.alibaba</groupId>
|
|
|
+ <artifactId>fastjson</artifactId>
|
|
|
+ <version>1.2.71</version>
|
|
|
+ <scope>compile</scope>
|
|
|
+ </dependency>
|
|
|
+ <!--hutool工具类-->
|
|
|
+ <dependency>
|
|
|
+ <groupId>cn.hutool</groupId>
|
|
|
+ <artifactId>hutool-all</artifactId>
|
|
|
+ <version>5.4.3</version>
|
|
|
+ <scope>compile</scope>
|
|
|
+ </dependency>
|
|
|
+ <!--定时任务框架-->
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-starter-quartz</artifactId>
|
|
|
+ </dependency>
|
|
|
+ <!-- MYSQL-->
|
|
|
+ <dependency>
|
|
|
+ <groupId>mysql</groupId>
|
|
|
+ <artifactId>mysql-connector-java</artifactId>
|
|
|
+ <scope>runtime</scope>
|
|
|
+ </dependency>
|
|
|
+ <!-- Spring Boot JDBC-->
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-starter-jdbc</artifactId>
|
|
|
+ </dependency>
|
|
|
+ <!-- 数据库连接池-->
|
|
|
+ <dependency>
|
|
|
+ <groupId>com.alibaba</groupId>
|
|
|
+ <artifactId>druid-spring-boot-starter</artifactId>
|
|
|
+ <version>1.1.22</version>
|
|
|
+ </dependency>
|
|
|
+ <!-- spring-data-jpa -->
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-starter-data-jpa</artifactId>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-starter-aop</artifactId>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>com.github.dadiyang</groupId>
|
|
|
+ <artifactId>autologging-aop</artifactId>
|
|
|
+ <version>1.0.0</version>
|
|
|
+ </dependency>
|
|
|
+ </dependencies>
|
|
|
+
|
|
|
+ <build>
|
|
|
+ <finalName>alarm-engine</finalName>
|
|
|
+ <plugins>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-compiler-plugin</artifactId>
|
|
|
+ <version>3.8.1</version>
|
|
|
+ <configuration>
|
|
|
+ <source>1.8</source>
|
|
|
+ <target>1.8</target>
|
|
|
+ <encoding>UTF-8</encoding>
|
|
|
+ <skip>true</skip>
|
|
|
+ </configuration>
|
|
|
+ </plugin>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-maven-plugin</artifactId>
|
|
|
+ </plugin>
|
|
|
+ <!-- 按照测试要求打成zip需要的配置 -->
|
|
|
+ <!--获取git信息-->
|
|
|
+ <plugin>
|
|
|
+ <groupId>pl.project13.maven</groupId>
|
|
|
+ <artifactId>git-commit-id-plugin</artifactId>
|
|
|
+ <executions>
|
|
|
+ <execution>
|
|
|
+ <goals>
|
|
|
+ <goal>revision</goal>
|
|
|
+ </goals>
|
|
|
+ </execution>
|
|
|
+ </executions>
|
|
|
+ <configuration>
|
|
|
+ <verbose>true</verbose>
|
|
|
+ <dateFormat>yyyyMMddHHmm</dateFormat>
|
|
|
+ <generateGitPropertiesFile>true</generateGitPropertiesFile>
|
|
|
+ <!--<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>-->
|
|
|
+ <generateGitPropertiesFilename>target/git.properties</generateGitPropertiesFilename>
|
|
|
+ </configuration>
|
|
|
+ </plugin>
|
|
|
+ <plugin>
|
|
|
+ <groupId>com.coderplus.maven.plugins</groupId>
|
|
|
+ <artifactId>copy-rename-maven-plugin</artifactId>
|
|
|
+ <version>1.0.1</version>
|
|
|
+ <executions>
|
|
|
+ <execution>
|
|
|
+ <id>rename-file</id>
|
|
|
+ <phase>compile</phase>
|
|
|
+ <goals>
|
|
|
+ <goal>rename</goal>
|
|
|
+ </goals>
|
|
|
+ <configuration>
|
|
|
+ <sourceFile>${project.build.directory}/git.properties</sourceFile>
|
|
|
+ <destinationFile>${project.build.directory}/version.txt</destinationFile>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
+ <!--拷贝资源文件 copy-resources-->
|
|
|
+ <plugin>
|
|
|
+ <artifactId>maven-resources-plugin</artifactId>
|
|
|
+ <executions>
|
|
|
+ <execution>
|
|
|
+ <id>copy-resources</id>
|
|
|
+ <phase>package</phase>
|
|
|
+ <goals>
|
|
|
+ <goal>copy-resources</goal>
|
|
|
+ </goals>
|
|
|
+ <configuration>
|
|
|
+ <resources>
|
|
|
+ <resource>
|
|
|
+ <directory>src/main/resources/</directory>
|
|
|
+ <includes>
|
|
|
+ <include>**/*.yml</include>
|
|
|
+ </includes>
|
|
|
+ </resource>
|
|
|
+ <resource>
|
|
|
+ <directory>${project.build.directory}</directory>
|
|
|
+ <includes>
|
|
|
+ <include>**/version.txt</include>
|
|
|
+ </includes>
|
|
|
+ </resource>
|
|
|
+ </resources>
|
|
|
+ <outputDirectory>${project.build.directory}/config</outputDirectory>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+ <!--拷贝启动脚本-->
|
|
|
+ <execution>
|
|
|
+ <id>copy-version</id>
|
|
|
+ <phase>package</phase>
|
|
|
+ <goals>
|
|
|
+ <goal>copy-resources</goal>
|
|
|
+ </goals>
|
|
|
+ <configuration>
|
|
|
+ <resources>
|
|
|
+ <resource>
|
|
|
+ <directory>src/script</directory>
|
|
|
+ </resource>
|
|
|
+ </resources>
|
|
|
+ <outputDirectory>${project.build.directory}</outputDirectory>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
+
|
|
|
+ <!-- 打包压缩 -->
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-assembly-plugin</artifactId>
|
|
|
+ <executions>
|
|
|
+ <execution>
|
|
|
+ <id>make-assembly</id>
|
|
|
+ <!-- 当执行mvn package时才会打包 -->
|
|
|
+ <phase>package</phase>
|
|
|
+ <goals>
|
|
|
+ <goal>single</goal>
|
|
|
+ </goals>
|
|
|
+ <configuration>
|
|
|
+ <finalName>
|
|
|
+ ${project.artifactId}_${git.commit.time}_git_${git.branch}_${git.commit.id.abbrev}
|
|
|
+ </finalName>
|
|
|
+ <!--不包含assembly id-->
|
|
|
+ <appendAssemblyId>false</appendAssemblyId>
|
|
|
+ <!--输出路径-->
|
|
|
+ <!--<outputDirectory>../target/co_search-${project.version}</outputDirectory>-->
|
|
|
+ <descriptors>
|
|
|
+ <descriptor>src/script/zip.xml</descriptor>
|
|
|
+ </descriptors>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
+
|
|
|
+ </plugins>
|
|
|
+ </build>
|
|
|
+
|
|
|
+</project>
|