Skip to content

Commit ec07107

Browse files
authored
fix: split Maven versions
1 parent 8801c2b commit ec07107

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

src/content/docs/velocity/dev/getting-started/creating-your-first-plugin.mdx

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ system's documentation ([Gradle](https://docs.gradle.org/current/userguide/userg
9090
}
9191
```
9292
</TabItem>
93-
<TabItem label="Maven">
93+
<TabItem label="Maven 4+">
9494
:::caution
9595

9696
If you're using JDK 23 or later, you must add the annotation processor manually to your `pom.xml`, as described in the example.
@@ -114,22 +114,50 @@ system's documentation ([Gradle](https://docs.gradle.org/current/userguide/userg
114114
<version>\{LATEST_VELOCITY_RELEASE}</version>
115115
<scope>provided</scope>
116116
</dependency>
117-
<!-- add the annotation processor (Maven 4+) -->
117+
<!-- add the annotation processor -->
118118
<dependency>
119119
<groupId>com.velocitypowered</groupId>
120120
<artifactId>velocity-api</artifactId>
121121
<version>\{LATEST_VELOCITY_RELEASE}</version>
122122
<type>processor</type>
123123
</dependency>
124124
</dependencies>
125+
</project>
126+
```
127+
</TabItem>
128+
<TabItem label="Maven 3">
129+
:::caution
130+
131+
If you're using JDK 23 or later, you must add the annotation processor manually to your `pom.xml`, as described in the example.
132+
See the [Maven documentation](https://maven.apache.org/plugins/maven-compiler-plugin-4.x/examples/annotation-processor.html) for more information.
133+
134+
:::
135+
136+
```xml title="pom.xml" replace
137+
<project>
138+
<repositories>
139+
<repository>
140+
<id>papermc</id>
141+
<url>https://repo.papermc.io/repository/maven-public/</url>
142+
</repository>
143+
</repositories>
144+
145+
<dependencies>
146+
<dependency>
147+
<groupId>com.velocitypowered</groupId>
148+
<artifactId>velocity-api</artifactId>
149+
<version>\{LATEST_VELOCITY_RELEASE}</version>
150+
<scope>provided</scope>
151+
</dependency>
152+
</dependencies>
125153

126154
<build>
127155
<plugins>
128156
<plugin>
129157
<groupId>org.apache.maven.plugins</groupId>
130158
<artifactId>maven-compiler-plugin</artifactId>
131159
<configuration>
132-
<!-- add the annotation processor (Maven 3) -->
160+
<!-- add the annotation processor -->
133161
<annotationProcessorPaths>
134162
<path>
135163
<groupId>com.velocitypowered</groupId>

0 commit comments

Comments
 (0)