aBhijit
aBhijit

Reputation: 5391

Add external folder to war file in maven project while building the project

I have independent folders for 'server' and 'client' of my Java Maven Web Application.

My 'client folder will be located somewhere on my system say "C:/xampp/htdocs/client".

While building war file of 'server', can I add this 'client' folder or contents of this folder to my WEB-INF or some other location inside the war file?

Upvotes: 1

Views: 5759

Answers (2)

Stephen Dillon
Stephen Dillon

Reputation: 795

In your web pom include the folder as a maven resource

<build>
 ...
 <resources>
  <resource>
    <directory>C:/xampp/htdocs/client</directory>
  </resource>
  ...
 </resources>
...

Upvotes: 2

user2173738
user2173738

Reputation:

When build the war file include the 'client' folder to the resources. Then file will be archived when building your war file. Another approach is to make a symlink to the WEB-INF or some other location inside the WebContent folder.

Upvotes: 0

Related Questions