I'm just transitioning from .NET to JAVA and have to start JAVA project with Spring 3.0.0. and Hibernate.
Can someone please explain to me step_by_step how to download spring dependencies with Maven. I just spent whole day with absolutely no success.
PS. I have Java 1.5.06 and have already downloaded spring (with no dependencies) and installed Maven.
edit:
c0mrade:
I think as of spring 3.0.0. they are considered to be optional dependencies so they need to be included separately each dependency, this is just a guess I'm not sure about this, if Pascal or someone more experienced confirms my statement then its true, so far I've worked with spring 2.5.5
Yes... They are definitely optional so this is what I did. I simply copy/pasted hibernate dependencies from spring-orm pom file to myproject pom file, meaning that now I have spring and hibernate dependencies in my pom file defined together. Then I ran "mvn install" on myproject and after that just hand copied all spring and hibernate jars to my project's lib folder.
So now I have a Java project with spring and hibernate. :)
I'm learning Java and this is just my second day so so please tell me if I did something horribly wrong.
update:
rlovtang:
When using maven you don't manually download any dependencies (like spring), neither do you hand copy any jars to your projects lib folder. All this is taken care of automatically by maven when you run 'mvn install'. How do you package your application, is it war?
I understand that. And it's clear to me that Maven automatically manages classpath for dependencies in my local repository so my project can work normally on my local machine. And I also red that you have an option to pack your dependencies jars in your WAR or EAR, but what if I want to pack my application as JAR together with all dependencies JARs inside output (target) folder? You see, I don't want to deploy my JAR file with pom.xml only, but all the JARs that are needed for my application to run.