单独打出可执行包,然后将依赖包打入lib文件价中

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.fxust.appmain.BatchMainFrame</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.directory}/lib
</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>

利用一下两个命令即可进行打包

mvn clean

mvn package

参考链接:https://www.cnblogs.com/Binhua-Liu/p/5604841.html

Maven打可执行包的pom.xml配置的更多相关文章

  1. Maven使用笔记(四)pom.xml配置详解

    pom.xml文件配置详解 --声明规范 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=" ...

  2. Maven教程初级篇02:pom.xml配置初步

    1. 创建项目并更改项目基本配置信息 在命令行下运行如下命令创建一个项目: 1 mvn archetype:create -DgroupId=net.jianxi.tutorials     2    ...

  3. Webdriver+testNG+ReportNG+Maven+SVN+Jenkins自动化测试框架的pom.xml配置

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...

  4. Maven入门 项目的生命周期&pom.xml配置&仓库

  5. pom.xml 配置maven私服

    1.pom.xml 配置maven私服 <repositories>       <repository>        <id>caf_repositories& ...

  6. Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):4、Maven项目转换与pom.xml配置

    文章目录: Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):1.JIRA账号注册 Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):2.PGP ...

  7. pom.xml配置,针对mvn clean install -P参数(环境参数)打包

    pom.xml配置,针对mvn clean install -P参数(环境参数)打包 比如你有2个环境,一个dev,一个prod, 然后你在mvn打包的时候,可以通过-P来打包,是打dev包,还是pr ...

  8. Maven-SSM项目pom.xml配置以及springmvc配置以及mybatis配置及web.xml配置

    一.Maven本地仓库的pom.xml配置 (全部是mysql数据库) <project xmlns="http://maven.apache.org/POM/4.0.0" ...

  9. spring boot(14)-pom.xml配置

    继承spring-boot-starter-parent 要成为一个spring boot项目,首先就必须在pom.xml中继承spring-boot-starter-parent,同时指定其版本 & ...

随机推荐

  1. 【云安全与同态加密_调研分析(2)】国外云安全标准建议组织——By Me

    国际上比较有影响力的云安全组织: ◆2. 国外云安全标准建议组织(云安全建议白皮书)◆ ◆云安全标准建议组织(主要的)◆ ◆标准建议组织介绍◆ ◆相关建议白皮书制定◆ ◆建立的相关模型参考◆ ◆备注( ...

  2. 010-Shell 输入/输出重定向

    大多数 UNIX 系统命令从你的终端接受输入并将所产生的输出发送回​​到您的终端.一个命令通常从一个叫标准输入的地方读取输入,默认情况下,这恰好是你的终端.同样,一个命令通常将其输出写入到标准输出,默 ...

  3. PHP魔术方法和魔术常量介绍及使用

    魔术方法(Magic methods) PHP中把以两个下划线__开头的方法称为魔术方法,这些方法在PHP中充当了举足轻重的作用. 魔术方法包括: __construct(),类的构造函数 __des ...

  4. Laravel 5.3 使用内置的 Auth 组件实现多用户认证功能

    https://blog.csdn.net/kevinbai_cn/article/details/54341779 概述 在开发中,我们经常会遇到多种类型的用户的认证问题,比如后台的管理员和前台的普 ...

  5. APIENTRY

    1.在widnows编程中int APIENTRY WinMain中APIENTRY是什么意思,其什么作用? winapi表示此函数是普通的winapi函数调用方式,apientry则表明此函数是应用 ...

  6. [转]linux shell 获取当前正在执行脚本的绝对路径

    原文链接:http://sexywp.com/bash-how-to-get-the-basepath-of-current-running-script.htm 常见的一种误区,是使用 pwd 命令 ...

  7. append和extend区别

    append append方法用于在列表末尾添加新的对象 它是把添加的对象当成一个整体追加到末尾 a=[1,23,436] b=[] b.append(a) print(b)""& ...

  8. python xpath 中的全部用法

    不好意思 ,太仓促只能给你们个url 链接:https://blog.csdn.net/hhtnan/article/details/77509549

  9. jq--ajax中止请求

    比如我后端设置延迟3s再响应给前端,我用的是node之koa2 router.get('/vueDemo/getStudents', async ( ctx ) => { //延迟3s asyn ...

  10. Shiro安全框架入门篇

    一.Shiro框架介绍 Apache Shiro是Java的一个安全框架,旨在简化身份验证和授权.Shiro在JavaSE和JavaEE项目中都可以使用.它主要用来处理身份认证,授权,企业会话管理和加 ...