<?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>ruoyi</artifactId> <groupId>com.ruoyi</groupId> <version>3.8.1</version> </parent> <modelVersion>4.0.0</modelVersion> <packaging>jar</packaging> <artifactId>ruoyi-admin</artifactId> <description> web服务入口 </description> <properties> <project.name>${project.artifactId}-release-${project.parent.version}</project.name> <project.build.libUrl>${project.build.directory}/${project.name}/${project.name}/lib</project.build.libUrl> </properties> <dependencies> <!-- spring-boot-devtools --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> <!-- 表示依赖不会传递 --> </dependency> <!-- swagger3--> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-boot-starter</artifactId> </dependency> <!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 --> <dependency> <groupId>io.swagger</groupId> <artifactId>swagger-models</artifactId> <version>1.6.2</version> </dependency> <!-- Mysql驱动包 --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency> <!-- 单元测试 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> <!-- 单元测试 --> <!-- 核心模块--> <dependency> <groupId>com.ruoyi</groupId> <artifactId>ruoyi-framework</artifactId> </dependency> <!-- 定时任务--> <dependency> <groupId>com.ruoyi</groupId> <artifactId>ruoyi-quartz</artifactId> </dependency> <!-- 代码生成--> <dependency> <groupId>com.ruoyi</groupId> <artifactId>ruoyi-generator</artifactId> </dependency> <!-- 基础信息--> <dependency> <groupId>com.ruoyi</groupId> <artifactId>warewms-base</artifactId> </dependency> <dependency> <groupId>com.ruoyi</groupId> <artifactId>warewms-ams</artifactId> </dependency> <dependency> <groupId>com.ruoyi</groupId> <artifactId>warewms-hard</artifactId> </dependency> </dependencies> <!--<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>2.1.1.RELEASE</version> <configuration> <fork>true</fork> <!– 如果没有该配置,devtools不会生效 –> </configuration> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>3.1.0</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> <warName>${project.artifactId}</warName> </configuration> </plugin> </plugins> <finalName>${project.artifactId}</finalName> </build>--> <build> <plugins> <!--<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>2.1.1.RELEASE</version> <configuration> <includeSystemScope>true</includeSystemScope> <fork>true</fork> <!– 如果没有该配置,devtools不会生效 –> </configuration> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin>--> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.6.1</version> <configuration> <source>1.8</source> <target>1.8</target> <encoding>UTF-8</encoding> <!-- java8 保留参数名编译参数 --> <compilerArgument>-parameters</compilerArgument> <compilerArguments> <verbose /> </compilerArguments> </configuration> </plugin> <!-- jar 包中的配置文件优先级高于 config 目录下的 "同名文件" 因此,打包时需要排除掉 jar 包中来自 src/main/resources 目录的 配置文件,否则部署时 config 目录中的同名配置文件不会生效 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.6</version> <configuration> <excludes> <exclude>*.txt</exclude> <!--juniorRay 修改不要忽略所有xml,否则mybatis找不到映射--> <!--<exclude>*.xml</exclude>--> <exclude>/*.xml</exclude><!-- ‘/’ 只过滤根目录下的xml,子文件不进行遍历 --> <!--JuniorRay 或者直接不用上面的,用下面这个指定具体文件--> <!-- <exclude>ehcache.xml</exclude> <exclude>logback.xml</exclude>--> <exclude>*.yml</exclude> <exclude>*.properties</exclude> </excludes> </configuration> </plugin> <!-- 使用 mvn clean package 打包 更多配置可参考官司方文档:http://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>3.1.0</version> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <!-- 打包生成的文件名 --> <finalName>${project.name}</finalName> <!-- jar 等压缩文件在被打包进入 zip、tar.gz 时是否压缩,设置为 false 可加快打包速度 --> <recompressZippedFiles>false</recompressZippedFiles> <!-- 打包生成的文件是否要追加 package.xml 中定义的 id 值 --> <appendAssemblyId>false</appendAssemblyId> <!-- 指向打包描述文件 package.xml --> <descriptors> <descriptor>package.xml</descriptor> </descriptors> <!-- 打包结果输出的基础目录 --> <outputDirectory>${project.build.directory}/</outputDirectory> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> <skipTests>true</skipTests> </configuration> </plugin> </plugins> </build> </project>