[Maven] Plugin vs. Dependencies
I've been working on Maven Project these days and I was wondering what's the difference between Plugings and Dependencies. I guess you guys might had the same questions about it when you see POM which means Project Obeject Model.
First, what is POM file? and what does this file do? POM is defined like below by Apache foundation website.
POM is an XML(Extensible Markup Language) file that countails information about the project and configuration details used by Maven to build the project.
>>Check the link below to see more description about POM.
https://maven.apache.org/guides/introduction/introduction-to-the-pom.html
Maven – Introduction to the POM
A Project Object Model or POM is the fundamental unit of work in Maven. It is an XML file that contains information about the project and configuration details used by Maven to build the project. It contains default values for most projects. Examples for t
maven.apache.org
So in this POM file there are lots of dependencies and plugins.
I've searched the diffrence between them and I found one answer in Stack over flow.
He/She said...
Both are Jar files. But most of work is done using plugins (You could see Maven compiler plugin) and dependency is just a Jar file which will be added to the classpath while executing the tastks.
Plugin is a Jar file which executes the task, and dependency is a Jar which provides the class files to execute the task.
Hope this could be the answer what you've been looking for!