ci: 前端采用pom编译,统一node npm版本

This commit is contained in:
CaptainB 2023-05-24 13:33:48 +08:00 committed by 刘瑞斌
parent bf2b874fb5
commit f1addd3018
6 changed files with 62 additions and 11 deletions

1
.gitignore vendored
View File

@ -32,5 +32,4 @@ qywx.json
### flattened
.flattened-pom.xml
.node/
**/jmeter/lib/ext

4
backend/.gitignore vendored
View File

@ -24,8 +24,8 @@ yarn-error.log*
*.sw?
src/main/resources/static
src/main/resources/public
app/src/main/resources/static
app/src/main/resources/public
target

View File

@ -100,6 +100,55 @@
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>src/main/resources/static</directory>
<includes>
<include>**</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>src/main/resources/public</directory>
<includes>
<include>**</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>main-class-placement</id>
<phase>generate-resources</phase>
<configuration>
<skip>${skipAntRunForJenkins}</skip>
<target>
<copy todir="src/main/resources/static">
<fileset dir="../../frontend/dist">
<exclude name="*.html"/>
</fileset>
</copy>
<copy todir="src/main/resources/public">
<fileset dir="../../frontend/dist">
<include name="*.html"/>
</fileset>
</copy>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>

4
frontend/.gitignore vendored
View File

@ -4,3 +4,7 @@ dist-ssr
*.local
.history
coverage
.node/
package-lock.json
pnpm-lock.yaml
yarn.lock

View File

@ -25,7 +25,7 @@
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend-maven-plugin.version}</version>
<configuration>
<installDirectory>node</installDirectory>
<installDirectory>.node</installDirectory>
</configuration>
<executions>
<execution>
@ -42,17 +42,16 @@
</configuration>
</execution>
<!-- Install all project dependencies -->
<!-- todo 前端项目打包配置-->
<!--<execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
&lt;!&ndash; optional: The default argument is actually
<!-- optional: The default argument is actually
"install", so unless you need to run some other yarn command,
you can remove this whole <configuration> section.
&ndash;&gt;
-->
<arguments>install</arguments>
</configuration>
</execution>
@ -64,7 +63,7 @@
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>-->
</execution>
</executions>
</plugin>
<plugin>

View File

@ -90,8 +90,8 @@
<httpclient.version>4.5.14</httpclient.version>
<!-- frontend -->
<frontend-maven-plugin.version>1.12.1</frontend-maven-plugin.version>
<node.version>v16.10.0</node.version>
<npm.version>8.12.1</npm.version>
<node.version>v16.20.0</node.version>
<npm.version>8.19.4</npm.version>
<!-- -->
<skipAntRunForJenkins>false</skipAntRunForJenkins>
<commons-dbcp2-version>2.9.0</commons-dbcp2-version>