Skip to main content

Components, Repositories, and Repository Formats

The Nexus platform, with Nexus Repository Pro, Nexus Repository OSS, and Nexus IQ Server is all about working with components and repositories.

Components

A component is a package of resources that your software application uses (e.g., a library or a framework). Some examples of components include the following:

  • Java byte code in class files

  • C object files

  • text files (e.g., properties files, XML files, JavaScript code, HTML, CSS

  • binary files such as images, PDF files, sound files

Components can come in numerous formats, including the following:

  • Java JAR, WAR, EAR formats

  • plain ZIP or .tar.gz files

  • other package formats such as NuGet packages, Ruby gems, NPM packages

  • executable formats, Android APK files, various installer formats

Components can be as complex as an entire application or as simple as a static resource; they can even comprise multiple nested components themselves along with assets. For example, a Java web application may be packaged as a WAR component containing multiple JAR components and a number of JavaScript libraries. These JARs and libraries are also standalone components in other contexts while also being included as part of the WAR component.

While we use the generic term "component" in Nexus Repository, components are also called artifacts, packages, bundles, archives, and other terms.

Each component is identified by a unique set of coordinates. For example, you may have heard of GAV (group, artifact, and version) coordinates for Maven; however, coordinate names and usage strategies vary between formats.

Assets

An asset is a single file associated with a component. Many formats have a one-to-one mapping for component to asset; however, more complex formats have numerous assets associated with a component. For example, a typical JAR component in a Maven repository is defined at least by the POM and the JAR files; each file as well as additional files (e.g., Javadoc, Sources JAR) is a separate asset belonging to the same component.

In the Docker format, assets have unique identifiers called Docker layers. You can reuse these assets can for different components (i.e., Docker images). As Docker can be complex, we cover it in depth in Components and Assets in Docker.

Components in Repositories

The open source community as well as proprietary vendors are continually creating new components. For example, there are libraries and frameworks written in various languages on different platforms that developers use for application development every day. Developers typically build applications for a specific domain by combining multiple components' features with their own custom components containing their application code.

To make consumption and usage easier, components are aggregated into collections called a repository; these are typically available on the internet as a service. Different platforms may use terms such as "registry" and others to refer to repositories.

Examples of repositories available on the internet as a service include the following:

Numerous tools like the following access components in these repositories:

  • package managers like npm, nuget, gem

  • build tools such as Maven, Gradle, rake, grunt

  • IDE’s such as Eclipse, IntelliJ, Visual Studio

Repository Formats

Different repositories use different technologies to store and expose the components in them to client tools. These technologies define a repository format that is closely related to the tools interacting with the repository.

For example, the Maven repository format relies on a specific directory structure defined by the components' identifiers and a number of XML-formatted files for metadata. Component interaction is performed via plain HTTP commands and some additional custom interaction with the XML files.

Other repository formats use databases for storage and REST API interactions or different directory structures with format-specific files for the metadata.