标签:snapshot 中文 odi 项目管理 扩展 公司 .com 测试 生成
1、packing
项目打包的类型,可以使jar、war、rar、ear、pom,默认是jar
2、dependencies和dependency
3、properties
properties是用来定义一些配置属性的,例如project.build.sourceEncoding(项目构建源码编码方式),可以设置为UTF-8,防止中文乱码,也可定义相关构建版本号,便于日后统一升级。
4、build
build表示与构建相关的配置,比如build下有finalName,表示的就是最终构建之后的名称。
接着解释一下Maven的目录结构:
----------------------------------------------------------------代码------------------------------------------------------------------------------
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.eoner.parent</groupId>
<artifactId>eoner.parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>com.eoner.hzb.main</groupId>
<artifactId>eoner.hzb.main</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>eoner.hzb.main</name>
<description>eoner.hzb.main xxxx公司 xxxx模块</description>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<!-- 不使用内置tomcat -->
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatisplus-spring-boot-starter</artifactId>
<version>${mybatisplus-spring-boot-starter.version}</version>
</dependency>
<!-- Json web token -->
<!--<dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt</artifactId>
<version>${jwt.version}</version> </dependency> -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
<scope>runtime</scope>
</dependency>
<!--其他依赖 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<!-- json 序列化 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
<!-- mybatis-plus 扩展 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
<!--其他模块的依赖jar-->
<dependency>
<groupId>com.eoner.hzb.persistence</groupId>
<artifactId>eoner.hzb.persistence</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.eoner.core.rest</groupId>
<artifactId>eoner.core.rest</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.eoner.hzb.contacts</groupId>
<artifactId>eoner.hzb.contacts</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.eoner.hzb.user</groupId>
<artifactId>eoner.hzb.user</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<finalName>eoner.hzb.main</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
</build>
</project>
构建模块的顺序就是------------------
persistence---》
rest--》
contacts---》
user---》
最后main模块
标签:snapshot 中文 odi 项目管理 扩展 公司 .com 测试 生成
原文地址:http://www.cnblogs.com/dzcWeb/p/7773808.html