Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a Maven artifact?

Tags:

java

maven

build

What is an artifact and why does Maven need it?

like image 997
Maxim Veksler Avatar asked Mar 21 '10 14:03

Maxim Veksler


People also ask

What is an artifact in Java?

An artifact can be an archive file or a directory structure that includes the following structural elements: Compilation output for one or more of your modules. Libraries included in module dependencies. Collections of resources (web pages, images, descriptor files, and so on)

Where are Maven artifacts stored?

Maven's local repository is a directory on the local machine that stores all the project artifacts. When we execute a Maven build, Maven automatically downloads all the dependency jars into the local repository. Usually, this directory is named .

What is a build artifact?

Build artifacts are files produced by a build. Typically, these include distribution packages, WAR files, reports, log files, and so on. When creating a build configuration, you specify the paths to the artifacts of your build on the Configuring General Settings page.


1 Answers

An artifact is a file, usually a JAR, that gets deployed to a Maven repository.

A Maven build produces one or more artifacts, such as a compiled JAR and a "sources" JAR.

Each artifact has a group ID (usually a reversed domain name, like com.example.foo), an artifact ID (just a name), and a version string. The three together uniquely identify the artifact.

A project's dependencies are specified as artifacts.

like image 56
Stuart Sierra Avatar answered Sep 22 '22 15:09

Stuart Sierra