Skip to content

Commit 1fd31cf

Browse files
committed
ci: Fix POM parent issue by using custom generated POM
1 parent 7912bad commit 1fd31cf

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ jobs:
4949
5050
if [ -f "$JAR_PATH" ]; then
5151
echo "Found jar at: $JAR_PATH"
52-
mvn install:install-file -Dfile="$JAR_PATH" -DgroupId=com.hypixel.hytale -DartifactId=HytaleServer -Dversion=1.0-SNAPSHOT -Dpackaging=jar
52+
# Create a custom POM to avoid parent resolution issues (since the jar likely has an internal POM referencing a missing parent)
53+
echo '<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><modelVersion>4.0.0</modelVersion><groupId>com.hypixel.hytale</groupId><artifactId>HytaleServer</artifactId><version>1.0-SNAPSHOT</version><description>Hytale Server</description></project>' > hytale-server.pom
54+
55+
mvn install:install-file -Dfile="$JAR_PATH" -DpomFile=hytale-server.pom -Dpackaging=jar
5356
else
5457
echo "Error: HytaleServer.jar not found after extraction!"
5558
ls -R

.github/workflows/curseforge.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
JAR_PATH=$(find . -name "HytaleServer.jar" | head -n 1)
4040
4141
if [ -f "$JAR_PATH" ]; then
42-
mvn install:install-file -Dfile="$JAR_PATH" -DgroupId=com.hypixel.hytale -DartifactId=HytaleServer -Dversion=1.0-SNAPSHOT -Dpackaging=jar
42+
echo '<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><modelVersion>4.0.0</modelVersion><groupId>com.hypixel.hytale</groupId><artifactId>HytaleServer</artifactId><version>1.0-SNAPSHOT</version><description>Hytale Server</description></project>' > hytale-server.pom
43+
mvn install:install-file -Dfile="$JAR_PATH" -DpomFile=hytale-server.pom -Dpackaging=jar
4344
else
4445
echo "Error: HytaleServer.jar not found!"
4546
ls -R

0 commit comments

Comments
 (0)