In the previous chapters, we learned how to define and use dependencies in our projects. However, the code we write in our projects can also be a dependency for another project. In order for another project to use our code as a dependency, we should publish our code as a dependency artifact so that it can be used by other projects.
In this chapter, you will learn how you can define artifacts in your project. These artifacts need to be published for others to use them. We first publish them using a filesystem, so the artifacts can be used from the same computer or even if we use a network share on an intranet. In later chapters, we will see how to publish our artifacts to a Maven repository, an Ivy repository, and Bintray.