Course – Black Friday 2025 – NPI EA (cat= Baeldung)
announcement - icon

Yes, we're now running our Black Friday Sale. All Access and Pro are 33% off until 2nd December, 2025:

>> EXPLORE ACCESS NOW

Partner – Orkes – NPI EA (cat=Spring)
announcement - icon

Modern software architecture is often broken. Slow delivery leads to missed opportunities, innovation is stalled due to architectural complexities, and engineering resources are exceedingly expensive.

Orkes is the leading workflow orchestration platform built to enable teams to transform the way they develop, connect, and deploy applications, microservices, AI agents, and more.

With Orkes Conductor managed through Orkes Cloud, developers can focus on building mission critical applications without worrying about infrastructure maintenance to meet goals and, simply put, taking new products live faster and reducing total cost of ownership.

Try a 14-Day Free Trial of Orkes Conductor today.

Partner – Orkes – NPI EA (tag=Microservices)
announcement - icon

Modern software architecture is often broken. Slow delivery leads to missed opportunities, innovation is stalled due to architectural complexities, and engineering resources are exceedingly expensive.

Orkes is the leading workflow orchestration platform built to enable teams to transform the way they develop, connect, and deploy applications, microservices, AI agents, and more.

With Orkes Conductor managed through Orkes Cloud, developers can focus on building mission critical applications without worrying about infrastructure maintenance to meet goals and, simply put, taking new products live faster and reducing total cost of ownership.

Try a 14-Day Free Trial of Orkes Conductor today.

eBook – Guide Spring Cloud – NPI EA (cat=Spring Cloud)
announcement - icon

Let's get started with a Microservice Architecture with Spring Cloud:

>> Join Pro and download the eBook

eBook – Mockito – NPI EA (tag = Mockito)
announcement - icon

Mocking is an essential part of unit testing, and the Mockito library makes it easy to write clean and intuitive unit tests for your Java code.

Get started with mocking and improve your application tests using our Mockito guide:

Download the eBook

eBook – Reactive – NPI EA (cat=Reactive)
announcement - icon

Spring 5 added support for reactive programming with the Spring WebFlux module, which has been improved upon ever since. Get started with the Reactor project basics and reactive programming in Spring Boot:

>> Join Pro and download the eBook

eBook – Java Streams – NPI EA (cat=Java Streams)
announcement - icon

Since its introduction in Java 8, the Stream API has become a staple of Java development. The basic operations like iterating, filtering, mapping sequences of elements are deceptively simple to use.

But these can also be overused and fall into some common pitfalls.

To get a better understanding on how Streams work and how to combine them with other language features, check out our guide to Java Streams:

>> Join Pro and download the eBook

eBook – Jackson – NPI EA (cat=Jackson)
announcement - icon

Do JSON right with Jackson

Download the E-book

eBook – HTTP Client – NPI EA (cat=Http Client-Side)
announcement - icon

Get the most out of the Apache HTTP Client

Download the E-book

eBook – Maven – NPI EA (cat = Maven)
announcement - icon

Get Started with Apache Maven:

Download the E-book

eBook – Persistence – NPI EA (cat=Persistence)
announcement - icon

Working on getting your persistence layer right with Spring?

Explore the eBook

eBook – RwS – NPI EA (cat=Spring MVC)
announcement - icon

Building a REST API with Spring?

Download the E-book

Course – LS – NPI EA (cat=Jackson)
announcement - icon

Get started with Spring and Spring Boot, through the Learn Spring course:

>> LEARN SPRING
Course – RWSB – NPI EA (cat=REST)
announcement - icon

Explore Spring Boot 3 and Spring 6 in-depth through building a full REST API with the framework:

>> The New “REST With Spring Boot”

Course – LSS – NPI EA (cat=Spring Security)
announcement - icon

Yes, Spring Security can be complex, from the more advanced functionality within the Core to the deep OAuth support in the framework.

I built the security material as two full courses - Core and OAuth, to get practical with these more complex scenarios. We explore when and how to use each feature and code through it on the backing project.

You can explore the course here:

>> Learn Spring Security

Partner – Orkes – NPI EA (cat=Java)
announcement - icon

