https://github.com/r8vnhill/echo-app-maven
✨ A modular Java project built with Maven to accompany two [DIBS](https://dibs.pages.dev) lessons: from basic project setup to multi-module architecture with shared logic.
https://github.com/r8vnhill/echo-app-maven
build-system dibs-course echo-app educational java maven modular-architecture multi-module software-libraries
Last synced: about 1 month ago
JSON representation
✨ A modular Java project built with Maven to accompany two [DIBS](https://dibs.pages.dev) lessons: from basic project setup to multi-module architecture with shared logic.
- Host: GitHub
- URL: https://github.com/r8vnhill/echo-app-maven
- Owner: r8vnhill
- License: bsd-2-clause
- Created: 2025-03-19T20:22:06.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-06T21:55:46.000Z (about 1 year ago)
- Last Synced: 2025-06-30T06:07:42.776Z (11 months ago)
- Topics: build-system, dibs-course, echo-app, educational, java, maven, modular-architecture, multi-module, software-libraries
- Language: Java
- Homepage: https://dibs.pages.dev
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# echo-app-maven
This repository contains the source code for a modular Java project built with [Apache Maven](https://maven.apache.org/). It is designed to accompany **two lessons** from the [DIBS course](https://dibs.pages.dev), which walk you through the process of creating and scaling a Maven-based Java project.
> ✍️ While both lessons are written in Spanish, the code in this repository is fully in **English** to ensure accessibility for a broader audience.
## 📚 Companion Lessons
- [✅ Creating a Basic Maven Project](https://dibs.pages.dev/docs/build-systems/init/maven/)
Learn how to generate a simple Maven project using the `quickstart` archetype, define its metadata (`groupId`, `artifactId`, etc.), understand the default folder structure, and run your first Java app.
- [🏗️ Modular Architecture with Maven and Java](https://dibs.pages.dev/docs/build-systems/modular-design/maven.mdx/)
Take your project to the next level by transforming it into a multi-module setup with reusable components. You'll learn to separate responsibilities using a `lib` module and an `app` module, structure your POM files accordingly, and compile and run modular apps from the command line.
## 🧱 Project Structure
This is a **multi-module Maven project** with two main modules:
- **`lib`**: A library module that contains a simple utility method.
- **`app`**: The main application that consumes the utility from `lib`.
```
echo-app-maven/
├── pom.xml # Root POM (parent)
├── lib/
│ ├── pom.xml # Library module
│ └── src/main/java/com/github/username/echo/EchoUtils.java
├── app/
│ ├── pom.xml # Application module
│ └── src/main/java/com/github/username/App.java
```
## 🚀 Build & Run
### Prerequisites
- Java 8 or higher
- Apache Maven 3.6 or later
### Commands
**Linux/macOS**
```bash
mvn clean install && \
mvn -pl app exec:java \
-Dexec.mainClass=com.github.username.App \
-Dexec.args="Ryugamine Celty Shizuo"
```
**Windows (PowerShell)**
```powershell
mvn clean install && `
mvn -pl app 'exec:java' `
'-Dexec.mainClass=com.github.username.App' `
'-Dexec.args=Ryugamine Celty Shizuo'
```
## 💬 Output Example
After a successful build, the output should include a lot of Maven logs followed by:
```
Ryugamine
Celty
Shizuo
```
## 🎓 Topics Covered
This repository demonstrates:
- Generating a basic Maven project using an archetype.
- Understanding project metadata: `groupId`, `artifactId`, `version`, and `package`.
- Creating a multi-module architecture with shared configuration.
- Reusing logic across modules using Maven dependencies.
- Running Java programs via `exec-maven-plugin`.
## ⚖️ License
This project is licensed under the [BSD-2-Clause License](LICENSE). Feel free to use, modify, and distribute it as per the terms of the license.