开发者

how to ask maven war plugin to copy particular jar file into warfile/web-inf/lib

开发者 https://www.devze.com 2023-01-13 01:24 出处:网络
I have a simple.jar file that stay in c:/JAR. When i used maven war plugin to create a war file, it w开发者_运维技巧ill copy all the dependencies into lib folder.

I have a simple.jar file that stay in c:/JAR. When i used maven war plugin to create a war file, it w开发者_运维技巧ill copy all the dependencies into lib folder.

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


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> 
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号