Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
109 lines (89 loc) · 2.54 KB
/
Copy pathjustfile
File metadata and controls
109 lines (89 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Java Faker justfile
# https://github.com/casey/just
# Default recipe - show available recipes
default:
@just --list
# Build the project (compile only)
build:
./mvnw compile -q
# Run all tests
test:
./mvnw test
# Run a specific test class (e.g., just test-class FakerTest)
test-class CLASS:
./mvnw test -Dtest={{CLASS}}
# Run tests with coverage report
coverage:
./mvnw test jacoco:report
@echo "Coverage report: target/site/jacoco/index.html"
# Clean build artifacts
clean:
./mvnw clean -q
# Full clean build
rebuild: clean build
# Package the JAR
package:
./mvnw package -DskipTests -q
# Install to local Maven repository
install:
./mvnw install -DskipTests -q
# Run OpenRewrite recipes (dry run)
rewrite-dry-run:
./mvnw rewrite:dryRun
# Run OpenRewrite recipes (apply changes)
rewrite-run:
./mvnw rewrite:run
# Show dependency tree
deps:
./mvnw dependency:tree
# Check for dependency updates
updates:
./mvnw versions:display-dependency-updates
# Verify the project (compile, test, package)
verify:
./mvnw verify
# Generate Javadoc
javadoc:
./mvnw javadoc:javadoc
@echo "Javadoc: target/site/apidocs/index.html"
# Format all Java files using Google Java Format
format:
./mvnw spotless:apply
# Check if Java files are properly formatted (for CI/hooks)
format-check:
./mvnw spotless:check
# Validate YAML files syntax
yaml-check:
#!/usr/bin/env bash
set -euo pipefail
yaml_files=$(find . -name "*.yml" -o -name "*.yaml" | grep -v ".git" | grep -v "target")
if [ -z "$yaml_files" ]; then
echo "No YAML files found"
exit 0
fi
for file in $yaml_files; do
if ! ./mvnw validate -f "$file" &>/dev/null; then
# Fallback to basic syntax check using yq or Python if available
if command -v yq &>/dev/null; then
yq eval "$file" > /dev/null || {
echo "YAML validation failed for: $file"
exit 1
}
elif python3 -c "import yaml" &>/dev/null 2>&1; then
python3 -c "import yaml; yaml.safe_load(open('$file'))" || {
echo "YAML validation failed for: $file"
exit 1
}
else
echo "Warning: No YAML validator available (install yq or python3 pyyaml)"
exit 0
fi
fi
done
echo "All YAML files are valid"
# Install git hooks using lefthook
hooks-install:
lefthook install
# Uninstall git hooks
hooks-uninstall:
lefthook uninstall