<build>
<!-- 指定JAVA源文件目录 -->
<sourceDirectory>src</sourceDirectory>
<!-- 配置资源文件-->
<resources>
<resource>
<directory>src</directory>
<includes>
<include>*/*.xml</include>
<include>*.properties</include>
</includes>
<filtering>true</filtering>
</resource>
</resources> <plugins>
<!-- 配置资源文件插件-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<!-- 配置编译插件-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<!-- 配置Jar打包插件-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<configuration>
<excludes>
<exclude>*/*.xml</exclude>
<exclude>*.properties</exclude>
<exclude>**/Test/*</exclude>
</excludes>
</configuration>
</plugin>
<!-- 配置Jar打包源文件插件-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin> <!--输出依赖的jar-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin> </plugins>
</build>

Maven pom.xml 常用打包配置的更多相关文章

  1. J2EE maven pom.xml常用的jar包

    新建一个maven webapp工程,默认的pom.xml文件如下: <project xmlns="http://maven.apache.org/POM/4.0.0" x ...

  2. maven pom.xml常用标签 Exclusions plugins是什么意思

    Exclusions maven的依赖(dependencies)有传递性,为了解决兼容性问题,就用exclusions来排除造成兼容性问题的依赖. 写法如下: 加入项目A依赖项目B,项目B依赖项目C ...

  3. Maven - pom.xml常用元素

    基本坐标信息:

  4. Maven pom.xml 全配置(一)常用配置

    Maven pom.xml 全配置(一)常用配置 这里贴出一个Maven中出现频率较高的配置参数注释,方便理解项目中Maven的配置具体的作用.如果在此博文中没有找到你想看到的参数,可以移步Maven ...

  5. Maven pom.xml 全配置(二)不常用配置

    Maven pom.xml 全配置(二)不常用配置 这里贴出Maven pom.xml文件中使用率较少的配置参数,如果此篇文档中没有找到你想要的参数,移步Maven pom.xml 全配置(一)常用配 ...

  6. (转)Maven pom.xml 配置详解

    背景:maven一直感觉既熟悉又陌生,归根结底还是自己不太熟. 1 什么是pom? pom作为项目对象模型.通过xml表示maven项目,使用pom.xml来实现.主要描述了项目:包括配置文件:开发者 ...

  7. Maven(四-2) Maven pom.xml 配置详解

    转载于:http://niuzhenxin.iteye.com/blog/2042102 什么是pom?    pom作为项目对象模型.通过xml表示maven项目,使用pom.xml来实现.主要描述 ...

  8. myeclipse maven pom.xml 配置错误

    http://www.oschina.net/question/2265006_219341#tags_nav maven pom.xml 配置文件错误       腾讯云消息队列CMQ架构解析> ...

  9. Maven pom.xml文件详解

    Maven pom.xml文件详解 一.简介 POM全称是Project Object Model,即项目对象模型. pom.xml是maven的项目描述文件,它类似与antx的project.xml ...

随机推荐

  1. easyui里面的API=====》 load

    在easyui里面有个API load,这个API实用性质很强,可以直接帮我加载页面的数据到想需要的相应输入框里面,但是也要注意,这些将要被填入数据的输入框里面的属性有个要求:其中输入框里面的name ...

  2. 5104 I-country

    5104 I-country 在 N*M 的矩阵中,每个格子有一个权值,要求寻找一个包含 K 个格子的凸连通块(连通块中间没有空缺,并且轮廓是凸的,如书中图片所示),使这个连通块中的格子的权值和最大. ...

  3. 理解webpack中的publicPath

    outPut中的publicPath 默认值: 空字符串. publicPath是非常有必要配置的,他是项目中引入静态资源(js.css)时的基础路径. 例如: outPut.publicPath = ...

  4. 调试K3网页版需要注意的问题

    1.BIN目录下不能存放类名相同的多个文件,即使修改了dll名称也不可以,必须保持唯一性,多余的备份到其他目录 2.引用的标准dll集合需要与当前运行程序的标准dll集合保持一致,可以通过修改引用路径 ...

  5. [原创] Linux 中的 nohup 与 &

    目录 背景 结论放前面 & nohup nohup + & 测试 直接运行 单独使用 & 单独使用 nohup nohup + & 背景 一直没搞清楚 nohup 与 ...

  6. grep练习

    1.查找特定字符串 [root@server3 mnt]# cat passwd root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/no ...

  7. sql 简单语法

    1.数据库操作 create database student_info -- 创建数据库 drop database student_info -- 删除数据库 2.表操作 -- 创建表 creat ...

  8. 用hashmap实现redis有什么问题

    1.容量问题 hashmap是有最大容量的 2.时效问题 redis可以持久化,也可以定时时间 hashmap不可以持久化 3.线程并发问题 hashmap不是线程安全的(并且:多线程同时调用hash ...

  9. 【云计算】pig基础、运行、编写

    会用和用得好是两个概念. 一.pig基础概念 二.pig运行方式 Pig 有两种运行模式: Local 模式和 MapReduce 模式. 本地模式:$pig-x local test.pig Map ...

  10. java io 模型重点讲述

    java io 模型重点讲述 bio(阻塞) 同步IO 接受请求与处理请求用同一条线程 aio 应用程序线程会向系统注册一个socket请求,以及一个回调方法,继续执行下去.socket接受区的数据监 ...