I need an example pom file to create a jar file for my spring project. how to specify to create a directory and folder for resources while creating jar file. I can able to create jar file using the pom. But i need to include my applicationContext.xml in my jar file.
how to do it in maven?
how to do this is explained here
the post details this pom, it uses the maven-jar-plugin to do it and I have written many poms in a previous job that look almost identical to this. Hope this helps
Maven uses convention over configuration, and consequently all standard Maven projects have the same folder structure. Since the application context file is a resource you should put it int the
src/main/resources
folder (or one of its sub-folders).http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 com.tridenthyundai.ains tridenthyundai war 1.0-SNAPSHOT Trident Hyundai Maven Webapp http://maven.apache.org