user2617187 user2617187 - 5 months ago 63
Java Question

How to place folder/jar in Maven META-INF root

I am working on a implementation that requires UnlimitedJCEPolicyJDK8 for SAP hana cloud platform. The documentation tells me that i need to place it under the following structure:

WAR file:
- ext_security
- jre8

The problem is when i include the jars it goes to WEB-INF/classes and thats not where the server is looking. As seen in the picture.


Technical details:

tomcat 8: v3.2 runtime
JRE 1.8
Maven build: using webapp archatype
With facades to support servlets.
IDE: eclipse

Tried the following:

  1. add files using eclipse web deployment assembly (for what ever the reason it does not seems to work with maven and yes i use .m2 and WTP plugin)

  2. Adding files trough maven dependency and tried copy to output folder.

  3. i open WAR file moved files manually to correct folder and re-zipped and verified that if its in correct folder the update to server is working fine.

i really hope you can help me.

kind regards,

UPDATE: as requested by khmarbaise the pom file. And i created web-inf folder by myself in the hope it would be placed in root.

<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">
<name>edi.web Maven Webapp</name>



<!-- tried classpath but it did not seem to do annything
Below dependency is from local .m2 repository-->
<!-- goes in manifest classpath, but not included in WEB-INF/lib -->





Solution provided by pace:

create a source folder under the following name: src/main/webapp/META-INF


The maven-war-plugin's war goal has a configuration option webappDirectory. It defaults to src/main/webapp. Anything in there will be placed in the root of the war. So you could create a directory:


and drop in whatever files you want there. I don't much about the web tools plugin so not sure what approach would work there.