2

Recently I came across with the term 'artifact' in related to maven build tool...

Can someone please explain what it's meant by 'artifact' in software industry and specifically in maven.

psaw.mora
  • 868
  • 1
  • 7
  • 18
  • Isn't that similar to http://stackoverflow.com/questions/2487485/what-is-maven-artifact ? It also includes an answer for "general software terms" artifact. – VonC Aug 21 '11 at 08:19

1 Answers1

1

Maven organizes it's build in projects.
An artifact in maven is a resource generated by a maven project. Each maven project can have exactly one artifact like a jar, war, ear, etc.
The project's configuration file "pom.xml" describes how the artifact is build, how unit tests are run, etc. Commonly a software project build with maven consists of many maven-projects that build artifacts (e.g. jars) that constitute the product.
E.g.

Root-Project   // produces no artifact, simply triggers the build of the other projects
  App-Project  // The application, that uses the libraries
  Lib1-Project // A project that creates a library (jar)
  Lib2-Project // Another library
  Doc-Project  // A project that generates the user documentation from some resources

Maven artifacts are not limited to java resources. You can generate whatever resource you need. E.g. documentation, project-site, zip-archives, native-libraries, etc.

Marc-Christian Schulze
  • 3,154
  • 3
  • 35
  • 45