- Java 9 Programming By Example
- Peter Verhas
- 177字
- 2021-07-02 23:37:37
Project structure and build tools
The project this time will contain many modules. We will still use Maven in this chapter. We will set up a so-called multi-module project in Maven. In such a project, the directory contains the directories of the modules and pom.xml. There is no source code in this top-level directory. The pom.xml file in this directory serves the following two purposes:
- It references the modules and can be used to compile, install, and deploy all the modules together
- It defines parameters for the modules that are the same for all of them
Every pom.xml has a parent and this pom.xml is the parent of the pom.xml files in the module directories. To define the modules, the pom.xml file contains the following lines:
<project>
...
<modules>
<module>SortInterface</module>
<module>bubble</module>
<module>quick</module>
</modules>
</project>
These are the names of the modules. These names are used as directory names and also as artifactId in the pom.xml module. The directories in this setup look as follows:
$ tree
|-SortInterface
|---src/main/java/packt/java9/by/example/ch03
|-bubble
|---src
|-----main/java/packt/java9/by/example/ch03/bubble
|-----test/java/packt/java9/by/example/ch03/bubble
|-quick/src/
|-----main/java
|-----test/java
推薦閱讀
- Extending Jenkins
- FuelPHP Application Development Blueprints
- Visual Basic程序設(shè)計(jì)教程
- Bootstrap Essentials
- Linux命令行與shell腳本編程大全(第4版)
- 深入淺出PostgreSQL
- Python算法詳解
- Swift 4從零到精通iOS開發(fā)
- Spring技術(shù)內(nèi)幕:深入解析Spring架構(gòu)與設(shè)計(jì)原理(第2版)
- Extending Unity with Editor Scripting
- QlikView Unlocked
- Unity 2017 Game AI Programming(Third Edition)
- 黑莓(BlackBerry)開發(fā)從入門到精通
- Wearable:Tech Projects with the Raspberry Pi Zero
- HTML5 Game Development by Example:Beginner's Guide(Second Edition)