Adding the dependency
StrokkCommands is hosted on the eldonexus. It is split into two separate modules:
| Module Name | Description |
|---|---|
| annotations-paper | This module holds the annotations for you to add in your source code. |
| processor-paper | This module only holds the annotation processor. |
This separation is made with a very specific purpose in mind: To include only the most necessary classes in your project classpath. Since the `processor` module only contains internal logic classes (which can have similar names as Brigadier itself), having them included in the classpath would make development experience very annoying.
Therefore, adding the dependency would look like this, depending on your build-system. The versions here are automatically fetched and thus always up to date.
First, add the repository:
repositories { maven { id = "eldonexus" url = "https://eldonexus.de/repository/maven-public/" }}
Then add the annotations module as a compileOnly and the processor module as a
annotationProcessor dependency.
dependencies { compileOnly("net.strokkur.commands:annotations-paper:2.0.2") annotationProcessor("net.strokkur.commands:processor-paper:2.0.2")}First, add the repository:
<repositories> <repository> <id>eldonexus</id> <url>https://eldonexus.de/repository/maven-public/</url> </repository></repositories>
Then add the annotation module as a dependency, with scope provided so that the annotations do not get
included in the output jar.
<dependencies> <dependency> <groupId>net.strokkur.commands</groupId> <artifactId>annotations-paper</artifactId> <version>2.0.2</version> <scope>provided</scope> </dependency></dependencies>Finally, we modify the compiler plugin and add a new annotation processor path for our processor module.
<pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.6.1</version> <configuration> <annotationProcessorPaths> <!-- Add annotation processor --> <annotationProcessorPath> <groupId>net.strokkur.commands</groupId> <artifactId>processor-paper</artifactId> <version>2.0.2</version> </annotationProcessorPath> </annotationProcessorPaths> </configuration> </plugin> </plugins></pluginManagement>