123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- <?xml version="1.0" encoding="UTF-8"?>
- <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://maven.apache.org/POM/4.0.0"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <artifactId>elf</artifactId>
- <groupId>com.jiayue</groupId>
- <version>3.8.6</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>vpp-biz</artifactId>
- <description>
- 沈阳嘉越电力交易辅助系统
- </description>
- <dependencies>
- <!-- spring-boot-devtools -->
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-devtools</artifactId>
- <optional>true</optional> <!-- 表示依赖不会传递 -->
- </dependency>
- <!-- 系统服务-->
- <dependency>
- <groupId>com.jiayue</groupId>
- <artifactId>elf-system</artifactId>
- </dependency>
- <dependency>
- <groupId>com.dameng</groupId>
- <artifactId>Dm7JdbcDriver18</artifactId>
- <version>7.6.0.165</version>
- <!--<systemPath>${project.basedir}/lib/Dm7JdbcDriver18-7.6.0.165.jar</systemPath>-->
- </dependency>
- <!-- spring-boot-thymeleaf -->
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-thymeleaf</artifactId>
- </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>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <!--开启过滤,用指定的参数替换directory下的文件中的参数-->
- <filtering>true</filtering>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>2.1.7.RELEASE</version>
- <!--解决打包后,执行java -jar 命令,找不到主清单属性-->
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <!--clean插件-->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clean-plugin</artifactId>
- <version>3.1.0</version>
- <configuration>
- <filesets>
- <fileset>
- <directory>src/main/resources/static</directory>
- </fileset>
- <fileset>
- <directory>src/main/resources/templates</directory>
- </fileset>
- </filesets>
- </configuration>
- </plugin>
- <!--跳过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.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.6</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.0</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- <compilerArguments>
- <!-- 不写,默认只有rt.jar -->
- <bootclasspath>${java.home}/lib/rt.jar${path.separator}${java.home}/lib/jce.jar</bootclasspath>
- </compilerArguments>
- </configuration>
- </plugin>
- <!--资源插件,主要为了从前端项目里复制打包好的文件到springboot项目-->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>3.1.0</version>
- <configuration>
- <!--配置不需要压缩的文件-->
- <nonFilteredFileExtensions>
- <nonFilteredFileExtension>woff</nonFilteredFileExtension>
- <nonFilteredFileExtension>ttf</nonFilteredFileExtension>
- <nonFilteredFileExtension>woff2</nonFilteredFileExtension>
- <nonFilteredFileExtension>eot</nonFilteredFileExtension>
- <nonFilteredFileExtension>swf</nonFilteredFileExtension>
- <nonFilteredFileExtension>ico</nonFilteredFileExtension>
- <nonFilteredFileExtension>png</nonFilteredFileExtension>
- <nonFilteredFileExtension>mp3</nonFilteredFileExtension>
- <nonFilteredFileExtension>wav</nonFilteredFileExtension>
- <nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
- <nonFilteredFileExtension>xls</nonFilteredFileExtension>
- </nonFilteredFileExtensions>
- <includeEmptyDirs>true</includeEmptyDirs>
- </configuration>
- <executions>
- <execution>
- <id>copy static</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.basedir}/src/main/resources/static</outputDirectory>
- <overwrite>true</overwrite>
- <resources>
- <resource>
- <!--因为vue-cli打包的目录在项目的根目录,所以从这里复制-->
- <directory>${project.basedir}/vpp-ui/dist/static</directory>
- <includes>
- <include>css/</include>
- <include>fonts/</include>
- <include>img/</include>
- <include>js/</include>
- </includes>
- </resource>
- <resource>
- <directory>${project.basedir}/vpp-ui/dist</directory>
- <includes>
- <include>favicon.ico</include>
- </includes>
- </resource>
- </resources>
- </configuration>
- </execution>
- <execution>
- <id>copy template</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.basedir}/src/main/resources/templates</outputDirectory>
- <overwrite>true</overwrite>
- <resources>
- <resource>
- <!--因为vue-cli打包的目录在项目的根目录,所以从这里复制-->
- <directory>${project.basedir}/vpp-ui/dist</directory>
- <includes>
- <include>index.html</include>
- <include>robots.txt</include>
- </includes>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </project>
|