Maven pom.xml 常用打包配置
<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 常用打包配置的更多相关文章
- J2EE maven pom.xml常用的jar包
新建一个maven webapp工程,默认的pom.xml文件如下: <project xmlns="http://maven.apache.org/POM/4.0.0" x ...
- maven pom.xml常用标签 Exclusions plugins是什么意思
Exclusions maven的依赖(dependencies)有传递性,为了解决兼容性问题,就用exclusions来排除造成兼容性问题的依赖. 写法如下: 加入项目A依赖项目B,项目B依赖项目C ...
- Maven - pom.xml常用元素
基本坐标信息:
- Maven pom.xml 全配置(一)常用配置
Maven pom.xml 全配置(一)常用配置 这里贴出一个Maven中出现频率较高的配置参数注释,方便理解项目中Maven的配置具体的作用.如果在此博文中没有找到你想看到的参数,可以移步Maven ...
- Maven pom.xml 全配置(二)不常用配置
Maven pom.xml 全配置(二)不常用配置 这里贴出Maven pom.xml文件中使用率较少的配置参数,如果此篇文档中没有找到你想要的参数,移步Maven pom.xml 全配置(一)常用配 ...
- (转)Maven pom.xml 配置详解
背景:maven一直感觉既熟悉又陌生,归根结底还是自己不太熟. 1 什么是pom? pom作为项目对象模型.通过xml表示maven项目,使用pom.xml来实现.主要描述了项目:包括配置文件:开发者 ...
- Maven(四-2) Maven pom.xml 配置详解
转载于:http://niuzhenxin.iteye.com/blog/2042102 什么是pom? pom作为项目对象模型.通过xml表示maven项目,使用pom.xml来实现.主要描述 ...
- myeclipse maven pom.xml 配置错误
http://www.oschina.net/question/2265006_219341#tags_nav maven pom.xml 配置文件错误 腾讯云消息队列CMQ架构解析> ...
- Maven pom.xml文件详解
Maven pom.xml文件详解 一.简介 POM全称是Project Object Model,即项目对象模型. pom.xml是maven的项目描述文件,它类似与antx的project.xml ...
随机推荐
- Python3安装使用SaltStack以及salt-api详解
序言 最近在使用salt-api做主机批量管理部署,整理一下文档.之前使用saltstack 多用于命令行管理,自己做web版的自动化管理平台时,发现命令行的些许局限性,接触到salt-api,找到了 ...
- CRC32算法笔记
这几天在研究CRC32的计算过程,看了CRC算法的原理,也看了不少通过移位法实现的代码,但是算出的结果跟校验工具算的不一致. 折腾了好长时间,终于找到一个手工计算CRC32的文章,再对照IEEE 80 ...
- yolov3源码分析keras(二)损失函数计算
一.前言 损失函数计算主要分析两部分一部分是yolo_head函数的分析另一部分为ignore_mask的生成的分析. 二.重要细节分析 2.1损失函数计算具体代码及部分分析 def yolo_los ...
- Angular material mat-icon 资源参考_Action
ul,li>ol { margin-bottom: 0 } dt { font-weight: 700 } dd { margin: 0 1.5em 1.5em } img { height: ...
- Java编码转换
于Java当中,编码格式的转换一般较为麻烦,就我目前的经验来说,需要用到转码的环境主要是IO(无论是网络IO还是文件IO).转换方式主要有以下几种 方式一:String层面 String mes ...
- 为什么要选择RabbitMQ ,RabbitMQ简介,各种MQ选型对比
原文:https://www.sojson.com/blog/48.html 前言: MQ 是什么?队列是什么,MQ 我们可以理解为消息队列,队列我们可以理解为管道.以管道的方式做消息传递. 场景: ...
- Qt4.8.5移植
这两天搞了Qt移植 因为不小心 耽误了挺多时间 但是也比较好的掌握了 现在记录一下 准备工具: tslib-1.16 qt-everywhere-opensource-src-4.8.5.tar ...
- pandas数据清洗
1.我已安装好Anavonda3.5.所以我只用打开"jupyter notebook",然后打开浏览器 然后点击右侧的“new",然后打开python3
- js获取字符串字节的位数
ifSubUser.getBlength = function(str){ ;i--;){ n += str.charCodeAt(i) > ? : ; } return n; }
- docker安装mongo初体验
1.docker安装在此不做介绍,请自行百度:个人环境是在windows下运行cmd执行docker命令2.打算在docker下安装使用mongo,顺带熟悉docker,拉开篇章3.docker下安装 ...