123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235 |
- <?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>neim</artifactId>
- <groupId>com.jiayue</groupId>
- <version>1.0.0</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>neim-biz</artifactId>
- <description>
- neim-biz业务模块
- </description>
- <dependencies>
- <dependency>
- <groupId>flanagan</groupId>
- <artifactId>flanagan</artifactId>
- <scope>system</scope>
- <version>1.0</version>
- <systemPath>${basedir}/../lib/flanagan-1.0.jar</systemPath>
- </dependency>
- <dependency>
- <groupId>com.baomidou</groupId>
- <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
- </dependency>
- <dependency>
- <groupId>com.taosdata.jdbc</groupId>
- <artifactId>taos-jdbcdriver</artifactId>
- <version>3.0.0</version>
- </dependency>
- <dependency>
- <groupId>joda-time</groupId>
- <artifactId>joda-time</artifactId>
- <version>2.9.9</version>
- </dependency>
- <dependency>
- <groupId>com.sun.mail</groupId>
- <artifactId>javax.mail</artifactId>
- <version>1.5.4</version>
- </dependency>
- <!-- spring-boot-devtools -->
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-devtools</artifactId>
- <optional>true</optional> <!-- 表示依赖不会传递 -->
- </dependency>
- <!-- swagger-->
- <dependency>
- <groupId>io.springfox</groupId>
- <artifactId>springfox-boot-starter</artifactId>
- </dependency>
- <!-- modbus-->
- <dependency>
- <groupId>wei.yigulu</groupId>
- <artifactId>protocol-modbus</artifactId>
- <version>1.2.11</version>
- </dependency>
- <!-- mongo-->
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-mongodb</artifactId>
- </dependency>
- <!-- 系统服务-->
- <dependency>
- <groupId>com.jiayue</groupId>
- <artifactId>neim-system</artifactId>
- <version>1.0.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-math3</artifactId>
- <version>3.6.1</version>
- </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>${project.artifactId}</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>
- <!-- 插件maven-clean-plugin,用于在编译前,清除之前编译的文件、文件夹等,避免残留之前的内容 -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clean-plugin</artifactId>
- <version>3.1.0</version>
- <configuration>
- <filesets>
- <fileset>
- <!-- Vue项目打包自动生成的dist目录 -->
- <directory>../neim-ui/dist</directory>
- </fileset>
- <fileset>
- <!-- 最终项目打包自动生成的package目录 -->
- <directory>../package/neim/${project.version}</directory>
- </fileset>
- </filesets>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>1.6.0</version>
- <executions>
- <execution>
- <id>exec-npm-install</id>
- <phase>validate</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <executable>${npm}</executable>
- <arguments>
- <argument>install</argument>
- </arguments>
- <workingDirectory>../neim-ui</workingDirectory>
- </configuration>
- </execution>
- <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>../neim-ui</workingDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <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>
- </nonFilteredFileExtensions>
- <includeEmptyDirs>true</includeEmptyDirs>
- </configuration>
- <executions>
- <execution>
- <id>copy static</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <!-- 复制前端打包文件到这里 -->
- <outputDirectory>../package/neim/${project.version}/vue</outputDirectory>
- <overwrite>true</overwrite>
- <resources>
- <resource>
- <!-- 从前端打包的目录dist进行指定文件、文件夹内容的复制-->
- <directory>../neim-ui</directory>
- <includes>
- <!-- 具体根据实际前端代码、及目录结构进行配置-->
- <include>dist/</include>
- <include>nginx.conf</include>
- <include>index.html</include>
- <include>robots.txt</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>
- <outputDirectory>../package/neim/${project.version}/java</outputDirectory>
- <!--控制是否启用支持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>
|