Working with Java multi-project builds
In a Java project, we usually have compile or runtime dependencies between projects. For example, the output of one project is a compile dependency for another project. This is very common in Java projects. Let's create a Java project with a common
project that contains a Java class used by other projects. We will add a services
project that references the class in the common
project. Finally, we will add a web
project with a Java servlet class that uses classes from the services
project.
We have the following directory structure for our project:
. ├── build.gradle ├── common │ └── src │ └── main │ └── java │ └── sample │ └── gradle │ └── util │ └── Logger.java ├── services │ └── sample │ └── src │ ├── main │ │ └── java │ │ └── sample │ │ └── gradle │ │ ├── api │ ...