gateway-admin-backend
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency> <groupId>store.kalvan.gateway</groupId> <artifactId>gateway-admin-backend</artifactId> <version>1.0.0</version> </dependency>
<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 https://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>store.kalvan.platform</groupId> <artifactId>maven-web</artifactId> <version>1.0.0</version> <relativePath></relativePath> </parent> <groupId>store.kalvan.gateway</groupId> <artifactId>gateway-admin-backend</artifactId> <packaging>jar</packaging> <properties> <maven.deploy.skip>false</maven.deploy.skip> <buildNodeScript>build</buildNodeScript> </properties> <build> <finalName>gateway-admin</finalName> <!-- 默认按jar依赖发布 --> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <skip>true</skip> </configuration> </plugin> </plugins> </build> <profiles> <profile> <!-- 前后端整体打包可执行jar--> <id>standalone</id> <build> <plugins> <!--打jar包时增加--> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <skip>false</skip> </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>../gateway-admin-frontend/dist</directory> </fileset> </filesets> </configuration> </plugin> <!--运行npm build--> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <executions> <execution> <id>exec-npm-run-build</id> <phase>compile</phase> <goals> <goal>exec</goal> </goals> <configuration> <executable>npm</executable> <arguments> <argument>run</argument> <argument>${buildNodeScript}</argument> </arguments> <workingDirectory>../gateway-admin-frontend</workingDirectory> </configuration> </execution> </executions> </plugin> <!--资源插件,主要为了从前端项目里复制打包好的文件到springboot项目--> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <configuration> <encoding>UTF-8</encoding> <nonFilteredFileExtensions> <nonFilteredFileExtension>xls</nonFilteredFileExtension> <nonFilteredFileExtension>xlsx</nonFilteredFileExtension> </nonFilteredFileExtensions> </configuration> <executions> <execution> <id>copy static</id> <phase>compile</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <!-- 复制前端打包文件到这里,前端配置配置publicPath=ui, WebServerFactoryCustomizer 配置404转发到 ui/index.html--> <outputDirectory>target/classes/static/ui</outputDirectory> <overwrite>true</overwrite> <resources> <resource> <!-- 从前端打包的目录dist进行指定文件、文件夹内容的复制--> <directory>../gateway-admin-frontend/dist</directory> </resource> </resources> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> <dependencies> <!-- 框架 --> <dependency> <groupId>store.kalvan.platform</groupId> <artifactId>platform-admin-backend</artifactId> <version>1.0.0</version> </dependency> </dependencies> </project>