maven copy有很多种方法:

1.maven-antrun-plugin (使用ant复制)

 <build>
<finalName>flex</finalName>
<sourceDirectory>src</sourceDirectory>
<outputDirectory>../monitorweb/src/main/webapp/topoview</outputDirectory>
<plugins> <plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo message="*****copy LocalConnectionSender.html and LocalConnectionSender.swf to ../monitorweb/src/main/webapp/topoview*****"/>
<copy todir="../monitorweb/src/main/webapp/topoview" overwrite="true">
<fileset dir="src/assets/dragapp"/>
</copy>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </build>

2.maven-dependency-plugin

 <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-installed</id>
<phase>install</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<type>${project.packaging}</type>
</artifactItem>
</artifactItems>
<outputDirectory>some-other-place</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>

3.maven-jar-plugin

    <project>
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
...
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
...
</plugin>
</plugins>
</build>
...
<dependencies>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
...
</project>

最后我使用了maven ant ,感觉它控制的比较细,上手也比较快。

Maven copy方式列举的更多相关文章

  1. 在Intellij IDEA中使用Maven的方式将项目导出为jar包

    前言:由于项目使用maven管理方式,所以在未发布版本的时候,就需要将项目打成jar包,供本地调试使用.注意在使用本地jar包的时候,需要将pom文件中相关jar包的依赖屏蔽,再将jar包加入项目中. ...

  2. MyBatis代码生成器(maven插件方式和控制台命令运行方式)

    代码生成器的作用: 1.生成domain 2.生成mapper接口 3.生成mapper映射文件 准备工作:导入MyBatis所需要的包 第一步:在src/main/resources(必须)目录下创 ...

  3. Maven插件方式使用Mybatis Generator

    Mybatis Generator Mybatis Generator简称MBG,可以根据数据库自动生成实体类.单表查询接口及其映射xml文件(也可以选择以注解方式生成). 下面介绍一下以maven插 ...

  4. maven copy jar 插件

     插件比较特殊 eclipse下的 首先声明插件 <pluginManagement> <plugin> <groupId>org.apache.maven.plu ...

  5. SpringBoot入门案例——创建maven Module方式

    最近看到一个大牛写的spring boot案例,链接贴这 https://github.com/ityouknow/spring-boot-examples.git 这里通过在maven里创建多个mo ...

  6. 取maven copy部分

    mvn deploy:deploy-file -DgroupId=com.mycompany -DartifactId=my-project -Dversion=1.0.0 -Dpackaging=j ...

  7. Maven打包方式

    转自:https://blog.csdn.net/qq_26597927/article/details/80170073 Maven打包三种方法(推荐第三种) 2018年05月02日 18:30:2 ...

  8. KingbaseES R6 集群物理copy方式手工添加新备库节点

    案例说明: 对于主库数据量比较大的环境,在添加新节点是可以采用在线clone方式创建新的备库节点,也可以在离线的状态下,直接拷贝其中一个备库的所有集群相关目录来创建新的备库节点.本案例介绍了通过离线物 ...

  9. Spring和cxf3的整合,以maven的方式

    一.引入cxf3 我这里使用的是最新的版本cxf3.1.8 引入cxf3需要在pom.xml加入如下内容: <dependency> <groupId>org.apache.c ...

随机推荐

  1. 字体样式(.ttf/.woff)文件的配置引入

    在引入前端框架部分功能时,有时需要配置字体样式.可以这样配置:在 .ttf的同级目录下,创建icon.css文件,写入: @font-face {font-family: "element- ...

  2. These relative modules were not found:...{"sourceM ap":false} 报错解决

    今天在使用vue2.0 + webpack 时,没有动过任何配置文件,也没更新依赖,但是报下面的错误: These relative modules were not found: * ./star1 ...

  3. poj 2954 Triangle 三角形内的整点数

    poj 2954 Triangle 题意 给出一个三角形的三个点,问三角形内部有多少个整点. 解法 pick's law 一个多边形如果每个顶点都由整点构成,该多边形的面积为\(S\),该多边形边上的 ...

  4. JS数据分组[JSON]

    JS 数据分组 var arr = [{ "id": "1001", "name": "值1", "value ...

  5. keil5下载程序时出现“internal command error”解决方法

    今天下载的时候,插入下载器,查看Debug可用看到“internal command error”,一直找不到原因,后来查看上一个工程才发现,上一个程序禁用了Seral Wire 引脚,导致的. 解决 ...

  6. Set&Map区别Array

    Set&Map区别Array 在Set内部,两个NaN是相等.两个对象总是不相等的.可以用length来检测 四个操作方法: add(value):添加某个值,返回Set结构本身. delet ...

  7. https的基本原理,看完你的程序员女朋友再也不和你提分手了

    [http风险] 首先,我们来讲一下平时上网的时候,存在的风险. 初步接触过网络的同学都知道,网络上是很不安全的,尤其是各种公共场合的免费WIFI,以及手机上各种免费上网的万能钥匙.这些不安全因素会导 ...

  8. ASP.NET-SOAP、UDDI知识点

    1. 什么是SOAP? 答:是简单访问协议.是在分布式环境中,交换信息并实现远程调用的协议.是一个基于XML的协议.使用SOAP,可以不考虑任何传输协议,但通常还是HTTP协议,可以允许任何类型的对象 ...

  9. SharePoint 2010 安装教程

    SharePoint Server 2010作为MOSS 2007的升级版本,自从2009年底发布Beta版本以来就备受关注,网络上已经出现了很多相关的文章,其中也不乏中文的信息. 最近SharePo ...

  10. HDU 2865

    和上题一样,但K较大,不能直接用矩阵来写.这个矩阵必定是这个形式的. 0 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 分成对角线上元素B与非对角线上元素A k: 1 2 3 4 ... ...