1:头部引用

<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/maven-v4_0_0.xsd">
</project>

2:添加数据源数据,并调用数据源的jar包

<!-- 添加数据源 -->

<repositories>
<repository>
<id>mvn-repo</id>
<url>http://maven.nlpcn.org/</url>
</repository>
</repositories> <!-- 调用数据源的jar包 --> <dependencies>
<dependency>
<groupId>org.ansj</groupId>
<artifactId>ansj_seg</artifactId>
<version>5.0.1</version>
</dependency>
</dependencies>

3:设置Java的版本号

<build>
<plugins>
<!-- 设置Java的版本号 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>

4:web.xml路径设置

<build>
<plugins>
<!-- web.xml路径设置 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<webResources>
<resource>
<directory>webapp</directory>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</build>

5:指定属性

<properties>
  <junit.version>3.8.1</junit.version><!-- 指定junit的版本 -->
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  <jdk.version>1.7</jdk.version>
</properties>

---------------------------------

一步一步学习,不断成长。

pom.xml配置的更多相关文章

  1. pom.xml配置,针对mvn clean install -P参数(环境参数)打包

    pom.xml配置,针对mvn clean install -P参数(环境参数)打包 比如你有2个环境,一个dev,一个prod, 然后你在mvn打包的时候,可以通过-P来打包,是打dev包,还是pr ...

  2. Maven-SSM项目pom.xml配置以及springmvc配置以及mybatis配置及web.xml配置

    一.Maven本地仓库的pom.xml配置 (全部是mysql数据库) <project xmlns="http://maven.apache.org/POM/4.0.0" ...

  3. pom.xml 配置maven私服

    1.pom.xml 配置maven私服 <repositories>       <repository>        <id>caf_repositories& ...

  4. pom.xml配置引用项目时不生效

    1 在项目pom.xml配置中引用项目A,但是编译时,取提数引起是B: 2 原因是:[Java Build Path - Projects] 引用的还是老的项目B,删除该引用即可解决.

  5. spring之pom.xml配置

    spring之pom.xml配置 <?xml version="1.0" encoding="UTF-8"?> <project xmlns= ...

  6. 云-腾讯云-笔记:pom.xml 配置

    ylbtech-云-腾讯云-笔记:pom.xml 配置 1. pom.xml返回顶部 1.1 com.qcloud / 腾讯云 <!-- https://mvnrepository.com/ar ...

  7. SpringBooot-基础<2>-POM.xml配置

    SpringBooot-基础<2>-POM.xml配置 项目创建完成后,需要配置pom.xml文件. pom.xml里面的配置,按需进行添加,这里提供一份参考,后面做笔记会都用到. < ...

  8. Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):4、Maven项目转换与pom.xml配置

    文章目录: Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):1.JIRA账号注册 Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):2.PGP ...

  9. Maven的POM.xml配置大全

    <?xml version="1.0" encoding="utf-8"?> <project xmlns="http://mave ...

  10. Maven的pom.xml 配置详解

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...

随机推荐

  1. 初学QML之qmlRegisterType

    qmlRegisterType 是一个可以将C++实现的类在QML中调用的,连接C++和QML的一个工具 首先来看QtAssistant的介绍 int qmlRegisterType(const ch ...

  2. win8 Pro 64位在 UEFI模式下Ghost系统 备份 恢复

    一:在win8 安装U 盘中  1. 新建 “Ghost” 文件夹 2. 将下载的Ghost64.exe 文件拷贝到文件夹  二: 启动的时候 按下F12 选择 HDDUSB 1.Windows 安装 ...

  3. GetClientRect()和GetWindowRect()

    GetClientRect()   是得到客户区坐标系下客户区的RECT GetWindowRect()是得到屏幕坐标系下整个窗口的RECT GetSystemMetrics()是获得屏幕分辨率大小 ...

  4. HDU 3001 状压DP

    有道状压题用了搜索被队友骂还能不能好好训练了,, hdu 3001 经典的状压dp 大概题意..有n个城市 m个道路  成了一个有向图.n<=10: 然后这个人想去旅行.有个超人开始可以把他扔到 ...

  5. java 时区处理机制(0时区转换到服务器时区)

    package com.globalroam.util; import java.util.Calendar; import java.util.Date; import java.util.Time ...

  6. 从运行原理及使用场景看Apache和Nginx

    用正确的工具,做正确的事情. 本文只作为了解Apache和Nginx知识的一个梳理,想详细了解的请阅读文末参考链接中的博文. Web服务器 Web服务器也称为WWW(WORLD WIDE WEB)服务 ...

  7. 使用pip install 或者easy_install安装Python的各种包出现cc failed with exit status 1

    *:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !important; } ...

  8. AngularJS中的控制器示例_2

    <!doctype html> <html ng-app="myApp"> <head> <script src="C:\\Us ...

  9. Centos下配置Java运行环境

    今天搞了个阿里云,Centos主机 先搞了Tomcat 然后配置Java环境 1.修改文件可执行 chmod 777 (u+x) 文件名 2.配置环境变量 vi /etc/profile 加入如下代码 ...

  10. 【温故而知新:文件操作】C#的文件读写相关

    StreamReader类以及其方法ReadLine,Read,ReadToEnd的分析 首先StreamReader类的构造参数非常丰富在这里,我觉得最常用的就是StreamReader(Strea ...