0

So I am almost programming for 3 years I guess, just for fun. I learned to program in Java and I still do. I was always used to let Eclipse build my code by clicking 'Run' and I don't really get why things like Maven, Ant and Gradle are used.

Now I am also using GitHub for some projects, and I see these build tools being intergrated in GitHub repos a lot, with platforms like Jenkins, Travis etc. I think they use these build tools along GitHub, to like build the code every time there is a commit, right?

So my questions are, why should I use build-tools? Which build tool do you recommend? And how do I use that build tool with GitHub?

(Please say if I need to clarify my questions more)

1 Answers1

1

One of the features that Maven and Gradle give you is automatic dependency management - for example, if your program needs a specific library, you can specify that in your Maven pom.xml and when you build the project using Maven, it will automatically download the appropriate version of that library, and also the libraries that the library itself depends on, from the Internet. That is much easier than finding all the right versions of the JAR files by hand and making sure you put them in your project.

Also, not everybody uses Eclipse, so you don't want your project to be dependent on one particular IDE. Most Java IDEs understand Maven and Gradle build files so that you can import your Maven or Gradle project into your IDE of choice.

Jesper
  • 202,709
  • 46
  • 318
  • 350