This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Hi, I use the Maven to build my web services project that uses the Spring framework.
It took me quite a while to sort out all the dependencies (such as the Spring framework, logging framework, etc.) in the "pom.xml" file and my very simple test project is up and running.
I have to do the real task now.
My real project Java classes have lots of import statements such as
And I have the JAR files for those packages. My question is where I should put those JARs? My project has the standard directory structure as show below. The proper places I can think of are either the "resources" folder or the "lib" folder. I am probably not on the right track. Please advise. Thank you.
The maven pom file determines where to put the jars. Maven can build a war file, ear file or just a jar file. In the dependency tag, there is <scope> and the default scope will be to include it in your archive. If you use <scope>provided</scope> then the dependency will not be included in your archive. It is all a build issue.