Skip to content

Commit b774723

Browse files
committed
chore(paper): document dynamic build version fetching for Maven
1 parent ded3b45 commit b774723

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/content/docs/paper/dev/getting-started/project-setup.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ slug: paper/dev/project-setup
55
---
66

77
import { FileTree, Tabs, TabItem } from "@astrojs/starlight/components";
8+
import { LATEST_PAPER_RELEASE, LATEST_PAPER_BUILD_API_VERSION} from "/src/utils/versions";
89

910
As the Paper team primarily uses [IntelliJ IDEA](https://www.jetbrains.com/idea/), this guide will be focused on that IDE.
1011
However, the steps below should apply to other IDEs as well, with some minor changes.
@@ -54,8 +55,9 @@ version string format used was `{VERSION}-R0.1-SNAPSHOT`, with no way to referen
5455
```
5556
</TabItem>
5657
<TabItem label="Maven (Discouraged)">
57-
Maven unfortunately does not support obtaining the latest version using version ranges the way Gradle
58-
does. You will need to explicitly declare the build of a version you are targeting.
58+
If you want dynamic latest build version resolution with Maven, you will need to define your
59+
version as a range: `[\{LATEST_PAPER_RELEASE},)`. For a specific build, you can
60+
use the standard variant: `\{LATEST_PAPER_BUILD_API_VERSION}`.
5961

6062
```xml title="pom.xml" replace
6163
<project>
@@ -70,7 +72,7 @@ version string format used was `{VERSION}-R0.1-SNAPSHOT`, with no way to referen
7072
<dependency>
7173
<groupId>io.papermc.paper</groupId>
7274
<artifactId>paper-api</artifactId>
73-
<version>\{LATEST_PAPER_BUILD_API_VERSION}</version>
75+
<version>[\{LATEST_PAPER_RELEASE},)</version>
7476
<scope>provided</scope>
7577
</dependency>
7678
</dependencies>

0 commit comments

Comments
 (0)