build: 前后端分开打包,使用dockerfile统一copy
This commit is contained in:
parent
b1a06a2b36
commit
924c0ef4aa
|
@ -9,6 +9,10 @@ COPY ${DEPENDENCY}/BOOT-INF/lib /opt/lib
|
||||||
COPY ${DEPENDENCY}/META-INF /opt/META-INF
|
COPY ${DEPENDENCY}/META-INF /opt/META-INF
|
||||||
COPY ${DEPENDENCY}/BOOT-INF/classes /opt
|
COPY ${DEPENDENCY}/BOOT-INF/classes /opt
|
||||||
|
|
||||||
|
ADD frontend/src/assets/theme/index.css /opt/classes/static/css
|
||||||
|
ADD frontend/dist/*[^.html] /opt/classes/static
|
||||||
|
ADD frontend/dist/*.html /opt/classes/public
|
||||||
|
|
||||||
ENV JAVA_CLASSPATH=/opt:/opt/lib/ms-jmeter-core.jar:/opt/lib/*
|
ENV JAVA_CLASSPATH=/opt:/opt/lib/ms-jmeter-core.jar:/opt/lib/*
|
||||||
ENV JAVA_MAIN_CLASS=io.metersphere.Application
|
ENV JAVA_MAIN_CLASS=io.metersphere.Application
|
||||||
ENV AB_OFF=true
|
ENV AB_OFF=true
|
||||||
|
|
|
@ -475,38 +475,6 @@
|
||||||
<version>2.6</version>
|
<version>2.6</version>
|
||||||
</plugin>
|
</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>
|
|
||||||
<target>
|
|
||||||
<move todir="src/main/resources/static">
|
|
||||||
<fileset dir="../frontend/dist">
|
|
||||||
<exclude name="*.html"/>
|
|
||||||
</fileset>
|
|
||||||
</move>
|
|
||||||
<move todir="src/main/resources/public">
|
|
||||||
<fileset dir="../frontend/dist">
|
|
||||||
<include name="*.html"/>
|
|
||||||
</fileset>
|
|
||||||
</move>
|
|
||||||
<copy todir="src/main/resources/static/css">
|
|
||||||
<fileset dir="../frontend/src/assets/theme">
|
|
||||||
<include name="index.css"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
</target>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
|
|
@ -65,6 +65,20 @@
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<filesets>
|
||||||
|
<fileset>
|
||||||
|
<directory>dist</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**</include>
|
||||||
|
</includes>
|
||||||
|
<followSymlinks>false</followSymlinks>
|
||||||
|
</fileset>
|
||||||
|
</filesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Reference in New Issue