I have been working in XCode and with Objective-C in the last few years, but I knew that once I would have to transition to Eclipse or the like for Java projects. Case is, I do not particularly like Eclipse, which led me to a new development environment, namely IntellijIDEA. However, I am not at all familiar with how I should handle my files and how to add external libraries, nor do I know what my CLASSPATH is supposed to be. Where do I keep these external libraries in my project? I am also working with Maven and I am not quite sure why to use dependencies. If I include the .jar in my Classpath - or whereever I store my resources, classes etc. - why are there dependencies ? I have got one working project, but I am not comfortable releasing or using it while not exactly sure what I have done there. I understand how I can add external .jar files in IntelliJ, but where do I add these external libraries in my project ?
This is how I have done it up to now:
Let's say I have downloaded a Maven project and I would like to use it in some other project. I use mvn install
and then (in my Module Settings) I add the .jar from the target folder as an external library. Does IntelliJ keep a reference to that .jar file ? If that .jar is in my Downloads folder and I would like to transfer the project to a server, is this connection broken ?