This application, while conceptually fairly simple, is a bit more complex than what we looked at in the last chapter, in that we will have both, a command line and a graphical interface. The experienced programmer is likely to immediately see the need to share the code between these two interfaces, as DRY (Don't Repeat Yourself) is one of the many hallmarks of a well-designed system. To facilitate this sharing of code, then, we will want to introduce a third module, which provides a library that can be consumed by the other two projects. We will call these modules lib, cli, and gui. Our first step in setting up the project is to create the various Maven POM files to describe the project's structure. The parent POM will look something like this:
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven...