如何要求Maven War插件将特定的jar文件复制到warfile/web-inf/lib中 [英] how to ask maven war plugin to copy particular jar file into warfile/web-inf/lib

查看:88
本文介绍了如何要求Maven War插件将特定的jar文件复制到warfile/web-inf/lib中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在c:/JAR中有一个simple.jar文件. 当我使用maven war插件创建war文件时,它将所有依赖项复制到lib文件夹中.

I have a simple.jar file that stay in c:/JAR. When i used maven war plugin to create a war file, it will copy all the dependencies into lib folder.

我如何要求Maven也将simple.jar复制到lib文件夹中.

How can i ask maven to copy simple.jar into lib folder as well.

推荐答案

我相信这对您有用.我不是100%肯定C:\\JAR是正确的.您可能必须弄弄这种语法.

I believe this will work for you. I'm not 100% sure the C:\\JAR is correct though. You might have to fiddle with this syntax.

<build> 
 <plugins> 
       <plugin> 
        <groupId>org.apache.maven.plugins</groupId> 
        <artifactId>maven-war-plugin</artifactId> 
        <version>2.0.2</version> 
        <configuration> 
          <webResources> 
            <resource> 
              <directory>C:\\JAR</directory> 
              <targetPath>WEB-INF/lib</targetPath> 
            </resource> 
          </webResources> 
        </configuration> 
      </plugin> 
 </plugins> 
</build> 

这篇关于如何要求Maven War插件将特定的jar文件复制到warfile/web-inf/lib中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