Maven Project Configuration
The project uses Maven as its build tool with Java 21 as the target platform.Project Coordinates
com.mycompanyRefactorizacion-ALFA1.0-SNAPSHOT4.0.0Java Configuration
Compiler Settings
The project is configured to use Java 21 for both source and target compatibility:Java source version for compilation
Java target version for bytecode generation
Character encoding for source files
Dependencies
Runtime Dependencies
SQLite JDBC Driver
SQLite JDBC Driver
Artifact: Usage: Database operations in
org.xerial:sqlite-jdbcVersion: 3.41.2.1Purpose: Provides JDBC connectivity to SQLite databasesInventarioDAOJCalendar
JCalendar
Artifact: Usage: Date picker widgets in view dialogs
com.toedter:jcalendarVersion: 1.4Purpose: Provides JDateChooser component for date selection in Swing UITest Dependencies
JUnit Jupiter
JUnit Jupiter
Artifact: Usage: Writing and running unit tests
org.junit.jupiter:junit-jupiterVersion: 5.10.0Scope: testPurpose: Unit testing framework for JUnit 5Build Plugins
Maven Compiler Plugin
Compiles Java source code to bytecode.org.apache.maven.pluginsmaven-compiler-plugin3.13.0The compiler plugin explicitly sets Java 21 as both source and target version, ensuring compatibility.
Maven JAR Plugin
Creates a standard JAR file with manifest configuration.org.apache.maven.pluginsmaven-jar-plugin3.2.2InventarioApp
This plugin creates a standard JAR that requires external dependencies to be in the classpath.
Maven Shade Plugin
Creates an executable “fat JAR” with all dependencies bundled.org.apache.maven.pluginsmaven-shade-plugin3.3.0- Bundles all dependencies into a single JAR
- Creates an executable JAR with proper manifest
- Generates a dependency-reduced POM
- Runs during the
packagephase
The shade plugin creates
Refactorizacion-ALFA-1.0-SNAPSHOT.jar with all dependencies included, making deployment easier.Database Configuration
Connection URL
The database connection is configured inInventarioDAO constructor:
Directory for database file storage (relative to application location)
JDBC connection URL in format:
jdbc:sqlite:./db/baseDeDatosInventario.dbConnection Properties
| Property | Value | Description |
|---|---|---|
| Driver Class | org.sqlite.JDBC | SQLite JDBC driver |
| Database File | baseDeDatosInventario.db | SQLite database filename |
| Auto-commit | true (default) | Automatically commit transactions |
| Connection Reuse | Yes | Single connection instance reused |
Custom Database Location
To specify a custom database location, pass a JDBC URL to the DAO constructor:Build Commands
Compile the Project
target/classes/.
Run Tests
src/test/java/.
Package Application
target/:
- Standard JAR:
Refactorizacion-ALFA-1.0-SNAPSHOT.jar - Fat JAR:
Refactorizacion-ALFA-1.0-SNAPSHOT-shaded.jar(with dependencies)
Clean Build
target/ directory and rebuilds from scratch.
Run Application
From Maven
From JAR (requires dependencies in classpath)
From Fat JAR (self-contained)
Project Structure
Environment Requirements
Java 21 or higher required to run the application
Maven 3.x required for building from source
Cross-platform (Windows, macOS, Linux) - uses SQLite and Java Swing
Graphical display required (X11, Windows Display, macOS window manager)
Dependency Tree
The application has minimal external dependencies, making it lightweight and easy to deploy.
IDE Configuration
IntelliJ IDEA
- Open the project as a Maven project
- Ensure Java 21 SDK is configured
- Maven will auto-import dependencies
- Run configuration: Main class =
InventarioApp
Eclipse
- Import as “Existing Maven Project”
- Configure Java 21 JDK in project properties
- Update Maven project to resolve dependencies
- Run as Java Application with
InventarioAppas main class
VS Code
- Open folder with Java and Maven extensions installed
- Extensions will detect
pom.xml - Select Java 21 runtime
- Run using “Run Java” or Maven commands