Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly fix paper server dependency #29

Merged
merged 5 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions .github/workflows/compile-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,6 @@ jobs:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- name: Install Paper
run: |
git config --global user.email "[email protected]"
git config --global user.name "Jannyboy11"
git clone https://github.com/PaperMC/Paper
cd Paper
git checkout ver/1.20.4
./gradlew applyPatches
./gradlew createReobfBundlerJar
./gradlew build
./gradlew generateMetadataFileForMavenPublication
./gradlew generatePomFileForMavenPublication
./gradlew publishToMavenLocal
cd ~/.m2/repository/io/papermc/paper/paper-server/1.20.4-R0.1-SNAPSHOT
mvn install:install-file -DgroupId=io.papermc.paper -DartifactId=paper-server -Dversion=1.20.4-R0.1-SNAPSHOT -Dpackaging=jar -Dfile=paper-server-1.20.4-R0.1-SNAPSHOT-mojang-mapped.jar
cd ~
- name: Compile ScalaLoader
run: mvn --batch-mode --update-snapshots verify -DfinalName=ScalaLoader
- name: Create tagged release
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ ScalaLoader-Paper/target/*
Scala2Example/target/*
Scala3Example/target/*
JavaExample/target/*
Dependencies/target/*
Dependencies/versions/*
Dependencies/cache/*

#Eclipse
.settings/*
Expand Down
90 changes: 86 additions & 4 deletions Dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,101 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.janboerman.scalaloader</groupId>
<artifactId>ScalaPluginLoader</artifactId>
<version>0.18.15-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>Dependencies</artifactId>

<properties>
<maven.compiler.source>23</maven.compiler.source>
<maven.compiler.target>23</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<paper.version>1.21-R0.1-SNAPSHOT</paper.version>
</properties>

<repositories>
<repository>
<id>papermc</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
</repositories>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.8.1</version>
<executions>
<execution>
<id>unpack</id>
<phase>initialize</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>io.papermc.paper</groupId>
<artifactId>dev-bundle</artifactId>
<version>${paper.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>exec</id>
<phase>initialize</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-Dpaperclip.patchonly=true</argument>
<argument>-jar</argument>
<argument>${project.build.directory}/data/paperclip-mojang+yarn.jar</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<id>install-file</id>
<phase>initialize</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<file>${basedir}/versions/${minecraftVersion}/paper-${minecraftVersion}.jar</file>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-server</artifactId>
<version>${paper.version}</version>
<classifier>mojang-mapped</classifier>
<packaging>jar</packaging>
<generatePom>true</generatePom>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
4 changes: 2 additions & 2 deletions ScalaLoader-Paper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<paper.version>1.20.4-R0.1-SNAPSHOT</paper.version>
<paper.version>1.21-R0.1-SNAPSHOT</paper.version>

<!-- paper server dependencies -->
<mavenResolverVersion>1.7.3</mavenResolverVersion>
Expand Down Expand Up @@ -82,7 +82,6 @@
<additionalOptions>-source 21</additionalOptions>
</configuration>
</plugin>

</plugins>
</build>

Expand Down Expand Up @@ -112,6 +111,7 @@
<groupId>io.papermc.paper</groupId>
<artifactId>paper-server</artifactId>
<version>${paper.version}</version>
<classifier>mojang-mapped</classifier>
<scope>provided</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public Map<String, DependencyConfiguration> getServerDependencies() {
}

//TODO track new paper-style dependency configuration separately?
@Override
//@Override
public Map<String, DependencyConfiguration> getBoostrapDependencies() {
Map<String, DependencyConfiguration> res = new HashMap<>();

Expand Down
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
</properties>

<modules>
<module>Dependencies</module>

<module>ScalaLoader-Common</module>
<module>ScalaLoader-Bukkit</module>
<module>ScalaLoader-Paper</module>
Expand Down
Loading