refactor, removed a uncessary throw.
All checks were successful
Maven Build / build (push) Successful in 10m12s
All checks were successful
Maven Build / build (push) Successful in 10m12s
This commit is contained in:
55
.gitea/workflows/maven_build.yaml
Normal file
55
.gitea/workflows/maven_build.yaml
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
name: Maven Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main, master, dev ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main, master ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up JDK 17
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '17'
|
||||||
|
cache: 'maven'
|
||||||
|
|
||||||
|
- name: Install Maven
|
||||||
|
run: |
|
||||||
|
if ! command -v mvn &> /dev/null; then
|
||||||
|
echo "Maven not found, installing..."
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y maven
|
||||||
|
fi
|
||||||
|
mvn --version
|
||||||
|
|
||||||
|
- name: Debug Info
|
||||||
|
run: |
|
||||||
|
echo "Current workspace directory: $GITHUB_WORKSPACE"
|
||||||
|
echo "Current directory: $(pwd)"
|
||||||
|
echo "Project structure:"
|
||||||
|
find . -type f -name "*.kt" | sort
|
||||||
|
find . -type f -name "pom.xml"
|
||||||
|
echo "Maven version: $(mvn --version)"
|
||||||
|
|
||||||
|
- name: Build filejet (filejet)
|
||||||
|
run: |
|
||||||
|
echo "Building filejet"
|
||||||
|
echo "Current directory: $(pwd)"
|
||||||
|
# Run Maven build directly using the POM file path
|
||||||
|
mvn -B clean package -f "$GITHUB_WORKSPACE/pom.xml" -Dmaven.compiler.failOnError=true
|
||||||
|
|
||||||
|
- name: Upload filejet artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: filejet
|
||||||
|
path: target/filejet-*.jar
|
||||||
|
if-no-files-found: error
|
||||||
10
build.sh
Executable file
10
build.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Direct build script for Maven project
|
||||||
|
|
||||||
|
echo "Current directory: $(pwd)"
|
||||||
|
echo "Building project with Maven..."
|
||||||
|
|
||||||
|
# Run Maven build using the exact pom.xml location
|
||||||
|
mvn clean package -f "$(pwd)/pom.xml"
|
||||||
|
|
||||||
|
echo "Build complete. JAR file should be in target/ directory."
|
||||||
@@ -91,7 +91,7 @@ public class DownloadRoute {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void handle(Context ctx) throws IOException {
|
public static void handle(Context ctx) {
|
||||||
// Download a file from a given path (relative to ISO_DIR)
|
// Download a file from a given path (relative to ISO_DIR)
|
||||||
String relPath = ctx.queryParam("path");
|
String relPath = ctx.queryParam("path");
|
||||||
if (relPath == null || relPath.isEmpty()) {
|
if (relPath == null || relPath.isEmpty()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user