Maven Setup - Revxrsal/Tuna-Bytes GitHub Wiki
To add Tuna-Bytes to your Maven project, follow these steps:
- Add jitpack.io to your repositories
- Add the correct artifact of the library to your dependencies
- Add Tuna-Bytes as an annotation processor
- Apply relocations to make sure no conflicts occur with other users of Tuna-Bytes
Note: Due to the many changes done to classloading semantics, classloading code has been abstracted across Java 8+ versions into modules. Therefore, the value of {artifact} in the examples below should be determined by the Java version you're going to run on. When unsure, you can include all versions and exclude the dependencies from them accordingly.
| Your Java version | Tuna-Bytes artifact |
|---|---|
| Java 8 | java8 |
| Java 9 / Java 10 | java9 |
| Java 11+ | java11 |
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories><dependency>
<groupId>com.github.ReflxctionDev.Tuna-Bytes</groupId>
<artifactId>{artifact}</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency><build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<annotationProcessorPaths>
<path>
<!-- Add as an annotation processor -->
<groupId>com.github.ReflxctionDev.Tuna-Bytes</groupId>
<artifactId>{artifact}</artifactId>
<version>1.0.0</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<configuration>
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<relocations>
<relocation>
<pattern>io.tunabytes</pattern>
<!-- Replace this with your package -->
<shadedPattern>[YOUR_PACKAGE].tunabytes</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>