123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- <?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">
- <parent>
- <artifactId>cpp</artifactId>
- <groupId>com.jiayue.cpp</groupId>
- <version>3.8.8</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <packaging>jar</packaging>
- <artifactId>cpp-admin</artifactId>
- <description>
- web服务入口
- </description>
- <dependencies>
- <dependency>
- <groupId>org.yaml</groupId>
- <artifactId>snakeyaml</artifactId>
- <version>1.33</version>
- </dependency>
- <!-- spring-boot-devtools -->
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-devtools</artifactId>
- <optional>true</optional> <!-- 表示依赖不会传递 -->
- </dependency>
- <!-- swagger3-->
- <dependency>
- <groupId>io.springfox</groupId>
- <artifactId>springfox-boot-starter</artifactId>
- </dependency>
- <!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 -->
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-models</artifactId>
- <version>1.6.2</version>
- </dependency>
- <!-- Mysql驱动包 -->
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- </dependency>
- <!-- 核心模块-->
- <dependency>
- <groupId>com.jiayue.cpp</groupId>
- <artifactId>cpp-framework</artifactId>
- </dependency>
- <!-- 定时任务-->
- <dependency>
- <groupId>com.jiayue.cpp</groupId>
- <artifactId>cpp-quartz</artifactId>
- </dependency>
- <!-- 代码生成-->
- <dependency>
- <groupId>com.jiayue.cpp</groupId>
- <artifactId>cpp-generator</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-thymeleaf</artifactId>
- </dependency>
- <dependency>
- <groupId>org.projectlombok</groupId>
- <artifactId>lombok</artifactId>
- </dependency>
- <!-- ftp-->
- <dependency>
- <groupId>commons-net</groupId>
- <artifactId>commons-net</artifactId>
- <version>3.3</version>
- </dependency>
- <dependency>
- <groupId>cn.hutool</groupId>
- <artifactId>hutool-all</artifactId>
- <version>5.8.12</version>
- </dependency>
- <!--准确率计算-->
- <dependency>
- <groupId>com.syjy</groupId>
- <artifactId>calculation-spring-boot-starter</artifactId>
- <version>0.0.39</version>
- <exclusions>
- <exclusion>
- <groupId>com.alibaba.cloud</groupId>
- <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.poi</groupId>
- <artifactId>poi-ooxml</artifactId>
- <version>3.17</version>
- </dependency>
- <!-- SSH安全连接所使用的类库 -->
- <dependency>
- <groupId>com.jcraft</groupId>
- <artifactId>jsch</artifactId>
- <version>0.1.55</version>
- <scope>compile</scope>
- <optional>true</optional>
- </dependency>
- </dependencies>
- <profiles> <!--考虑到window 和linux环境 npm命令格式的问题,使用maven的profile实现动态指定命令-->
- <profile>
- <id>window</id>
- <properties>
- <npm>npm.cmd</npm>
- </properties>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- </profile>
- <profile>
- <id>linux</id>
- <properties>
- <npm>npm</npm>
- </properties>
- </profile>
- </profiles>
- <build>
- <finalName>cpp</finalName>
- <plugins>
- <!--跳过test类-->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.21.0</version>
- <configuration>
- <skipTests>true</skipTests>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>1.6.0</version>
- <executions>
- <execution>
- <id>exec-npm-run-build</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <executable>${npm}</executable>
- <arguments>
- <argument>run</argument>
- <argument>build:prod</argument>
- </arguments>
- <workingDirectory>${project.parent.basedir}/cpp-ui</workingDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <!--资源插件,主要为了从前端项目里复制打包好的文件到springboot项目-->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>3.1.0</version>
- <executions>
- <execution>
- <id>copy index</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <!-- 复制前端打包文件到这里 -->
- <outputDirectory>src/main/resources/templates</outputDirectory>
- <overwrite>true</overwrite>
- <resources>
- <resource>
- <!-- 从前端打包的目录dist进行指定文件、文件夹内容的复制-->
- <directory>${project.parent.basedir}/cpp-ui/dist</directory>
- <includes>
- <!-- 具体根据实际前端代码、及目录结构进行配置-->
- <include>index.html</include>
- </includes>
- </resource>
- </resources>
- </configuration>
- </execution>
- <execution>
- <id>copy static</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <!-- 复制前端打包文件到这里 -->
- <outputDirectory>src/main/resources</outputDirectory>
- <overwrite>true</overwrite>
- <resources>
- <resource>
- <!-- 从前端打包的目录dist进行指定文件、文件夹内容的复制-->
- <directory>${project.parent.basedir}/cpp-ui/dist</directory>
- <includes>
- <!-- 具体根据实际前端代码、及目录结构进行配置-->
- <include>static/</include>
- </includes>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>2.1.7.RELEASE</version>
- <configuration>
- <!--控制是否启用支持Linux下service方式运行-->
- <executable>true</executable>
- <!--打包后自动运行程序-->
- <!-- <includeSystemScope>true</includeSystemScope>-->
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>build-info</goal>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </project>
|