Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

maven-2

war

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.

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

like image 303
David Avatar asked Dec 02 '22 05:12

David


1 Answers

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> 
like image 95
Starkey Avatar answered Dec 09 '22 20:12

Starkey