Modern software architecture is often broken. Slow delivery leads to missed opportunities, innovation is stalled due to architectural complexities, and engineering resources are exceedingly expensive.

Orkes is the leading workflow orchestration platform built to enable teams to transform the way they develop, connect, and deploy applications, microservices, AI agents, and more.

With Orkes Conductor managed through Orkes Cloud, developers can focus on building mission critical applications without worrying about infrastructure maintenance to meet goals and, simply put, taking new products live faster and reducing total cost of ownership.

Try a 14-Day Free Trial of Orkes Conductor today.

Course – LSD – NPI EA (tag=Spring Data JPA)
announcement - icon

Spring Data JPA is a great way to handle the complexity of JPA with the powerful simplicity of Spring Boot.

Get started with Spring Data JPA through the guided reference course:

>> CHECK OUT THE COURSE

Partner – Moderne – NPI EA (cat=Spring Boot)
announcement - icon

Refactor Java code safely — and automatically — with OpenRewrite.

Refactoring big codebases by hand is slow, risky, and easy to put off. That’s where OpenRewrite comes in. The open-source framework for large-scale, automated code transformations helps teams modernize safely and consistently.

Each month, the creators and maintainers of OpenRewrite at Moderne run live, hands-on training sessions — one for newcomers and one for experienced users. You’ll see how recipes work, how to apply them across projects, and how to modernize code with confidence.

Join the next session, bring your questions, and learn how to automate the kind of work that usually eats your sprint time.

Course – Black Friday 2025 – NPI (cat=Baeldung)
announcement - icon

Yes, we're now running our Black Friday Sale. All Access and Pro are 33% off until 2nd December, 2025:

>> EXPLORE ACCESS NOW

1. Overview

Manually building a complex project is quite cumbersome. There are much easier ways to do this using build tools.  As we know, one of the main build tools for Java projects is Maven. Maven helps standardize the build and deployment of applications.

In this tutorial, we’ll discuss what a Maven artifact is and what its key elements are. We’ll also look at Maven coordinates, dependency management, and finally, Maven repositories.

2. What Is Maven?

We can use Maven to build and manage any Java-based project. It provides many functionalities such as:

  • building and compiling
  • documentation and report
  • dependency management
  • source management
  • project update
  • deployment

Each Maven project has its own POM file. We can configure Maven to build either one project or multiple projects.

A multi-project typically defines a POM file in the root directory and lists the individual projects in a modules section. In short, a Maven build produces one or more artifacts.

3. What Is a Maven Artifact?

An artifact is an element that a project can either use or produce. In Maven terminology, an artifact is an output generated after a Maven project build. It can be, for example, a jar, war, or any other executable file.

Also, Maven artifacts include five key elements, groupId, artifactId, version, packaging, and classifier. Those are the elements we use to identify the artifact and are known as Maven coordinates.

4. Maven Coordinates

Maven coordinate is a combination of the values for the groupId, artifactId, and version for a given artifact. Furthermore, Maven uses coordinates to find any component matching the values for groupId, artifactId, and version.

Among the coordinate elements, we must define the groupId, artifactId, and version. The packaging element is optional, and we can’t directly define the classifier.

For instance, the pom.xml configuration file below shows an example of Maven coordinates:

<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.baeldung</groupId>
    <artifactId>org.baeldung.java</artifactId>
    <packaging>jar</packaging>
    <version>1.0.0-SNAPSHOT</version>
    <name>org.baeldung.java</name>
    <url>http://maven.apache.org</url>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.1.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>

Let’s look in detail at each of the Maven coordinates.

4.1. The groupId Element

The groupId element is the identifier of the group at the origin of the project. This key makes it easier and quicker to organize and find the project.

Also, a groupId follows the same naming rules as Java packages, and we generally choose as groupId the name of the top package of the project.

For instance, a groupId of org.apache.commons corresponds to ${repository_home}/org/apache/commons.

4.2. The artifactId Element

The artifactId element is the identifier of the project within the group. It is used by default to construct the artifact’s final name. Therefore, this name has some specifications as it should ideally be small in length. The best practice for naming an artifactId is to use the actual project name as a prefix. The advantage of this is that it makes it easier to find the artifacts.

