/ Makefile
Makefile
1 # SPDX-License-Identifier: AGPL-3.0-or-later 2 # SPDX-FileCopyrightText: 2025 Chris Barry <chris@barry.im> 3 # Makefile - Automate Maven build tasks 4 # 5 6 7 MAVEN=mvn 8 9 # Default Maven goal 10 GOAL=clean install 11 12 # Target for building the project 13 all: $(GOAL) 14 15 # Clean up the build directory 16 clean: 17 @echo "Cleaning project..." 18 $(MAVEN) clean 19 20 # Compile the project 21 compile: 22 @echo "Compiling project..." 23 $(MAVEN) compile 24 25 # Run tests 26 test: 27 @echo "Running tests..." 28 $(MAVEN) test 29 30 # Package the project into a JAR 31 package: 32 @echo "Packaging project into JAR..." 33 $(MAVEN) package 34 35 # Install dependencies and build the project 36 install: 37 @echo "Installing project..." 38 $(MAVEN) install 39 40 # Execute the application 41 run: 42 @echo "Running application..." 43 $(MAVEN) exec:java 44 45 # Clean, compile, test, and package the project 46 build: clean compile test package 47 48 .PHONY: all clean compile test package install run build