|
@@ -67,6 +67,12 @@
|
|
|
<artifactId>commons-math3</artifactId>
|
|
|
<version>3.6.1</version>
|
|
|
</dependency>
|
|
|
+
|
|
|
+ <!-- spring-boot-thymeleaf -->
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-starter-thymeleaf</artifactId>
|
|
|
+ </dependency>
|
|
|
</dependencies>
|
|
|
|
|
|
<profiles> <!--考虑到window 和linux环境 npm命令格式的问题,使用maven的profile实现动态指定命令-->
|
|
@@ -112,11 +118,58 @@
|
|
|
</fileset>
|
|
|
<fileset>
|
|
|
<!-- 最终项目打包自动生成的package目录 -->
|
|
|
- <directory>../package/wps/${project.version}</directory>
|
|
|
+ <directory>src/main/resources/templates</directory>
|
|
|
+ </fileset>
|
|
|
+ <fileset>
|
|
|
+ <!-- 最终项目打包自动生成的package目录 -->
|
|
|
+ <directory>src/main/resources/static</directory>
|
|
|
</fileset>
|
|
|
</filesets>
|
|
|
</configuration>
|
|
|
</plugin>
|
|
|
+
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-maven-plugin</artifactId>
|
|
|
+ <version>2.7.10</version> <!-- 如果 spring.boot.version 版本修改,则这里也要跟着修改 -->
|
|
|
+ <configuration>
|
|
|
+ <includeSystemScope>true</includeSystemScope>
|
|
|
+ <mainClass>com.jiayue.WpsApplication</mainClass>
|
|
|
+ <layout>ZIP</layout>
|
|
|
+ <fork>true</fork>
|
|
|
+ <includes>
|
|
|
+ <!-- 不包含任何jar包 -->
|
|
|
+ <include>
|
|
|
+ <groupId>nothing</groupId>
|
|
|
+ <artifactId>nothing</artifactId>
|
|
|
+ </include>
|
|
|
+ </includes>
|
|
|
+ </configuration>
|
|
|
+ <executions>
|
|
|
+ <execution>
|
|
|
+ <goals>
|
|
|
+ <goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
|
|
|
+ </goals>
|
|
|
+ </execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
+ <!-- third-party jar into lib directory -->
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-dependency-plugin</artifactId>
|
|
|
+ <executions>
|
|
|
+ <execution>
|
|
|
+ <id>copy-dependencies</id>
|
|
|
+ <phase>prepare-package</phase>
|
|
|
+ <goals>
|
|
|
+ <goal>copy-dependencies</goal>
|
|
|
+ </goals>
|
|
|
+ <configuration>
|
|
|
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
<plugin>
|
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
|
<artifactId>exec-maven-plugin</artifactId>
|
|
@@ -171,48 +224,52 @@
|
|
|
</configuration>
|
|
|
<executions>
|
|
|
<execution>
|
|
|
- <id>copy static</id>
|
|
|
+ <id>copy html</id>
|
|
|
<phase>generate-resources</phase>
|
|
|
<goals>
|
|
|
<goal>copy-resources</goal>
|
|
|
</goals>
|
|
|
<configuration>
|
|
|
<!-- 复制前端打包文件到这里 -->
|
|
|
- <outputDirectory>../package/wps/${project.version}/vue</outputDirectory>
|
|
|
+ <outputDirectory>src/main/resources/templates</outputDirectory>
|
|
|
<overwrite>true</overwrite>
|
|
|
<resources>
|
|
|
<resource>
|
|
|
<!-- 从前端打包的目录dist进行指定文件、文件夹内容的复制-->
|
|
|
- <directory>../wps-ui</directory>
|
|
|
+ <directory>../wps-ui/dist</directory>
|
|
|
+
|
|
|
<includes>
|
|
|
- <!-- 具体根据实际前端代码、及目录结构进行配置-->
|
|
|
- <include>dist/</include>
|
|
|
- <include>nginx.conf</include>
|
|
|
+ <include>favicon.ico</include>
|
|
|
<include>index.html</include>
|
|
|
<include>robots.txt</include>
|
|
|
+ <include>simhei-normal.js</include>
|
|
|
+ <include>html</include>
|
|
|
+ <include>img</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/wps/${project.version}/java</outputDirectory>
|
|
|
- <!--控制是否启用支持Linux下service方式运行-->
|
|
|
- <executable>true</executable>
|
|
|
- <includeSystemScope>true</includeSystemScope>
|
|
|
- </configuration>
|
|
|
- <executions>
|
|
|
<execution>
|
|
|
+ <id>copy static</id>
|
|
|
+ <phase>generate-resources</phase>
|
|
|
<goals>
|
|
|
- <goal>build-info</goal>
|
|
|
- <goal>repackage</goal>
|
|
|
+ <goal>copy-resources</goal>
|
|
|
</goals>
|
|
|
+ <configuration>
|
|
|
+ <!-- 复制前端打包文件到这里 -->
|
|
|
+ <outputDirectory>src/main/resources/</outputDirectory>
|
|
|
+ <overwrite>true</overwrite>
|
|
|
+ <resources>
|
|
|
+ <resource>
|
|
|
+ <!-- 从前端打包的目录dist进行指定文件、文件夹内容的复制-->
|
|
|
+ <directory>../wps-ui/dist</directory>
|
|
|
+ <includes>
|
|
|
+ <include>static/</include>
|
|
|
+ </includes>
|
|
|
+ </resource>
|
|
|
+ </resources>
|
|
|
+ </configuration>
|
|
|
</execution>
|
|
|
</executions>
|
|
|
</plugin>
|