打包pom文件
<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.game2sky</groupId>
<artifactId>mmo.build</artifactId>
<version>${mmo.version}</version>
</parent>
<artifactId>mmo.toolsmerge</artifactId>
<name>mmo.toolsmerge</name>
<version>0.0.1-SNAPSHOT</version>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.game2sky</groupId>
<artifactId>mmo.core</artifactId>
<version>${mmo.version}</version>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
</dependency>
<dependency>
<groupId>com.ibeetl</groupId>
<artifactId>beetl</artifactId>
<version>2.7.5</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.6.5.Final</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
<!--<dependency>-->
<!--<groupId>org.springframework.boot</groupId>-->
<!--<artifactId>spring-boot-starter-web</artifactId>-->
<!-- 去除内嵌tomcat -->
<!--<exclusions>-->
<!--<exclusion>-->
<!--<groupId>org.springframework.boot</groupId>-->
<!--<artifactId>spring-boot-starter-tomcat</artifactId>-->
<!--</exclusion>-->
<!--</exclusions>-->
<!--</dependency>-->
<!--添加servlet的依赖-->
<!--<dependency>-->
<!--<groupId>javax.servlet</groupId>-->
<!--<artifactId>javax.servlet-api</artifactId>-->
<!--<version>3.1.0</version>-->
<!--<scope>provided</scope>-->
<!--</dependency>-->
</dependencies>
<build>
<!-- <resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources> -->
<plugins>
<!-- 复制依赖包 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>target/lib</outputDirectory>
<excludeTransitive>false</excludeTransitive>
<stripVersion>false</stripVersion>
</configuration>
</execution>
</executions>
</plugin>
<!-- 打包 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>mmo.toolsmerge</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<!--打包时排除资源文件-->
<excludes>
<exclude>**/*.properties</exclude>
<exclude>**/*.xml</exclude>
<exclude>**/*.txt</exclude>
<exclude>**/*.yaml</exclude>
<exclude>**/*.sh</exclude>
</excludes>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
<!--构建包体目录-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!--打包目录-->
<property name="dist">${build.dir}</property>
<!--资源目录-->
<property name="res">${build.resource.dir}</property>
<!--依赖包目录-->
<property name="lib">${build.lib.dir}</property>
<property name="dist-tmp">target/build/tmp</property>
<property name="app-name">${project.artifactId}-${project.version}</property>
<property name="real-app-name">${project.artifactId}</property>
<delete dir="${dist}"/>
<mkdir dir="${dist}"/>
<mkdir dir="${res}"/>
<copy file="target/${app-name}.jar" tofile="${dist}/${real-app-name}.jar"/>
<move todir="${lib}">
<fileset dir="target/lib"/>
</move>
<copy todir="${res}">
<fileset dir="target/classes">
<include name="**/*.properties"/>
<include name="**/*.xml"/>
<include name="**/*.txt"/>
<include name="**/*.yaml"/>
</fileset>
</copy>
<copy todir="${dist}">
<fileset dir="target/classes">
<include name="**/*.sh"/>
</fileset>
</copy>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
*************************************************************************************
build pom
<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>
<properties>
<version>1.4.2.RELEASE</version>
<mmo.version>dmc</mmo.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<mysql.version>5.1.48</mysql.version>
<nexus.url>http://172.16.1.52:8081/nexus/content/groups/public/</nexus.url>
<!--打包构建目录配置-->
<build.dir>target/build</build.dir>
<build.resource.dir>target/build/resource</build.resource.dir>
<build.lib.dir>target/build/lib</build.lib.dir>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.2.RELEASE</version>
<relativePath />
</parent>
<groupId>com.game2sky</groupId>
<artifactId>mmo.build</artifactId>
<version>${mmo.version}</version>
<packaging>pom</packaging>
<name>mmo.build</name>
<!-- 镜像 -->
<repositories>
<repository>
<id>hutong</id>
<url>${nexus.url}</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<name>nexus</name>
<url>${nexus.url}</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<repository>
<id> nexus-releases</id>
<name> Nexus Releases Repository</name>
<url>http://172.16.1.52:8081/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id> nexus-snapshots</id>
<name> Nexus Snapshots Repository</name>
<url>http://172.16.1.52:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<attach>true</attach>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>1.0-alpha-6</version>
</extension>
</extensions>
</build>
<modules>
<module>mmo.benfu</module>
<module>mmo.communication</module>
<module>mmo.core</module>
<module>mmo.dbs.server</module>
<module>mmo.tools</module>
<module>mmo.reload</module>
<module>dmc.mock</module>
<module>mmo.battle</module>
<module>mmo.center</module>
<module>mmo.observer</module>
<module>mmo.dbs.compensate</module>
<module>mmo.toolsmerge</module>
</modules>
</project>
打包pom文件的更多相关文章
- Maven pom文件常用配置,转载
什么是POM Project Object Model,项目对象模型.通过xml格式保存的pom.xml文件.作用类似ant的build.xml文件,功能更强大.该文件用于管理:源代码.配置文件.开发 ...
- Maven打包pom里面配置exclude 排除掉环境相关的配置文件
Maven打包pom里面配置exclude 排除掉环境相关的配置文件 有几种方式:1. 打包时,指定环境参数把环境的配置文件复制过去2. 不打包所有的环境相关的配置文件,直接由运维的人维护 可以在上传 ...
- Maven项目中pom文件分析
pom英文全称: project object model 1.概述 pom.xml文件描述了maven项目的基本信息,比如groupId,artifactId,version等.也可以对maven项 ...
- (转)通过maven,给没有pom文件的jar包生成pom文件,maven项目引入本地jar包
文章完全转载自 : https://blog.csdn.net/qq_31289187/article/details/81117478 问题一: 经常遇到公司私服或者中央仓库没有的jar包,然后通过 ...
- POM文件详解(1)
POM文件详解 <project xmlns=http://maven.apache.org/POM/4.0.0 xmlns:xsi="http://www.w3.org/2001/X ...
- pom文件中maven-assembly-plugin插件学习
一.使用场景 如果项目是微服务架构,可能用到这个插件的概率比较高,平时普通的项目不需要这样的实现方式. 如果项目内的一部分通用功能,不需要挨个引用,则需要将通用功能部分达成jar包. 二.Maven- ...
- maven pom文件
setting.xml主要用于配置maven的运行环境等一系列通用的属性,是全局级别的配置文件:而pom.xml主要描述了项目的maven坐标,依赖关系,开发者需要遵循的规则,缺陷管理系统,组织和li ...
- maven pom文件详解
http://www.blogjava.net/hellxoul/archive/2013/05/16/399345.html http://blog.csdn.net/houpengfei111/a ...
- Intellij打包jar文件,“java.lang.SecurityException: Invalid signature file digest for Manifest main attrib
下面是使用Intellij 打包jar文件的步骤,之后会有运行jar文件时遇到的错误. 打包完成. ================================================== ...
- SpringBoot-02:SpringBoot中的POM文件详细解释
------------吾亦无他,唯手熟尔,谦卑若愚,好学若饥------------- 我把pom文件,以及它的详细解释发出来 <?xml version="1.0" en ...
随机推荐
- 【转载】rename。给文件批量改名的python脚本
https://www.bilibili.com/read/cv16146757 确认py版本:2.7, 3.6? 1 import os, sys, re, math, openpyxl, csv ...
- django 安装cerlery error in anyjson setup command: use_2to3 is invalid.
直接报错 error in anyjson setup command: use_2to3 is invalid. setuptools pip install "setuptools< ...
- 掌控安全学院SQL注入靶场延时注入
第一关 第二关
- linux中用命令导出、导入mysql数据库表
一.导出数据 1.使用场景:在没有数据库可视化工具的情况下备份导出数据库. 命令如下: mysqldump -u用户名 -p 数据库名 > 数据库名.sql mysqldump -u root ...
- Scoped方法(防止样式名称冲突)
App.vue <template> <div> <Student/> <School></School> </div> < ...
- CentOS 7 安装步骤以及初始化
2. 虚拟机分配的资源 因为用的软件不一样,这里设置方法无法截图,但大至如下: 2CPU/1G内存/200G硬盘 去掉打印机等没用的硬件(macOS要去掉打印机和摄像头) 光盘开始选择空白光盘,不要在 ...
- EXPORT_SYMBOL的正常使用
1.EXPORT_SYMBOL的作用是什么? EXPORT_SYMBOL标签内定义的函数或者符号对全部内核代码公开,不用修改内核代码就可以在您的内核模块中直接调用,即使用EXPORT_SYMBOL可以 ...
- 小程序modal弹窗
[注意]css放的位置可能影响效果 参考a-level competitionFilterCover 1.容器:position: absolute; top: 100vh; animation: m ...
- 查询dockerhub中某镜像所有版本
curl https://registry.hub.docker.com/v1/repositories/${imagename}/tags | tr -d '[[]" ]' | tr '} ...
- Qt事件处理的几种方式
Qt提供了5种事件处理和事件过滤的方法: 1.重写事件处理器函数 这是大部分情况最常用的一种,如重写 paintEvent().mousePressEvent().keyPressEvent() 等事 ...