<?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文件的更多相关文章

  1. Maven pom文件常用配置,转载

    什么是POM Project Object Model,项目对象模型.通过xml格式保存的pom.xml文件.作用类似ant的build.xml文件,功能更强大.该文件用于管理:源代码.配置文件.开发 ...

  2. Maven打包pom里面配置exclude 排除掉环境相关的配置文件

    Maven打包pom里面配置exclude 排除掉环境相关的配置文件 有几种方式:1. 打包时,指定环境参数把环境的配置文件复制过去2. 不打包所有的环境相关的配置文件,直接由运维的人维护 可以在上传 ...

  3. Maven项目中pom文件分析

    pom英文全称: project object model 1.概述 pom.xml文件描述了maven项目的基本信息,比如groupId,artifactId,version等.也可以对maven项 ...

  4. (转)通过maven,给没有pom文件的jar包生成pom文件,maven项目引入本地jar包

    文章完全转载自 : https://blog.csdn.net/qq_31289187/article/details/81117478 问题一: 经常遇到公司私服或者中央仓库没有的jar包,然后通过 ...

  5. POM文件详解(1)

    POM文件详解 <project xmlns=http://maven.apache.org/POM/4.0.0 xmlns:xsi="http://www.w3.org/2001/X ...

  6. pom文件中maven-assembly-plugin插件学习

    一.使用场景 如果项目是微服务架构,可能用到这个插件的概率比较高,平时普通的项目不需要这样的实现方式. 如果项目内的一部分通用功能,不需要挨个引用,则需要将通用功能部分达成jar包. 二.Maven- ...

  7. maven pom文件

    setting.xml主要用于配置maven的运行环境等一系列通用的属性,是全局级别的配置文件:而pom.xml主要描述了项目的maven坐标,依赖关系,开发者需要遵循的规则,缺陷管理系统,组织和li ...

  8. maven pom文件详解

    http://www.blogjava.net/hellxoul/archive/2013/05/16/399345.html http://blog.csdn.net/houpengfei111/a ...

  9. Intellij打包jar文件,“java.lang.SecurityException: Invalid signature file digest for Manifest main attrib

    下面是使用Intellij 打包jar文件的步骤,之后会有运行jar文件时遇到的错误. 打包完成. ================================================== ...

  10. SpringBoot-02:SpringBoot中的POM文件详细解释

    ------------吾亦无他,唯手熟尔,谦卑若愚,好学若饥------------- 我把pom文件,以及它的详细解释发出来 <?xml version="1.0" en ...

随机推荐

  1. Python矩阵作图库matplotlib的初级使用(2)

    基础介绍 matplotlib图形对象层级结构: 图形对象(figure) → 子图对象(axes) → 坐标轴对象(axis) → 定位器对象-刻度线(locator)/格式化器对象-刻度线标签(f ...

  2. java8 利用 ConcurrentHashMap list根据 某个属性 去重

    //自定义方法private static <T> Predicate<T> distinctByKey(Function<? super T, Object> k ...

  3. 《【转载】ChatGPT创始人,给我们上的8堂课》 回复

    <[转载]ChatGPT创始人,给我们上的8堂课>           https://tieba.baidu.com/p/8276644432

  4. 处理GET和POST的中文乱码问题

    一.doGet 1.先获取iso的错误字符串 2.回退.重编(用UTF-8) String name = request.getParameter("username"); byt ...

  5. unity 利用相机截图,可以截取UI,保存png格式,可用于签名抠图

    public Camera cam; void Start() { StartCoroutine(CaptureAlphaCamera(cam,new Rect(0,0,1920,1080))); } ...

  6. windows下运行.sh文件

    1.安装git,配置git环境(D:\Tools\Git\cmd) .cmd命令检查是否安装成功(git --version). 2.打开Git Bash窗口,命令运行.sh文件. 3.运行.sh文件 ...

  7. lua-table类的继承

    --男人类man = {name = "man",age=123}--继承空间man.__index=man--儿童类child= {}--继承setmetatable(child ...

  8. 选择一个有效的选项。xxx不在可用的选项中。

    选择一个有效的选项.xxx不在可用的选项中. 原因:choice选项的索引类型与字段的类型不匹配. 说明:choice选项的索引类型与字段的类型,不能前面是int,后面是char. 错误示例: cla ...

  9. PowerShell学习笔记二_变量、Select、Foreach、where、自动变量

    变量声明/定义变量使用$作为前缀,例如:$A.$var等.定义一:$mysqlservice=Get-Service -Name mysql ,获取mysql服务对象获取所有服务$services=G ...

  10. Azkaban 4.0.0 系列(一)-- Solo-Server

    下载 链接 https://github.com/azkaban/azkaban/releases/4.0.0.tar.gz 解压 tar -xzvf 4.0.0.tar.gz -C 自定义目标目录 ...