- [Narrator] When it comes to arguing the virtues
of Jenkins versus Maven,
there really isn't much to debate.
If someone asked me to choose between the two,
I'd put a ring on Mavens finger
and never regret terminating my relationship with Jenkins.
I really can't think of a build tool
that's done more to make software development easier for me
than Maven has.
I can run a single Archetype command,
and create a skeleton of a fully compliant JavaEE, Spring,
MicroProfile, or Android application.
Writing Maven plugin is easy,
because writing a Maven plugin is easy,
there's plugins for all sorts of software quality tools
and different plugins for Maven,
Maven's Java-based, Maven's easy to install,
Maven's easy to configure,
Maven doesn't require a server engine in order to run,
and most importantly,
Maven solves the dependency management problem.
Now that's not to say Jenkins doesn't have its advantages.
With Jenkins you can create modular jobs
that can compile, modular jobs that can task,
modular jobs that can package applications,
even modular jobs that can deploy applications.
But if you actually look under the covers,
and look at what Jenkins doing,
it's actually just delegating to Apache Maven.
So it calls on Apache Maven to do the compile,
it calls it to do the test,
it calls them that to do the package,
and it calls on it to do the deployment.
And for that matter, where does the deployment happen?
Well, half the time it's a Java library
that gets pushed to a Maven repository.
So you're looking at JFrog, or you're looking at Nexus,
but the actual work that Jenkins is doing
for not actually deploying to a container,
but probably deploying to a Maven repository.
Now that's not to say that Maven is perfect.
So with Maven, the external programming tool is XML.
And personally, I would rather spend
an afternoon filing expense reports, than fighting over XML.
One of the places that Jenkins steps up to the game is
that Jenkins has an incredible programming environment.
So with Jenkins, you can create jobs
that call command line code in a windows batch environment,
you can use the Bash Shell Script,
you can even use programming languages.
You can call it Java program,
but more often than what people are calling Groovy scripts.
And taking advantage of the Java virtual machine,
but the great scripting environment
that great Olin Groovy provides.
The whole argument
of Apache versus Jenkins is actually a bit of a species one.
And the reason for that is there's actually not a lot
of intersectionality between the two.
If you were to ask me which one do I think is better,
and which ones had a bigger impact on my life
as a Java developer, Apache Maven wins every single time.
But Apache Maven and Jenkins are actually competing
in the same space.
With Jenkins, you can actually create little jobs.
You can tie those little jobs together,
you can create pipelines,
and Daisy chain individual jobs together,
and create a continuous integration pipeline,
and a continuous deployment pipeline,
in a way that you can't with Maven.
And with Maven, that was never even the intention.
So Maven is a great built tool.
Jenkins is a great continuous integration tool.
And when you bring them both together,
you get the best of both worlds.
And getting the best of both worlds is doing something like,
using the Maven plugin for Jenkins.
So the two aren't meant to compete,
the two are meant to work together.
So with Maven, you get incredible build capabilities.
You get an incredible capabilities to call
on external programs like Jacoco or Checkbox.
With Jenkins, you can create modular jobs,
Daisy chain them together into a pipeline.
And Jenkins also has a very creative
and very extensive plugin community as well.
So you can also use Jenkins to plug
into third party tools like Git, and SonarQube,
and Subversion and the like.
And then you do all this together,
and you create a nice little pipeline.
And then the pipeline can run,
if there's a problem it short circuit,
if there's no problems it goes all the way
and can potentially even push your code
to that Maven repository, or even
into a Docker based microservices production environment.
And so the thing is, yes there's Maven, yes there's Jenkins.
They are two very important DevOps tools,
but they're complimentary.
And if you really wanna get it right,
you use them together.
You don't contrast them in this one versus
that one type of discussion.