Issue
What is the difference between Maven and Jenkins?
Both support automated builds and automated execution of JUnits.
If so, are they complimentary, or mutually exclusive? When should onebe used over the other?
Solution
Maven is building tool/environment. Jenkins is a CI (continuous integration) tool.
Maven is more like a replacement for Ant.
- It assists building of the project through plugins e.g build and version control, JUnit tests, etc...
- It manages dependencies of your project. you define how a project should be built(plugins), and what libraries are needed (dependencies) in a pom.xml file.
Jenkins as a smart job scheduler, can not assists you with tasks like version control or JUnit test, however it can indirectly assists you with all this, by making calls to the pom.xml file in your project. And Jenkins gives you the power to decide when to call the pom.xml file, based on what condition to call, and what you want to do with the outcome. and Jenkins can listen to different events, e.g svn commit, current time is midnight etc..
This is a powerful idea. For example, you can ask Jenkins to trigger a build or run through all JUnit tests whenever a new code is committed and then, if the unit tests are passed, deploy on a target machine. or schedule heavy tasks at midnight e.g unit tests.This is the basic idea of auto deployment or AKA continuous integration. CI for short if you like.
Answered By - Junchen Liu
Answer Checked By - Terry (JavaFixing Volunteer)