Like the groupId, the artifactId manifests itself as a sub-directory under the directory tree that represents the groupId.

For example, an artifactId of commons-lang3 under a groupId of org.apache.commons, would determine that the artifact is under : ${repository_home}/org/apache/commons/commons-lang3/.

4.3. The version Element

The version is used as part of an artifact’s identifier. It defines the current version of the Maven project. We should note that Maven defines a set of version specifications, as well as the concept of releases and snapshots, that we will cover later.

A version is represented as a subdirectory in the directory tree, which is formed by the groupId and the artifactId.

For instance, a version of 3.1.1 for an artifactId commons-lang3 under the groupId of org.apache.commons would determine that the artifact is located under: ${repository_home}/org/apache/commons/commons-lang3/3.1.1/.

4.4. The packaging Element

This element is used to specify the type of artifact generated by the project. The packaging can be anything that describes any binary software format, including ZIP, EAR, WAR, SWC, NAR, SWF, SAR.

Also, the packaging defines the different goals to execute during the project’s default lifecycle. For instance, the package phase executes the jar:jar goal for a jar-type artifact and the war:war goal for a war-type artifact.

4.5. The classifier Element

We usually use a classifier for technical reasons when delivering the same code but as several separate artifacts.

For example, if we want to build two artifacts of a JAR with different Java compilers, we can do it easily using the classifier as it allows the production of two different artifacts with the same combination for groupId:artifactId:version.

Also, we can use classifiers when packaging source code, an artifact’s JavaDoc, or assembling binaries.

For our above example of commons-lang3, the artifact to look for is: commons-lang3-3.10-javadoc.jar or commons-lang3-3.10-sources.jar, under ${repository_home}/org/apache/commons/commons-lang3/3.1.0/.

5. Release vs. Snapshot Artifacts

Now, let’s see the differences between a snapshot artifact and a release artifact.

5.1. Release Artifacts

A release artifact indicates that the version is stable and can be used outside development processes like integration tests, customer qualification, pre-production, etc.

Also, a release artifact is unique. Running the mvn deploy command will deploy our project to the repository. But, subsequent execution of the same command on the same project with the same version will result in a failure.

5.2. Snapshot Artifacts

A snapshot artifact indicates that the project is under development. When we install or publish a component, Maven checks the version attribute. If it contains the string “SNAPSHOT”, Maven converts this key into a date and time value in UTC (Coordinated Universal Time) format.

For example, if our project is in version 1.0-SNAPSHOT and we deploy its artifacts on a Maven repository, Maven converts this version to “1.0-202202019-230800”, assuming we deploy on February 19, 2022, at 23:08 UTC.

In other words, when we deploy a snapshot, we are not delivering a software component, but we only deliver a snapshot of it.

6. Dependency Management

Dependency management is essential in the Maven world. For instance, when a project depends on other classes in its operating process (compilation, execution), it becomes necessary to identify and import these dependencies from the remote repositories to the local repository. Therefore, the project will have dependencies on these libraries, which will ultimately be added to the classpath of the project.

Furthermore, Maven’s dependency management is based on several concepts:

  • repositories: essential to store artifacts
  • scope: allows us to specify in which context we use a dependency
  • transitivity: allows us to manage the dependencies of dependencies
  • inheritance: POMs inheriting from the parent can set their dependency by providing only the dependency’s groupId and artifactId without the version attribute. Maven gets the appropriate version from the parent POM file.

With Maven, dependency management is done through the pom.xml. For instance, a dependency declaration in the Maven projects looks like this:

<dependencies>
    <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>3.8.4</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>5.3.15</version>
    </dependency>
</dependencies>

7. Maven Repository

Maven uses a repository to store elements like dependencies and plugins required to build projects. This makes it possible to centralize these elements, which are generally used in several projects.

As we mentioned earlier, repositories store artifacts using a set of coordinates: groupId, artifactId, version, and packaging. Furthermore, Maven uses a particular directory structure to organize the contents of a repository and allow it to find the required elements: ${repository_home}/groupId/artifactId/version.

For instance, let’s consider this POM configuration.

