What is an artifact in Maven and why does Maven need it? - Maven Tutorial

In general software terms, an “artifact” is something produced by the software development process, whether it be software related documentation or an executable file.

That could be a .jar file, or a .war file, or a .zip file, or a .dll, or whatever have you.

I will give some more examples:

it could be use casesclass diagrams, and other Unified Modeling Language (UML) models, requirements and design documents.

But in maven, ARTIFACT is a JAR,(WAR or EAR), but it could be also something else. Each artifact has

1). a group ID (like com.your.package),2). an artifact ID (just a name), and3). a version string. 

The three together uniquely identify the artifact.

Q.Why Maven need Artifact?

Ans: Maven is used to make them available for your application

In Maven, the build process is arranged as a set of artifacts. Artifacts include:

1. The plugins that makeup Maven itself.2. Dependencies that your code depends on.3. Anything that your build produces that can, in turn, be consumed by something else.

Artifacts live in repositories.