加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
pom.xml 6.23 KB
一键复制 编辑 原始数据 按行查看 历史
Sam 提交于 2021-10-26 15:29 . 1. MyBatis 简单使用修正
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.learning.mybatis</groupId>
<artifactId>learning-mybatis-all</artifactId>
<version>${revision}</version>
<name>${project.artifactId}</name>
<description>Learning Mybatis Project</description>
<packaging>pom</packaging>
<properties>
<revision>1.0.0</revision>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>
<versions-maven-plugin.version>2.2</versions-maven-plugin.version>
<spring-boot.version>2.5.6</spring-boot.version>
<mybatis-spring-boot-starter.version>2.2.0</mybatis-spring-boot-starter.version>
</properties>
<modules>
<module>01-mybatis-base</module>
<module>02-mybatis-config</module>
<module>03-mybatis-mapper</module>
<module>04-mybatis-dynamicsql</module>
<module>05-mybatis-principle</module>
<module>06-mybatis-plugin</module>
<module>07-mybatis-practise</module>
<module>08-mybatis-spring</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!--MyBatis-->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis-spring-boot-starter.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven-enforcer-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${versions-maven-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<parameters>true</parameters>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<configuration>
<!--插件默认只会处理packaging属性为非pom的,如果要处理packaging为pom的,可将本属性值设置为true。-->
<updatePomFile>true</updatePomFile>
<!-- 压缩模式。oss: 推荐开源项目使用,会展开ciManagement、contributors、distributionManagement、inceptionYear、issueManagement、mailingLists、organization、prerequisites -->
<flattenMode>oss</flattenMode>
<!--由OS或者JDK的不同而触发的profile,可能根据环境的不同而产生不同的依赖,但是由属性等触发的profile,就不确定了,如果属性设置为true,profile中的依赖会直接写入生成的pom中,如果设置为false,所有的profile信息都会保留,默认是false。-->
<embedBuildProfileDependencies>true</embedBuildProfileDependencies>
<!--该元素定义了如何处理额外的元素,如果可能,尽量使用 flattenMode,这个元素仅仅用于进一步提高灵活性,它可以控制具体的某个元素是保留还是删除,
比如要指定删除 repositories,可以这样:<pomElements><repositories>flatten</repositories></pomElements>。-->
<pomElements>
<distributionManagement>remove</distributionManagement>
<repositories>remove</repositories>
</pomElements>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化