---
title: "maven 自定义打包"
author: "chzhxu"
date: "2016-06-16T19:54:36Z"
tags: []
categories: ["编程语言"]
slug: "maven"
draft: false
lastmod: "2016-06-17T09:10:10Z"
id: 2305575
url: "https://gangling.iteye.com/blog/2305575"
---

配置 pom.xml \[code="xml"] maven-assembly-plugin 2.6 make-assembly package single assembly.xml false PROD product true DEV dev TEST test \[/code] 配置 assembly.xml \[code="xml"] ${project.artifactId}-assembly-${project.version} false war ${project.build.outputDirectory} WEB-INF/classes jdbc.properties log4j.properties ${project.basedir}/env/${env} WEB-INF/classes/ ${project.basedir}/src/main/webapp / false WEB-INF/lib runtime \[/code] 通过以下命令运行生产、测试、开发环境 \[img]http://dl2.iteye.com/upload/attachment/0118/0968/a75fa5e4-ac2c-324f-a2cf-e77971257d38.png\[/img]