<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.baeldung</groupId>
    <artifactId>myApp</artifactId>
    <version>1.0.0</version>
</project>

With the above configuration, our project will be stored in a repository in the ${repository_home}/com/baeldung/myApp/1.0.0/ path.

8. Conclusion

In this article, we discussed the concept of Maven artifacts and their coordinates system. Also, we learned related concepts such as dependencies and repositories.

Course – Black Friday 2025 – NPI EA (cat= Baeldung)
announcement - icon

Yes, we're now running our Black Friday Sale. All Access and Pro are 33% off until 2nd December, 2025:

>> EXPLORE ACCESS NOW

Partner – Orkes – NPI EA (cat = Spring)
announcement - icon

Modern software architecture is often broken. Slow delivery leads to missed opportunities, innovation is stalled due to architectural complexities, and engineering resources are exceedingly expensive.

Orkes is the leading workflow orchestration platform built to enable teams to transform the way they develop, connect, and deploy applications, microservices, AI agents, and more.

With Orkes Conductor managed through Orkes Cloud, developers can focus on building mission critical applications without worrying about infrastructure maintenance to meet goals and, simply put, taking new products live faster and reducing total cost of ownership.

Try a 14-Day Free Trial of Orkes Conductor today.

Partner – Orkes – NPI EA (tag = Microservices)
announcement - icon

Modern software architecture is often broken. Slow delivery leads to missed opportunities, innovation is stalled due to architectural complexities, and engineering resources are exceedingly expensive.

Orkes is the leading workflow orchestration platform built to enable teams to transform the way they develop, connect, and deploy applications, microservices, AI agents, and more.

With Orkes Conductor managed through Orkes Cloud, developers can focus on building mission critical applications without worrying about infrastructure maintenance to meet goals and, simply put, taking new products live faster and reducing total cost of ownership.

Try a 14-Day Free Trial of Orkes Conductor today.

eBook – HTTP Client – NPI EA (cat=HTTP Client-Side)
announcement - icon

The Apache HTTP Client is a very robust library, suitable for both simple and advanced use cases when testing HTTP endpoints. Check out our guide covering basic request and response handling, as well as security, cookies, timeouts, and more:

>> Download the eBook

eBook – Java Concurrency – NPI EA (cat=Java Concurrency)
announcement - icon

Handling concurrency in an application can be a tricky process with many potential pitfalls. A solid grasp of the fundamentals will go a long way to help minimize these issues.

Get started with understanding multi-threaded applications with our Java Concurrency guide:

>> Download the eBook

eBook – Java Streams – NPI EA (cat=Java Streams)
announcement - icon

Since its introduction in Java 8, the Stream API has become a staple of Java development. The basic operations like iterating, filtering, mapping sequences of elements are deceptively simple to use.

But these can also be overused and fall into some common pitfalls.

To get a better understanding on how Streams work and how to combine them with other language features, check out our guide to Java Streams:

>> Join Pro and download the eBook

eBook – Persistence – NPI EA (cat=Persistence)
announcement - icon

Working on getting your persistence layer right with Spring?

Explore the eBook

Course – LS – NPI EA (cat=REST)

announcement - icon

Get started with Spring Boot and with core Spring, through the Learn Spring course:

>> CHECK OUT THE COURSE

Partner – Moderne – NPI EA (tag=Refactoring)
announcement - icon

Modern Java teams move fast — but codebases don’t always keep up. Frameworks change, dependencies drift, and tech debt builds until it starts to drag on delivery. OpenRewrite was built to fix that: an open-source refactoring engine that automates repetitive code changes while keeping developer intent intact.

The monthly training series, led by the creators and maintainers of OpenRewrite at Moderne, walks through real-world migrations and modernization patterns. Whether you’re new to recipes or ready to write your own, you’ll learn practical ways to refactor safely and at scale.

If you’ve ever wished refactoring felt as natural — and as fast — as writing code, this is a good place to start.

Course – Black Friday 2025 – NPI (All)
announcement - icon

Yes, we're now running our Black Friday Sale. All Access and Pro are 33% off until 2nd December, 2025:

>> EXPLORE ACCESS NOW

eBook Jackson – NPI EA – 3 (cat = Jackson)