Nuxeo Glossary

Artifact

Updated: November 7, 2024

(Maven) Artifact

In general software terms, an artifact is one of many kinds of tangible by-product produced during the development of software.

In Maven terminology, artifacts are specific results from build process. In Java, artifacts are mostly JAR files, but they can be anything else (ZIP, WAR, EAR, RAR, ...).

Maven artifacts are identified by a coordinate system of GroupId, ArtifactId, Version, Extension, (and optionally a Classifier) ensuring their unicity. Those coordinates are called the artifact's "GAV". There's no standardized URN for those coordinates but the form group:artifact:version:classifier:extension is pretty common. Note ant-assembly-maven-plugin uses the pattern <groupId>:<artifactId>[:<version>[:<type>[:<classifier>[:<scope>]]]]. Also, there are slight differences between "packaging", "type" and "extension" even if they are often equal: the "packaging" will determine the "extension", the "type" can be a "classifier" and/or an "extension", the "extension" is the artifact file extension.

Maven modules are identified by their directory name (usually equal to their artifact id) and/or their "primary" artifact (when there are multiple artifacts produced by a  module, one of them is set as the "primary" one, usually the POM artifact).

Maven manages the build ordering as a graph of dependencies between artifacts.

Artifacts are store locally in M2_REPO (usually ~/.m2/repository) when running mvn install. Artifacts are also stored remotely in online repositories when running mvn deploy. Remote artifacts can then be downloaded by Maven to avoid having to locally build or install them. Nuxeo uses Sonatype Nexus OSS for storing its artifacts: https://maven.nuxeo.org/.